soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
STextHost Class Reference

Describe. More...

Public Member Functions

 STextHost (void)
 构造函数
 
 ~STextHost (void)
 析构函数
 
BOOL Init (SRichEdit *pRichEdit)
 初始化函数
 
ITextServices * GetTextService ()
 Describe.
 

Protected Member Functions

HRESULT QueryInterface (REFGUID riid, void **ppvObject) OVERRIDE
 
ULONG AddRef () OVERRIDE
 
ULONG Release () OVERRIDE
 
virtual HDC TxGetDC ()
 Get the DC for the host.
 
virtual INT TxReleaseDC (HDC hdc)
 Release the DC gotten from the host.
 
virtual BOOL TxShowScrollBar (INT fnBar, BOOL fShow)
 Show the scroll bar.
 
virtual BOOL TxEnableScrollBar (INT fuSBFlags, INT fuArrowflags)
 Enable the scroll bar.
 
virtual BOOL TxSetScrollRange (INT fnBar, LONG nMinPos, INT nMaxPos, BOOL fRedraw)
 Set the scroll range.
 
virtual BOOL TxSetScrollPos (INT fnBar, INT nPos, BOOL fRedraw)
 Set the scroll position.
 
virtual void TxInvalidateRect (LPCRECT prc, BOOL fMode)
 InvalidateRect.
 
virtual void TxViewChange (BOOL fUpdate)
 Send a WM_PAINT to the window.
 
virtual BOOL TxCreateCaret (HBITMAP hbmp, INT xWidth, INT yHeight)
 Create the caret.
 
virtual BOOL TxShowCaret (BOOL fShow)
 Show the caret.
 
virtual BOOL TxSetCaretPos (INT x, INT y)
 Set the caret position.
 
virtual BOOL TxSetTimer (UINT idTimer, UINT uTimeout)
 Create a timer with the specified timeout.
 
virtual void TxKillTimer (UINT idTimer)
 Destroy a timer.
 
virtual void TxScrollWindowEx (INT dx, INT dy, LPCRECT lprcScroll, LPCRECT lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate, UINT fuScroll)
 Scroll the content of the specified window's client area.
 
virtual void TxSetCapture (BOOL fCapture)
 Get mouse capture.
 
virtual void TxSetFocus ()
 Set the focus to the text window.
 
virtual void TxSetCursor (HCURSOR hcur, BOOL fText)
 Establish a new cursor shape.
 
virtual BOOL TxScreenToClient (LPPOINT lppt)
 Converts screen coordinates of a specified point to the client coordinates.
 
virtual BOOL TxClientToScreen (LPPOINT lppt)
 Converts the client coordinates of a specified point to screen coordinates.
 
virtual HRESULT TxActivate (LONG *plOldState)
 Request host to activate text services.
 
virtual HRESULT TxDeactivate (LONG lNewState)
 Request host to deactivate text services.
 
virtual HRESULT TxGetClientRect (LPRECT prc)
 Retrieves the coordinates of a window's client area.
 
virtual HRESULT TxGetViewInset (LPRECT prc)
 Get the view rectangle relative to the inset.
 
virtual HRESULT TxGetCharFormat (const CHARFORMATW **ppCF)
 Get the default character format for the text.
 
virtual HRESULT TxGetParaFormat (const PARAFORMAT **ppPF)
 Get the default paragraph format for the text.
 
virtual COLORREF TxGetSysColor (int nIndex)
 Get the background color for the window.
 
virtual HRESULT TxGetBackStyle (TXTBACKSTYLE *pstyle)
 Get the background (either opaque or transparent)
 
virtual HRESULT TxGetMaxLength (DWORD *plength)
 Get the maximum length for the text.
 
virtual HRESULT TxGetScrollBars (DWORD *pdwScrollBar)
 Get the bits representing requested scroll bars for the window.
 
virtual HRESULT TxGetPasswordChar (TCHAR *pch)
 Get the character to display for password input.
 
virtual HRESULT TxGetAcceleratorPos (LONG *pcp)
 Get the accelerator character.
 
virtual HRESULT TxGetExtent (LPSIZEL lpExtent)
 Get the native size.
 
virtual HRESULT OnTxCharFormatChange (const CHARFORMATW *pcf)
 Notify host that default character format has changed.
 
virtual HRESULT OnTxParaFormatChange (const PARAFORMAT *ppf)
 Notify host that default paragraph format has changed.
 
virtual HRESULT TxGetPropertyBits (DWORD dwMask, DWORD *pdwBits)
 Bulk access to bit properties.
 
virtual HRESULT TxNotify (DWORD iNotify, void *pv)
 Notify host of events.
 
virtual HIMC TxImmGetContext ()
 
virtual void TxImmReleaseContext (HIMC himc)
 
virtual HRESULT TxGetSelectionBarWidth (LONG *plSelBarWidth)
 Returns HIMETRIC size of the control bar.
 

Protected Attributes

BOOL m_fUiActive
 
ULONG cRefs
 
ITextServices * pserv
 
SRichEditm_pRichEdit
 
POINT m_ptCaret
 

Friends

class SRichEdit
 

Detailed Description

Describe.

Definition at line 267 of file SRichEdit.cpp.

Constructor & Destructor Documentation

◆ STextHost()

STextHost::STextHost ( void )

构造函数

STextHost::STextHost

Describe 构造函数

Definition at line 719 of file SRichEdit.cpp.

◆ ~STextHost()

STextHost::~STextHost ( void )

析构函数

STextHost::~STextHost

Describe 析构函数

Definition at line 727 of file SRichEdit.cpp.

Member Function Documentation

◆ AddRef()

ULONG STextHost::AddRef ( void )
protected

Definition at line 750 of file SRichEdit.cpp.

◆ GetTextService()

ITextServices * STextHost::GetTextService ( )
inline

Describe.

STextHost::GetTextService

Definition at line 299 of file SRichEdit.cpp.

◆ Init()

BOOL STextHost::Init ( SRichEdit * pRichEdit)

初始化函数

STextHost::Init

Parameters
SRichEdit*pRichEdit – SRichEdit对象

Describe 初始化函数

Definition at line 1104 of file SRichEdit.cpp.

◆ OnTxCharFormatChange()

HRESULT STextHost::OnTxCharFormatChange ( const CHARFORMATW * pcf)
protectedvirtual

Notify host that default character format has changed.

STextHost::OnTxCharFormatChange

Parameters
constCHARFORMATW * pcf –
Returns
返回HRESULT

Describe Notify host that default character format has changed

Definition at line 1015 of file SRichEdit.cpp.

◆ OnTxParaFormatChange()

HRESULT STextHost::OnTxParaFormatChange ( const PARAFORMAT * ppf)
protectedvirtual

Notify host that default paragraph format has changed.

STextHost::OnTxParaFormatChange

Parameters
constPARAFORMAT * ppf –
Returns
返回HRESULT

Describe Notify host that default paragraph format has changed

Definition at line 1020 of file SRichEdit.cpp.

◆ QueryInterface()

HRESULT STextHost::QueryInterface ( REFGUID riid,
void ** ppvObject )
protected

Definition at line 735 of file SRichEdit.cpp.

◆ Release()

ULONG STextHost::Release ( void )
protected

Definition at line 755 of file SRichEdit.cpp.

◆ TxActivate()

HRESULT STextHost::TxActivate ( LONG * plOldState)
protectedvirtual

Request host to activate text services.

STextHost::TxActivate

Parameters
LONG* plOldState –
Returns
返回HRESULT

Describe Request host to activate text services

Definition at line 799 of file SRichEdit.cpp.

◆ TxClientToScreen()

BOOL STextHost::TxClientToScreen ( LPPOINT lppt)
protectedvirtual

Converts the client coordinates of a specified point to screen coordinates.

STextHost::TxClientToScreen

Parameters
LPPOINTlppt –
Returns
返回BOOL

Describe Converts the client coordinates of a specified point to screen coordinates

Definition at line 806 of file SRichEdit.cpp.

◆ TxCreateCaret()

BOOL STextHost::TxCreateCaret ( HBITMAP hbmp,
INT xWidth,
INT yHeight )
protectedvirtual

Create the caret.

STextHost::TxCreateCaret

Parameters
HBITMAPhbmp – caret bitmap
INTxWidth – caret width
INTyHeight – caret height
Returns
返回BOOL

Describe Create the caret

Definition at line 872 of file SRichEdit.cpp.

◆ TxDeactivate()

HRESULT STextHost::TxDeactivate ( LONG lNewState)
protectedvirtual

Request host to deactivate text services.

STextHost::TxDeactivate

Parameters
LONGlNewState –
Returns
返回HRESULT

Describe Request host to deactivate text services

Definition at line 793 of file SRichEdit.cpp.

◆ TxEnableScrollBar()

BOOL STextHost::TxEnableScrollBar ( INT fuSBFlags,
INT fuArrowflags )
protectedvirtual

Enable the scroll bar.

STextHost::TxEnableScrollBar

Parameters
INTfuSBFlags –
INTfuArrowflags –
Returns
返回BOOL

Describe Enable the scroll bar

Definition at line 905 of file SRichEdit.cpp.

◆ TxGetAcceleratorPos()

HRESULT STextHost::TxGetAcceleratorPos ( LONG * pcp)
protectedvirtual

Get the accelerator character.

STextHost::TxGetAcceleratorPos

Parameters
LONG*pcp –
Returns
返回HRESULT

Describe Get the accelerator character

Definition at line 1003 of file SRichEdit.cpp.

◆ TxGetBackStyle()

HRESULT STextHost::TxGetBackStyle ( TXTBACKSTYLE * pstyle)
protectedvirtual

Get the background (either opaque or transparent)

STextHost::TxGetBackStyle

Parameters
TXTBACKSTYLE*pstyle –
Returns
返回HRESULT

Describe Get the background (either opaque or transparent)

Definition at line 978 of file SRichEdit.cpp.

◆ TxGetCharFormat()

HRESULT STextHost::TxGetCharFormat ( const CHARFORMATW ** ppCF)
protectedvirtual

Get the default character format for the text.

STextHost::TxGetCharFormat

Parameters
constCHARFORMATW **ppCF –
Returns
返回HRESULT

Describe Get the default character format for the text

Definition at line 775 of file SRichEdit.cpp.

◆ TxGetClientRect()

HRESULT STextHost::TxGetClientRect ( LPRECT prc)
protectedvirtual

Retrieves the coordinates of a window's client area.

STextHost::TxGetClientRect

Parameters
LPRECTprc –
Returns
返回HRESULT

Describe Retrieves the coordinates of a window's client area

Definition at line 787 of file SRichEdit.cpp.

◆ TxGetDC()

HDC STextHost::TxGetDC ( )
protectedvirtual

Get the DC for the host.

STextHost::TxGetDC

Returns
返回HDC

Describe Get the DC for the host

Definition at line 877 of file SRichEdit.cpp.

◆ TxGetExtent()

HRESULT STextHost::TxGetExtent ( LPSIZEL lpExtent)
protectedvirtual

Get the native size.

STextHost::TxGetExtent

Parameters
LPSIZELlpExtent –
Returns
返回HRESULT

Describe Get the native size

Definition at line 1009 of file SRichEdit.cpp.

◆ TxGetMaxLength()

HRESULT STextHost::TxGetMaxLength ( DWORD * plength)
protectedvirtual

Get the maximum length for the text.

STextHost::TxGetMaxLength

Parameters
DWORD*plength –
Returns
返回HRESULT

Describe Get the maximum length for the text

Definition at line 984 of file SRichEdit.cpp.

◆ TxGetParaFormat()

HRESULT STextHost::TxGetParaFormat ( const PARAFORMAT ** ppPF)
protectedvirtual

Get the default paragraph format for the text.

STextHost::TxGetParaFormat

Parameters
constPARAFORMAT **ppPF –
Returns
返回HRESULT

Describe Get the default character format for the text

Definition at line 781 of file SRichEdit.cpp.

◆ TxGetPasswordChar()

HRESULT STextHost::TxGetPasswordChar ( TCHAR * pch)
protectedvirtual

Get the character to display for password input.

STextHost::TxGetPasswordChar

Parameters
TCHAR*pch –
Returns
返回HRESULT

Describe Get the character to display for password input

Definition at line 997 of file SRichEdit.cpp.

◆ TxGetPropertyBits()

HRESULT STextHost::TxGetPropertyBits ( DWORD dwMask,
DWORD * pdwBits )
protectedvirtual

Bulk access to bit properties.

STextHost::TxGetPropertyBits

Parameters
DWORDdwMask –
DWORD*pdwBits –
Returns
返回HRESULT

Describe Bulk access to bit properties

Definition at line 1025 of file SRichEdit.cpp.

◆ TxGetScrollBars()

HRESULT STextHost::TxGetScrollBars ( DWORD * pdwScrollBar)
protectedvirtual

Get the bits representing requested scroll bars for the window.

STextHost::TxGetScrollBars

Parameters
DWORD*pdwScrollBar –
Returns
返回HRESULT

Describe Get the bits representing requested scroll bars for the window

Definition at line 990 of file SRichEdit.cpp.

◆ TxGetSelectionBarWidth()

HRESULT STextHost::TxGetSelectionBarWidth ( LONG * plSelBarWidth)
protectedvirtual

Returns HIMETRIC size of the control bar.

STextHost::TxGetSelectionBarWidth

Parameters
LONG*plSelBarWidth –

Describe Returns HIMETRIC size of the control bar

Definition at line 1098 of file SRichEdit.cpp.

◆ TxGetSysColor()

COLORREF STextHost::TxGetSysColor ( int nIndex)
protectedvirtual

Get the background color for the window.

STextHost::TxGetSysColor

Parameters
intnIndex –
Returns
返回COLORREF

Describe Get the background color for the window

Definition at line 973 of file SRichEdit.cpp.

◆ TxGetViewInset()

HRESULT STextHost::TxGetViewInset ( LPRECT prc)
protectedvirtual

Get the view rectangle relative to the inset.

STextHost::TxGetViewInset

Parameters
LPRECTprc –
Returns
返回HRESULT

Describe Get the view rectangle relative to the inset

Definition at line 769 of file SRichEdit.cpp.

◆ TxImmGetContext()

HIMC STextHost::TxImmGetContext ( )
protectedvirtual

STextHost::TxImmGetContext

Returns
返回HIMC

Describe

Definition at line 1088 of file SRichEdit.cpp.

◆ TxImmReleaseContext()

void STextHost::TxImmReleaseContext ( HIMC himc)
protectedvirtual

STextHost::TxImmReleaseContext

Parameters
HIMChimc –

Describe

Definition at line 1093 of file SRichEdit.cpp.

◆ TxInvalidateRect()

void STextHost::TxInvalidateRect ( LPCRECT prc,
BOOL fMode )
protectedvirtual

InvalidateRect.

STextHost::TxInvalidateRect

Parameters
LPCRECTprc –
BOOLfMode –

Describe Set the scroll position

Definition at line 953 of file SRichEdit.cpp.

◆ TxKillTimer()

void STextHost::TxKillTimer ( UINT idTimer)
protectedvirtual

Destroy a timer.

STextHost::TxSetTimer

Parameters
UINTidTimer – timer id
Returns
返回BOOL

Describe Destroy a timer

Definition at line 847 of file SRichEdit.cpp.

◆ TxNotify()

HRESULT STextHost::TxNotify ( DWORD iNotify,
void * pv )
protectedvirtual

Notify host of events.

STextHost::TxNotify

Parameters
DWORDiNotify –
void*pv –
Returns
返回HRESULT

Describe Bulk access to bit properties

Definition at line 1083 of file SRichEdit.cpp.

◆ TxReleaseDC()

INT STextHost::TxReleaseDC ( HDC hdc)
protectedvirtual

Release the DC gotten from the host.

STextHost::TxReleaseDC

Returns
返回INT

Describe Release the DC gotten from the host

Definition at line 882 of file SRichEdit.cpp.

◆ TxScreenToClient()

BOOL STextHost::TxScreenToClient ( LPPOINT lppt)
protectedvirtual

Converts screen coordinates of a specified point to the client coordinates.

STextHost::TxScreenToClient

Parameters
LPPOINTlppt –
Returns
返回BOOL

Describe Converts screen coordinates of a specified point to the client coordinates

Definition at line 815 of file SRichEdit.cpp.

◆ TxScrollWindowEx()

void STextHost::TxScrollWindowEx ( INT dx,
INT dy,
LPCRECT lprcScroll,
LPCRECT lprcClip,
HRGN hrgnUpdate,
LPRECT lprcUpdate,
UINT fuScroll )
protectedvirtual

Scroll the content of the specified window's client area.

STextHost::TxScrollWindowEx

Parameters
INTdx –
INTdy –
LPCRECTlprcScroll –
LPCRECTlprcClip –
HRGNhrgnUpdate –
LPRECTlprcUpdate –
UINTfuScroll –

Describe Scroll the content of the specified window's client area

Definition at line 842 of file SRichEdit.cpp.

◆ TxSetCapture()

void STextHost::TxSetCapture ( BOOL fCapture)
protectedvirtual

Get mouse capture.

STextHost::TxSetCapture

Parameters
BOOLfCapture –

Describe Get mouse capture

Definition at line 834 of file SRichEdit.cpp.

◆ TxSetCaretPos()

BOOL STextHost::TxSetCaretPos ( INT x,
INT y )
protectedvirtual

Set the caret position.

STextHost::TxSetCaretPos

Parameters
INTx – caret position:x
INTy – caret position:y
Returns
返回BOOL

Describe Set the caret position

Definition at line 857 of file SRichEdit.cpp.

◆ TxSetCursor()

void STextHost::TxSetCursor ( HCURSOR hcur,
BOOL fText )
protectedvirtual

Establish a new cursor shape.

STextHost::TxSetCursor

Parameters
HCURSORhcur –
BOOLfText –

Describe Establish a new cursor shape

Definition at line 824 of file SRichEdit.cpp.

◆ TxSetFocus()

void STextHost::TxSetFocus ( )
protectedvirtual

Set the focus to the text window.

STextHost::TxSetFocus

Describe Set the focus to the text window

Definition at line 829 of file SRichEdit.cpp.

◆ TxSetScrollPos()

BOOL STextHost::TxSetScrollPos ( INT fnBar,
INT nPos,
BOOL fRedraw )
protectedvirtual

Set the scroll position.

STextHost::TxSetScrollPos

Parameters
INTfnBar –
INTnPos –
BOOLfRedraw –
Returns
返回BOOL

Describe Set the scroll position

Definition at line 948 of file SRichEdit.cpp.

◆ TxSetScrollRange()

BOOL STextHost::TxSetScrollRange ( INT fnBar,
LONG nMinPos,
INT nMaxPos,
BOOL fRedraw )
protectedvirtual

Set the scroll range.

STextHost::TxEnableScrollBar

Parameters
INTfnBar –
LONGnMinPos –
INTnMaxPos –
BOOLfRedraw –
Returns
返回BOOL

Describe Set the scroll range

Definition at line 923 of file SRichEdit.cpp.

◆ TxSetTimer()

BOOL STextHost::TxSetTimer ( UINT idTimer,
UINT uTimeout )
protectedvirtual

Create a timer with the specified timeout.

STextHost::TxSetTimer

Parameters
UINTidTimer – timer ID
UINTuTimeout – time interval
Returns
返回BOOL

Describe Create a timer with the specified timeout

Definition at line 852 of file SRichEdit.cpp.

◆ TxShowCaret()

BOOL STextHost::TxShowCaret ( BOOL fShow)
protectedvirtual

Show the caret.

STextHost::TxShowCaret

Parameters
BOOLfShow – true to show the caret
Returns
返回BOOL

Describe Show the caret

Definition at line 864 of file SRichEdit.cpp.

◆ TxShowScrollBar()

BOOL STextHost::TxShowScrollBar ( INT fnBar,
BOOL fShow )
protectedvirtual

Show the scroll bar.

STextHost::TxShowScrollBar

Parameters
INTfnBar –
BOOLfShow –
Returns
返回BOOL

Describe Show the scroll bar

Definition at line 887 of file SRichEdit.cpp.

◆ TxViewChange()

void STextHost::TxViewChange ( BOOL fUpdate)
protectedvirtual

Send a WM_PAINT to the window.

STextHost::TxViewChange

Parameters
BOOLfUpdate –

Describe Send a WM_PAINT to the window

Definition at line 965 of file SRichEdit.cpp.

Friends And Related Symbol Documentation

◆ SRichEdit

friend class SRichEdit
friend

Definition at line 268 of file SRichEdit.cpp.

Member Data Documentation

◆ cRefs

ULONG STextHost::cRefs
protected

Reference Count

Definition at line 713 of file SRichEdit.cpp.

◆ m_fUiActive

BOOL STextHost::m_fUiActive
protected

Whether control is inplace active

Definition at line 711 of file SRichEdit.cpp.

◆ m_pRichEdit

SRichEdit* STextHost::m_pRichEdit
protected

swindow for text host

Definition at line 715 of file SRichEdit.cpp.

◆ m_ptCaret

POINT STextHost::m_ptCaret
protected

Definition at line 716 of file SRichEdit.cpp.

◆ pserv

ITextServices* STextHost::pserv
protected

pointer to Text Services object

Definition at line 714 of file SRichEdit.cpp.


The documentation for this class was generated from the following file: