First commit.
This commit is contained in:
commit
7b83802bb2
103 files changed
+19016
No files matched your search
@@ -0,0 +1,43 @@
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|
||||
// PARTICULAR PURPOSE.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved
|
||||
|
||||
#include "Private.h"
|
||||
#include "EditSession.h"
|
||||
#include "GetTextExtentEditSession.h"
|
||||
#include "TfTextLayoutSink.h"
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
//
|
||||
// ctor
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
CGetTextExtentEditSession::CGetTextExtentEditSession(_In_ CSampleIME *pTextService, _In_ ITfContext *pContext, _In_ ITfContextView *pContextView, _In_ ITfRange *pRangeComposition, _In_ CTfTextLayoutSink *pTfTextLayoutSink) : CEditSessionBase(pTextService, pContext)
|
||||
{
|
||||
_pContextView = pContextView;
|
||||
_pRangeComposition = pRangeComposition;
|
||||
_pTfTextLayoutSink = pTfTextLayoutSink;
|
||||
}
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
//
|
||||
// ITfEditSession::DoEditSession
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
STDAPI CGetTextExtentEditSession::DoEditSession(TfEditCookie ec)
|
||||
{
|
||||
RECT rc = {0, 0, 0, 0};
|
||||
BOOL isClipped = TRUE;
|
||||
|
||||
if (SUCCEEDED(_pContextView->GetTextExt(ec, _pRangeComposition, &rc, &isClipped)))
|
||||
{
|
||||
_pTfTextLayoutSink->_LayoutChangeNotification(&rc);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
Reference in new issue
Block a user