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

The main host window class responsible for managing the layout, events, and rendering of SOUI windows. More...

#include <SHostWnd.h>

Inheritance diagram for SHostWnd:
SwndContainerImpl ISwndContainer ITimelineHandler SDropDownWnd SMenuEx

Classes

class  SHostAnimationHandler
 Handler class for host window animations. More...
 

Public Types

enum  {
  kPulseTimer = 4321 , kPulseInterval = 10 , kNcCheckTimer = 4322 , kNcCheckInterval = 50 ,
  kTaskTimer = 4323 , kTaskInterval = 100
}
 

Public Member Functions

 SHostWnd (LPCWSTR pszResName=NULL)
 Constructs a SHostWnd object with an optional resource name.
 
 SHostWnd (LPCSTR pszResName)
 Constructs a SHostWnd object with an optional resource name (ANSI version).
 
virtual ~SHostWnd ()
 Destructor for SHostWnd.
 
BOOL InitFromXml (IXmlNode *pNode) OVERRIDE
 Initializes the host window from an XML node.
 
BOOL DestroyWindow () OVERRIDE
 Destroys the host window.
 
void SetLayoutId (LPCTSTR pszLayoutId) OVERRIDE
 Sets the layout ID for the host window.
 
IWindow * GetIRoot () OVERRIDE
 Gets the root window interface.
 
BOOL IsTranslucent () SCONST OVERRIDE
 Checks if the host window is translucent.
 
IHostPresenter * GetPresenter () OVERRIDE
 Gets the presenter interface for rendering.
 
void SetPresenter (IHostPresenter *pPresenter) OVERRIDE
 Sets the presenter for rendering.
 
IMessageLoopGetMsgLoop () OVERRIDE
 Gets the message loop interface.
 
IWindow * FindIChildByID (int nId) OVERRIDE
 Finds a child window by its ID.
 
IWindow * FindIChildByName (LPCWSTR pszName) OVERRIDE
 Finds a child window by its name (Unicode version).
 
IWindow * FindIChildByNameA (LPCSTR pszName) OVERRIDE
 Finds a child window by its name (ANSI version).
 
INcPainter * GetNcPainter () OVERRIDE
 Gets the non-client area painter for the host window.
 
BOOL ShowWindow (int nCmdShow) OVERRIDE
 Shows or hides the host window.
 
HWND CreateEx (HWND hWndParent, DWORD dwStyle, DWORD dwExStyle, int x, int y, int nWidth, int nHeight, IXmlNode *xmlInit=NULL) OVERRIDE
 Creates the host window with extended styles.
 
HWND Create (HWND hWndParent, int x=0, int y=0, int nWidth=0, int nHeight=0) OVERRIDE
 Creates the host window.
 
void SetEventHandler (FunCallback fun, void *ctx) OVERRIDE
 Sets the event handler for the host window.
 
EventHandlerInfo * GetEventHandler () OVERRIDE
 Gets the event handler information for the host window.
 
BOOL AnimateHostWindow (DWORD dwTime, DWORD dwFlags) OVERRIDE
 Animates the host window.
 
void EnableDragDrop () OVERRIDE
 Enables drag-and-drop functionality for the host window.
 
void ShowHostWnd (int uShowCmd, BOOL bWaitAniDone) OVERRIDE
 Shows the host window with optional animation.
 
void EnablePrivateUiDef (BOOL bEnable) OVERRIDE
 Enables or disables private UI definitions for the host window.
 
void SetScale (int nScale, LPCRECT pDestRect) OVERRIDE
 Sets the scale factor for the host window.
 
SWindowFindChildByName (LPCWSTR strName, int nDeep=-1)
 Finds a child window by its name (Unicode version).
 
SWindowFindChildByName (LPCSTR strName, int nDeep=-1)
 Finds a child window by its name (ANSI version).
 
template<class T>
T * FindChildByName2 (LPCWSTR pszName, int nDeep=-1)
 Finds a child window by its name (Unicode version) with template support.
 
template<class T>
T * FindChildByName2 (LPCSTR pszName, int nDeep=-1)
 Finds a child window by its name (ANSI version) with template support.
 
SWindowFindChildByID (int nID, int nDeep=-1)
 Finds a child window by its ID.
 
template<class T>
T * FindChildByID2 (int nID, int nDeep=-1)
 Finds a child window by its ID with template support.
 
template<class T>
T * FindChildByClass (int nDeep=-1) const
 Finds a child window by its class.
 
SWindowGetRoot () const
 Gets the root window.
 
SNativeWndGetNative ()
 Gets the native window interface.
 
CRect GetWindowRect () const
 Gets the window rectangle.
 
CRect GetClientRect () const
 Gets the client rectangle.
 
SHostWndAttrGetHostAttr ()
 Gets the host window attributes.
 
IToolTipGetToolTip () const
 Gets the tooltip interface.
 
bool StartHostAnimation (IAnimation *pAni)
 Starts an animation for the host window.
 
bool StopHostAnimation ()
 Stops the current animation for the host window.
 
void UpdateAutoSizeCount (bool bInc)
 Updates the auto-size count.
 
BOOL OnFireEvent (IEvtArgs *evt) OVERRIDE
 Fires an event in the container.
 
void GetContainerRect (RECT *ret) const OVERRIDE
 Gets the rectangle of the container.
 
HWND GetHostHwnd () OVERRIDE
 Gets the handle to the host window.
 
LPCWSTR GetTranslatorContext () const OVERRIDE
 Gets the translator context for the container.
 
void UpdateRegion (IRegionS *rgn) OVERRIDE
 Updates the specified region in the container.
 
void OnRedraw (LPCRECT rc, BOOL bClip) OVERRIDE
 Redraws the specified rectangle in the container.
 
BOOL OnReleaseSwndCapture () OVERRIDE
 Releases the capture from the container.
 
SWND OnSetSwndCapture (SWND swnd) OVERRIDE
 Sets the capture to the specified window.
 
BOOL IsSendWheel2Hover () const OVERRIDE
 Checks if wheel messages are sent to the hover window.
 
BOOL UpdateWindow (BOOL bForce=TRUE) OVERRIDE
 Updates the window.
 
void UpdateTooltip () OVERRIDE
 Updates the tooltip for the container.
 
void SetToolTip (LPCRECT rc, UINT tipAlign, LPCTSTR pszTip) OVERRIDE
 Sets the tooltip for the container.
 
BOOL RegisterTimelineHandler (ITimelineHandler *pHandler) OVERRIDE
 Registers a timeline handler.
 
BOOL UnregisterTimelineHandler (ITimelineHandler *pHandler) OVERRIDE
 Unregisters a timeline handler.
 
void EnableHostPrivateUiDef (BOOL bEnable) OVERRIDE
 Enables or disables host private UI definitions.
 
IScriptModule * GetScriptModule () OVERRIDE
 Gets the script module for the container.
 
int GetScale () const OVERRIDE
 Gets the scale factor for the container.
 
void EnableIME (BOOL bEnable) OVERRIDE
 Enables or disables IME (Input Method Editor).
 
void OnUpdateCursor () OVERRIDE
 Updates the cursor for the container.
 
BOOL PostTask (IRunnable *runable, BOOL bAsync=TRUE) OVERRIDE
 Posts a task to the container.
 
int RemoveTasksForObject (void *pObj) OVERRIDE
 Removes tasks for the specified object.
 
virtual BOOL onRootResize (IEvtArgs *e)
 Handles the resize event of the root window.
 
virtual BOOL _HandleEvent (IEvtArgs *pEvt)
 Handles an event.
 
- Public Member Functions inherited from SwndContainerImpl
 SwndContainerImpl ()
 Constructor.
 
IDropTarget * GetDropTarget ()
 Retrieves the drop target.
 
SFocusManagerGetFocusManager ()
 Retrieves the focus manager.
 
void SetRoot (SWindow *pRoot)
 Sets the root window of the container.
 
virtual LRESULT DoFrameEvent (UINT uMsg, WPARAM wParam, LPARAM lParam)
 Processes frame events.
 
void OnNextFrame () OVERRIDE
 Called when the next frame is ready.
 
- Public Member Functions inherited from ISwndContainer
BOOL RegisterTimelineHandler (ITimelineHandler *pHandler) PURE
 Registers an animation frame handler.
 
BOOL UnregisterTimelineHandler (ITimelineHandler *pHandler) PURE
 Unregisters an animation frame handler.
 
BOOL RegisterDragDrop (SWND swnd, IDropTarget *pDropTarget) PURE
 Registers an IDropTarget with a Swnd.
 
BOOL UnregisterDragDrop (SWND swnd) PURE
 Unregisters an IDropTarget from a Swnd.
 
BOOL OnFireEvent (IEvtArgs *evt) PURE
 Fires an event.
 
IMessageLoopGetMsgLoop () PURE
 Retrieves the current message loop.
 
IScriptModule * GetScriptModule () PURE
 Retrieves the script module.
 
HWND GetHostHwnd () PURE
 Retrieves the handle to the host window.
 
BOOL IsTranslucent () SCONST PURE
 Checks if the host window is translucent.
 
BOOL IsSendWheel2Hover () SCONST PURE
 Checks if mouseWheel messages are sent to the hover window.
 
int GetScale () SCONST PURE
 Retrieves the current DPI scale factor.
 
LPCWSTR GetTranslatorContext () SCONST PURE
 Retrieves the translation context.
 
void GetContainerRect (RECT *ret) SCONST PURE
 Retrieves the container's display rectangle.
 
void UpdateRegion (IRegionS *rgn) PURE
 Updates the specified region of the memory bitmap.
 
void OnRedraw (LPCRECT rc, BOOL bClip) PURE
 Requests a redraw of the specified area.
 
SWND OnGetSwndCapture () SCONST PURE
 Retrieves the Swnd object that has captured the mouse.
 
SWND OnSetSwndCapture (SWND swnd) PURE
 Sets the Swnd object to capture the mouse.
 
BOOL OnReleaseSwndCapture () PURE
 Releases the mouse capture from the Swnd object.
 
SWND GetHover () SCONST PURE
 Retrieves the Swnd object that is hovered over.
 
SWND GetFocus () SCONST PURE
 Retrieves the Swnd object that has focus.
 
void OnSetSwndFocus (SWND swnd) PURE
 Sets the focus to the specified Swnd object.
 
BOOL UpdateWindow (BOOL bForce=TRUE) PURE
 Requests an immediate update of the window.
 
void UpdateTooltip () PURE
 Requests an update of the tooltip.
 
void SetToolTip (LPCRECT rc, UINT tipAlign, LPCTSTR pszTip) PURE
 Displays a tooltip at the specified position.
 
void FrameToHost (RECT *rc) SCONST PURE
 Converts the rectangle coordinates of the current frame to the final host coordinates.
 
IAcceleratorMgrGetAcceleratorMgr () PURE
 Retrieves the accelerator manager.
 
BOOL RegisterTrackMouseEvent (SWND swnd) PURE
 Registers a Swnd as a TrackMouseEvent window.
 
BOOL UnregisterTrackMouseEvent (SWND swnd) PURE
 Unregisters a Swnd as a TrackMouseEvent window.
 
void MarkWndTreeZorderDirty () PURE
 Marks the window tree's z-order as dirty.
 
void BuildWndTreeZorder () PURE
 Rebuilds the window tree's z-order.
 
void EnableIME (BOOL bEnable) PURE
 Enables or disables the input method editor (IME).
 
void OnUpdateCursor () PURE
 Updates the cursor.
 
BOOL RegisterVideoCanvas (SWND swnd) PURE
 Registers a VideoCanvas window.
 
BOOL UnregisterVideoCanvas (SWND swnd) PURE
 Unregisters a VideoCanvas window.
 
void EnableHostPrivateUiDef (BOOL bEnable) PURE
 Enables or disables the host's private UI definitions.
 
BOOL PostTask (IRunnable *runable, BOOL bAsync=TRUE) PURE
 Posts a task to the message queue.
 
int RemoveTasksForObject (void *pObj) PURE
 Removes all tasks associated with an object.
 
- Public Member Functions inherited from ITimelineHandler
void OnNextFrame () PURE
 下一个动画帧处理接口
 

Static Public Member Functions

static void SetHideLocalUiDef (BOOL bHide)
 Sets whether to hide local UI definitions globally.
 
static void SetTaskQueueBufSize (int nBufSize)
 Sets the buffer size for asynchronous task queues.
 

Protected Member Functions

virtual void OnHostAnimationStarted (IAnimation *pAni)
 Called when the host window animation starts.
 
virtual void OnHostAnimationStoped (IAnimation *pAni)
 Called when the host window animation stops.
 
void _RedrawRegion (IRegionS *pRgn, CRect &rcInvalid)
 Redraws a specific region of the window.
 
void _Redraw ()
 Redraws the entire window.
 
void _RestoreClickState ()
 Restores the click state of the window.
 
void _Invalidate (LPCRECT prc)
 Invalidates a specific region of the window.
 
void _SetToolTipInfo (const SwndToolTipInfo *info, BOOL bNcTip)
 Sets tooltip information for the window.
 
void _Init ()
 Initializes the host window.
 
void _ExcludeVideoCanvasFromPaint (IRenderTarget *pRT)
 Excludes the video canvas from painting.
 
void _PaintVideoCanvasForeground (IRenderTarget *pRT)
 Paints the video canvas in the foreground.
 
void OnPrint (HDC dc, UINT uFlags=0)
 Handles the WM_PRINT message.
 
void OnPaint (HDC dc)
 Handles the WM_PAINT message.
 
BOOL OnEraseBkgnd (HDC dc)
 Handles the WM_ERASEBKGND message.
 
int OnCreate (LPCREATESTRUCT lpCreateStruct)
 Handles the WM_CREATE message.
 
void OnDestroy ()
 Handles the WM_DESTROY message.
 
void OnSize (UINT nType, CSize size)
 Handles the WM_SIZE message.
 
void OnMouseMove (UINT nFlags, CPoint point)
 Handles the WM_MOUSEMOVE message.
 
void OnMouseLeave ()
 Handles the WM_MOUSELEAVE message.
 
BOOL OnSetCursor (HWND hWnd, UINT nHitTest, UINT message)
 Handles the WM_SETCURSOR message.
 
void OnTimer (UINT_PTR idEvent)
 Handles the WM_TIMER message.
 
LRESULT OnMouseEvent (UINT uMsg, WPARAM wParam, LPARAM lParam)
 Handles mouse events.
 
LRESULT OnKeyEvent (UINT uMsg, WPARAM wParam, LPARAM lParam)
 Handles key events.
 
LRESULT OnActivateApp (UINT uMsg, WPARAM wParam, LPARAM lParam)
 Handles the WM_ACTIVATEAPP message.
 
BOOL OnMouseWheel (UINT nFlags, short zDelta, CPoint pt)
 Handles the WM_MOUSEWHEEL message.
 
void OnActivate (UINT nState, BOOL bMinimized, HWND wndOther)
 Handles the WM_ACTIVATE message.
 
void OnGetMinMaxInfo (LPMINMAXINFO lpMMI)
 Handles the WM_GETMINMAXINFO message.
 
void OnSetFocus (HWND wndOld)
 Handles the WM_SETFOCUS message.
 
void OnKillFocus (HWND wndFocus)
 Handles the WM_KILLFOCUS message.
 
void UpdatePresenter (HDC dc, IRenderTarget *pRT, LPCRECT rc, BYTE byAlpha=255, UINT uFlag=0)
 Updates the presenter.
 
void OnCaptureChanged (HWND wnd)
 Handles the WM_CAPTURECHANGED message.
 
LRESULT OnMenuExEvent (UINT uMsg, WPARAM wParam, LPARAM lParam)
 Handles custom menu events.
 
void OnWindowPosChanging (LPWINDOWPOS lpWndPos)
 Handles the WM_WINDOWPOSCHANGING message.
 
void OnWindowPosChanged (LPWINDOWPOS lpWndPos)
 Handles the WM_WINDOWPOSCHANGED message.
 
LRESULT OnGetObject (UINT uMsg, WPARAM wParam, LPARAM lParam)
 Handles the WM_GETOBJECT message.
 
void OnSysCommand (UINT nID, CPoint lParam)
 Handles the WM_SYSCOMMAND message.
 
void OnCommand (UINT uNotifyCode, int nID, HWND wndCtl)
 Handles the WM_COMMAND message.
 
virtual IToolTipCreateTooltip () const
 Creates a tooltip for the container.
 
virtual void DestroyTooltip (IToolTip *pTooltip) const
 Destroys the specified tooltip.
 
virtual BOOL OnLoadLayoutFromResourceID (SXmlDoc &xmlDoc)
 Loads the layout from a resource ID.
 
virtual SXmlNode OnGetInitXmlNode (SXmlDoc &xmlDoc)
 Gets the initial XML node.
 
virtual void OnUserXmlNode (SXmlNode xmlUser)
 Handles user-defined XML node.
 
virtual SRootWindowCreateRoot ()
 Creates the root window.
 
LRESULT OnSetLanguage (UINT uMsg, WPARAM wp, LPARAM lp)
 Handles the WM_SETLANGUAGE message.
 
LRESULT OnUpdateFont (UINT uMsg, WPARAM wp, LPARAM lp)
 Handles the WM_UPDATEFONT message.
 
LRESULT OnRunTasks (UINT uMsg, WPARAM wp, LPARAM lp)
 Handles the UM_RUN_TASKS message.
 
- Protected Member Functions inherited from SwndContainerImpl
BOOL RegisterDragDrop (SWND swnd, IDropTarget *pDropTarget) OVERRIDE
 Registers a drop target for a window.
 
BOOL UnregisterDragDrop (SWND swnd) OVERRIDE
 Unregisters a drop target for a window.
 
BOOL OnReleaseSwndCapture () OVERRIDE
 Releases the window capture.
 
SWND OnSetSwndCapture (SWND swnd) OVERRIDE
 Sets the window capture.
 
void OnSetSwndFocus (SWND swnd) OVERRIDE
 Sets the window focus.
 
void FrameToHost (RECT *rc) SCONST OVERRIDE
 Transforms a rectangle from frame coordinates to host coordinates.
 
SWND OnGetSwndCapture () SCONST OVERRIDE
 Retrieves the window handle that has capture.
 
SWND GetFocus () SCONST OVERRIDE
 Retrieves the window handle that has focus.
 
SWND GetHover () SCONST OVERRIDE
 Retrieves the window handle that is hovered.
 
IAcceleratorMgrGetAcceleratorMgr ()
 Retrieves the accelerator manager.
 
BOOL RegisterTimelineHandler (ITimelineHandler *pHandler) OVERRIDE
 Registers a timeline handler.
 
BOOL UnregisterTimelineHandler (ITimelineHandler *pHandler) OVERRIDE
 Unregisters a timeline handler.
 
BOOL RegisterTrackMouseEvent (SWND swnd) OVERRIDE
 Registers a window for tracking mouse events.
 
BOOL UnregisterTrackMouseEvent (SWND swnd) OVERRIDE
 Unregisters a window for tracking mouse events.
 
void MarkWndTreeZorderDirty () OVERRIDE
 Marks the window tree's z-order as dirty.
 
void BuildWndTreeZorder () OVERRIDE
 Rebuilds the window tree's z-order.
 
BOOL RegisterVideoCanvas (SWND swnd) OVERRIDE
 Registers a window as a video canvas.
 
BOOL UnregisterVideoCanvas (SWND swnd) OVERRIDE
 Unregisters a window as a video canvas.
 
void OnFrameMouseMove (UINT uFlag, CPoint pt)
 Handles mouse move events within the frame.
 
void OnFrameMouseLeave ()
 Handles mouse leave events within the frame.
 
BOOL OnFrameSetCursor (const CPoint &pt)
 Sets the cursor based on the mouse position.
 
void OnFrameMouseEvent (UINT uMsg, WPARAM wParam, LPARAM lParam)
 Handles mouse events within the frame.
 
void OnFrameMouseWheel (UINT uMsg, WPARAM wParam, LPARAM lParam)
 Handles mouse wheel events within the frame.
 
LRESULT OnFrameKeyEvent (UINT uMsg, WPARAM wParam, LPARAM lParam)
 Handles key events within the frame.
 
void OnFrameKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
 Handles key down events within the frame.
 
void OnActivate (UINT nState)
 Handles window activation events.
 
void OnActivateApp (BOOL bActive, DWORD dwThreadID)
 Handles application activation events.
 
void _BuildWndTreeZorder (IWindow *pWnd, UINT &iOrder)
 Recursively builds the z-order of the window tree.
 

Protected Attributes

SDummyWndm_dummyWnd
 
SHostWndAttr m_hostAttr
 
SStringT m_strXmlLayout
 
BOOL m_bTrackFlag
 
BOOL m_bNeedRepaint
 
BOOL m_bNeedAllRepaint
 
IToolTipm_pTipCtrl
 
SAutoRefPtr< IRegionSm_rgnInvalidate
 
SAutoRefPtr< IRenderTargetm_memRT
 
SAutoRefPtr< IUiDefInfom_privateUiDefInfo
 
int m_cEnableUiDefCount
 
SAutoRefPtr< IScriptModule > m_pScriptModule
 
SAutoRefPtr< SNcPainterm_pNcPainter
 
MSG m_msgMouse
 
CSize m_szAppSetted
 
CSize m_szPrev
 
int m_nAutoSizing
 
bool m_bResizing
 
SAutoRefPtr< IAnimation > m_hostAnimation
 
DWORD m_AniState
 
BOOL m_bFirstShow
 
tid_t m_dwThreadID
 
SRootWindowm_pRoot
 
EventHandlerInfo m_evtHandler
 
SAutoRefPtr< IHostPresenter > m_presenter
 
SCriticalSection m_cs
 
SList< IRunnable * > m_runnables
 
SCriticalSection m_csRunningQueue
 
SList< IRunnable * > m_runningQueue
 
IXmlNodem_xmlInit
 
SHostWnd::SHostAnimationHandler m_hostAnimationHandler
 
- Protected Attributes inherited from SwndContainerImpl
SWindowm_pRoot
 
SWND m_hCapture
 
SWND m_hHover
 
BOOL m_bNcHover
 
SFocusManager m_focusMgr
 
SDropTargetDispatcher m_dropTarget
 
BOOL m_bZorderDirty
 
SList< SWND > m_lstTrackMouseEvtWnd
 
SList< SWND > m_lstVideoCanvas
 
SAutoRefPtr< ICaret > m_caret
 
STimerlineHandlerMgr m_timelineHandlerMgr
 

Static Protected Attributes

static BOOL s_HideLocalUiDef = TRUE
 
static int s_TaskQueueBufSize = 5
 

Friends

class SDummyWnd
 
class SRootWindow
 
class SNcPainter
 

Detailed Description

The main host window class responsible for managing the layout, events, and rendering of SOUI windows.

This class acts as a container for SWindow objects and provides functionality for creating, destroying, and managing child windows. It also handles various Windows messages and animations.

Note
Inherits from TNativeWndProxy<IHostWnd> and SwndContainerImpl.

Definition at line 316 of file SHostWnd.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kPulseTimer 

SOUI timer ID (do not use in applications).

kPulseInterval 

Pulse interval in milliseconds.

kNcCheckTimer 

Timer ID for non-client area checks.

kNcCheckInterval 

Interval for non-client area checks in milliseconds.

kTaskTimer 

Timer ID for task execution.

kTaskInterval 

Interval for task execution in milliseconds.

Definition at line 395 of file SHostWnd.h.

Constructor & Destructor Documentation

◆ SHostWnd() [1/2]

SHostWnd::SHostWnd ( LPCWSTR pszResName = NULL)

Constructs a SHostWnd object with an optional resource name.

Parameters
pszResNameResource name for the layout (can be NULL).

Definition at line 313 of file shostwnd.cpp.

◆ SHostWnd() [2/2]

SHostWnd::SHostWnd ( LPCSTR pszResName)

Constructs a SHostWnd object with an optional resource name (ANSI version).

Parameters
pszResNameResource name for the layout (can be NULL).

Definition at line 320 of file shostwnd.cpp.

◆ ~SHostWnd()

SHostWnd::~SHostWnd ( )
virtual

Destructor for SHostWnd.

Definition at line 351 of file shostwnd.cpp.

Member Function Documentation

◆ _ExcludeVideoCanvasFromPaint()

void SHostWnd::_ExcludeVideoCanvasFromPaint ( IRenderTarget * pRT)
protected

Excludes the video canvas from painting.

Parameters
pRTRender target.

Definition at line 1987 of file shostwnd.cpp.

◆ _HandleEvent()

BOOL SHostWnd::_HandleEvent ( IEvtArgs * pEvt)
virtual

Handles an event.

Parameters
pEvtPointer to the event arguments.
Returns
TRUE if the event was handled, FALSE otherwise.

Reimplemented in SMenuEx.

Definition at line 1982 of file shostwnd.cpp.

◆ _Init()

void SHostWnd::_Init ( )
protected

Initializes the host window.

Definition at line 327 of file shostwnd.cpp.

◆ _Invalidate()

void SHostWnd::_Invalidate ( LPCRECT prc)
protected

Invalidates a specific region of the window.

Parameters
prcRectangle to invalidate.

Definition at line 1818 of file shostwnd.cpp.

◆ _PaintVideoCanvasForeground()

void SHostWnd::_PaintVideoCanvasForeground ( IRenderTarget * pRT)
protected

Paints the video canvas in the foreground.

Parameters
pRTRender target.

Definition at line 2003 of file shostwnd.cpp.

◆ _Redraw()

void SHostWnd::_Redraw ( )
protected

Redraws the entire window.

Definition at line 718 of file shostwnd.cpp.

◆ _RedrawRegion()

void SHostWnd::_RedrawRegion ( IRegionS * pRgn,
CRect & rcInvalid )
protected

Redraws a specific region of the window.

Parameters
pRgnRegion to redraw.
rcInvalidInvalid rectangle.

Definition at line 725 of file shostwnd.cpp.

◆ _RestoreClickState()

void SHostWnd::_RestoreClickState ( )
protected

Restores the click state of the window.

Definition at line 1797 of file shostwnd.cpp.

◆ _SetToolTipInfo()

void SHostWnd::_SetToolTipInfo ( const SwndToolTipInfo * info,
BOOL bNcTip )
protected

Sets tooltip information for the window.

Parameters
infoTooltip information.
bNcTipFlag indicating if the tooltip is for the non-client area.

Definition at line 1956 of file shostwnd.cpp.

◆ AnimateHostWindow()

BOOL SHostWnd::AnimateHostWindow ( DWORD dwTime,
DWORD dwFlags )

Animates the host window.

Parameters
dwTimeDuration of the animation in milliseconds.
dwFlagsAnimation flags.
Returns
TRUE if successful, FALSE otherwise.

Definition at line 1336 of file shostwnd.cpp.

◆ Create()

HWND SHostWnd::Create ( HWND hWndParent,
int x = 0,
int y = 0,
int nWidth = 0,
int nHeight = 0 )

Creates the host window.

Parameters
hWndParentHandle to the parent window.
xX position of the window (default: 0).
yY position of the window (default: 0).
nWidthWidth of the window (default: 0).
nHeightHeight of the window (default: 0).
Returns
Handle to the created window.

Definition at line 402 of file shostwnd.cpp.

◆ CreateEx()

HWND SHostWnd::CreateEx ( HWND hWndParent,
DWORD dwStyle,
DWORD dwExStyle,
int x,
int y,
int nWidth,
int nHeight,
IXmlNode * xmlInit = NULL )

Creates the host window with extended styles.

Parameters
hWndParentHandle to the parent window.
dwStyleWindow style.
dwExStyleExtended window style.
xX position of the window.
yY position of the window.
nWidthWidth of the window.
nHeightHeight of the window.
xmlInitOptional XML node for initialization.
Returns
Handle to the created window.

Definition at line 361 of file shostwnd.cpp.

◆ CreateRoot()

SRootWindow * SHostWnd::CreateRoot ( )
protectedvirtual

Creates the root window.

Returns
Pointer to the created root window.

Reimplemented in SMenuEx.

Definition at line 843 of file shostwnd.cpp.

◆ CreateTooltip()

IToolTip * SHostWnd::CreateTooltip ( ) const
protectedvirtual

Creates a tooltip for the container.

Returns
Pointer to the created tooltip.

Definition at line 817 of file shostwnd.cpp.

◆ DestroyTooltip()

void SHostWnd::DestroyTooltip ( IToolTip * pTooltip) const
protectedvirtual

Destroys the specified tooltip.

Parameters
pTooltipPointer to the tooltip to destroy.

Definition at line 822 of file shostwnd.cpp.

◆ DestroyWindow()

BOOL SHostWnd::DestroyWindow ( )

Destroys the host window.

Returns
TRUE if destruction succeeds, FALSE otherwise.

Implements INativeWnd.

Definition at line 1684 of file shostwnd.cpp.

◆ EnableDragDrop()

void SHostWnd::EnableDragDrop ( )

Enables drag-and-drop functionality for the host window.

Definition at line 2034 of file shostwnd.cpp.

◆ EnableHostPrivateUiDef()

void SHostWnd::EnableHostPrivateUiDef ( BOOL bEnable)

Enables or disables host private UI definitions.

Parameters
bEnableTRUE to enable, FALSE to disable.

Definition at line 2122 of file shostwnd.cpp.

◆ EnableIME()

void SHostWnd::EnableIME ( BOOL bEnable)

Enables or disables IME (Input Method Editor).

Parameters
bEnableTRUE to enable, FALSE to disable.

Definition at line 1894 of file shostwnd.cpp.

◆ EnablePrivateUiDef()

void SHostWnd::EnablePrivateUiDef ( BOOL bEnable)

Enables or disables private UI definitions for the host window.

Parameters
bEnableTRUE to enable, FALSE to disable.

Definition at line 424 of file shostwnd.cpp.

◆ FindChildByClass()

template<class T>
T * SHostWnd::FindChildByClass ( int nDeep = -1) const
inline

Finds a child window by its class.

Template Parameters
TType of the child window to find.
Parameters
nDeepDepth of the search (default: -1, search all levels).
Returns
Pointer to the found child window, or NULL if not found.

Definition at line 675 of file SHostWnd.h.

◆ FindChildByID()

SWindow * SHostWnd::FindChildByID ( int nID,
int nDeep = -1 )
inline

Finds a child window by its ID.

Parameters
nIDThe ID of the child window to find.
nDeepDepth of the search (default: -1, search all levels).
Returns
Pointer to the found child window, or NULL if not found.

Definition at line 648 of file SHostWnd.h.

◆ FindChildByID2()

template<class T>
T * SHostWnd::FindChildByID2 ( int nID,
int nDeep = -1 )
inline

Finds a child window by its ID with template support.

Template Parameters
TType of the child window to find.
Parameters
nIDThe ID of the child window to find.
nDeepDepth of the search (default: -1, search all levels).
Returns
Pointer to the found child window, or NULL if not found.

Definition at line 662 of file SHostWnd.h.

◆ FindChildByName() [1/2]

SWindow * SHostWnd::FindChildByName ( LPCSTR strName,
int nDeep = -1 )
inline

Finds a child window by its name (ANSI version).

Parameters
strNameThe name of the child window to find.
nDeepDepth of the search (default: -1, search all levels).
Returns
Pointer to the found child window, or NULL if not found.

Definition at line 608 of file SHostWnd.h.

◆ FindChildByName() [2/2]

SWindow * SHostWnd::FindChildByName ( LPCWSTR strName,
int nDeep = -1 )
inline

Finds a child window by its name (Unicode version).

Parameters
strNameThe name of the child window to find.
nDeepDepth of the search (default: -1, search all levels).
Returns
Pointer to the found child window, or NULL if not found.

Definition at line 596 of file SHostWnd.h.

◆ FindChildByName2() [1/2]

template<class T>
T * SHostWnd::FindChildByName2 ( LPCSTR pszName,
int nDeep = -1 )
inline

Finds a child window by its name (ANSI version) with template support.

Template Parameters
TType of the child window to find.
Parameters
pszNameThe name of the child window to find.
nDeepDepth of the search (default: -1, search all levels).
Returns
Pointer to the found child window, or NULL if not found.

Definition at line 636 of file SHostWnd.h.

◆ FindChildByName2() [2/2]

template<class T>
T * SHostWnd::FindChildByName2 ( LPCWSTR pszName,
int nDeep = -1 )
inline

Finds a child window by its name (Unicode version) with template support.

Template Parameters
TType of the child window to find.
Parameters
pszNameThe name of the child window to find.
nDeepDepth of the search (default: -1, search all levels).
Returns
Pointer to the found child window, or NULL if not found.

Definition at line 622 of file SHostWnd.h.

◆ FindIChildByID()

IWindow * SHostWnd::FindIChildByID ( int nId)
inline

Finds a child window by its ID.

Parameters
nIdThe ID of the child window to find.
Returns
Pointer to the found child window, or NULL if not found.

Definition at line 463 of file SHostWnd.h.

◆ FindIChildByName()

IWindow * SHostWnd::FindIChildByName ( LPCWSTR pszName)
inline

Finds a child window by its name (Unicode version).

Parameters
pszNameThe name of the child window to find.
Returns
Pointer to the found child window, or NULL if not found.

Definition at line 474 of file SHostWnd.h.

◆ FindIChildByNameA()

IWindow * SHostWnd::FindIChildByNameA ( LPCSTR pszName)
inline

Finds a child window by its name (ANSI version).

Parameters
pszNameThe name of the child window to find.
Returns
Pointer to the found child window, or NULL if not found.

Definition at line 485 of file SHostWnd.h.

◆ GetClientRect()

CRect SHostWnd::GetClientRect ( ) const

Gets the client rectangle.

Returns
Rectangle representing the client area's position and size.

Definition at line 1717 of file shostwnd.cpp.

◆ GetContainerRect()

void SHostWnd::GetContainerRect ( RECT * ret) const

Gets the rectangle of the container.

Parameters
retPointer to the rectangle to be filled.

Definition at line 1174 of file shostwnd.cpp.

◆ GetEventHandler()

EventHandlerInfo * SHostWnd::GetEventHandler ( )

Gets the event handler information for the host window.

Returns
Pointer to the event handler information.

Definition at line 1977 of file shostwnd.cpp.

◆ GetHostAttr()

SHostWndAttr & SHostWnd::GetHostAttr ( )
inline

Gets the host window attributes.

Returns
Reference to the host window attributes.

Definition at line 719 of file SHostWnd.h.

◆ GetHostHwnd()

HWND SHostWnd::GetHostHwnd ( )

Gets the handle to the host window.

Returns
Handle to the host window.

Definition at line 1179 of file shostwnd.cpp.

◆ GetIRoot()

IWindow * SHostWnd::GetIRoot ( )
inline

Gets the root window interface.

Returns
Pointer to the root window interface.

Definition at line 429 of file SHostWnd.h.

◆ GetMsgLoop()

IMessageLoop * SHostWnd::GetMsgLoop ( )

Gets the message loop interface.

Returns
Pointer to the message loop interface.

Definition at line 1563 of file shostwnd.cpp.

◆ GetNative()

SNativeWnd * SHostWnd::GetNative ( )
inline

Gets the native window interface.

Returns
Pointer to the native window interface.

Definition at line 695 of file SHostWnd.h.

◆ GetNcPainter()

INcPainter * SHostWnd::GetNcPainter ( )
inline

Gets the non-client area painter for the host window.

Returns
Pointer to the non-client area painter.

Definition at line 495 of file SHostWnd.h.

◆ GetPresenter()

IHostPresenter * SHostWnd::GetPresenter ( )

Gets the presenter interface for rendering.

Returns
Pointer to the presenter interface.

Definition at line 2024 of file shostwnd.cpp.

◆ GetRoot()

SWindow * SHostWnd::GetRoot ( ) const
inline

Gets the root window.

Returns
Pointer to the root window.

Definition at line 685 of file SHostWnd.h.

◆ GetScale()

int SHostWnd::GetScale ( ) const

Gets the scale factor for the container.

Returns
Scale factor.

Definition at line 1678 of file shostwnd.cpp.

◆ GetScriptModule()

IScriptModule * SHostWnd::GetScriptModule ( )

Gets the script module for the container.

Returns
Pointer to the script module.

Definition at line 1673 of file shostwnd.cpp.

◆ GetToolTip()

IToolTip * SHostWnd::GetToolTip ( ) const
inline

Gets the tooltip interface.

Returns
Pointer to the tooltip interface.

Definition at line 729 of file SHostWnd.h.

◆ GetTranslatorContext()

LPCWSTR SHostWnd::GetTranslatorContext ( ) const

Gets the translator context for the container.

Returns
Pointer to the translator context string.

Definition at line 1558 of file shostwnd.cpp.

◆ GetWindowRect()

CRect SHostWnd::GetWindowRect ( ) const

Gets the window rectangle.

Returns
Rectangle representing the window's position and size.

Definition at line 1710 of file shostwnd.cpp.

◆ InitFromXml()

BOOL SHostWnd::InitFromXml ( IXmlNode * pNode)

Initializes the host window from an XML node.

Parameters
pNodePointer to the XML node.
Returns
TRUE if initialization succeeds, FALSE otherwise.

Definition at line 440 of file shostwnd.cpp.

◆ IsSendWheel2Hover()

BOOL SHostWnd::IsSendWheel2Hover ( ) const

Checks if wheel messages are sent to the hover window.

Returns
TRUE if wheel messages are sent to the hover window, FALSE otherwise.

Definition at line 1234 of file shostwnd.cpp.

◆ IsTranslucent()

BOOL SHostWnd::IsTranslucent ( )

Checks if the host window is translucent.

Returns
TRUE if translucent, FALSE otherwise.

Definition at line 1229 of file shostwnd.cpp.

◆ OnActivate()

void SHostWnd::OnActivate ( UINT nState,
BOOL bMinimized,
HWND wndOther )
protected

Handles the WM_ACTIVATE message.

Parameters
nStateActivation state.
bMinimizedMinimized flag.
wndOtherOther window handle.

Definition at line 1126 of file shostwnd.cpp.

◆ OnActivateApp()

LRESULT SHostWnd::OnActivateApp ( UINT uMsg,
WPARAM wParam,
LPARAM lParam )
protected

Handles the WM_ACTIVATEAPP message.

Parameters
uMsgMessage identifier.
wParamWPARAM.
lParamLPARAM.
Returns
LRESULT.

Definition at line 1113 of file shostwnd.cpp.

◆ OnCaptureChanged()

void SHostWnd::OnCaptureChanged ( HWND wnd)
protected

Handles the WM_CAPTURECHANGED message.

Parameters
wndNew capture window handle.

Definition at line 1657 of file shostwnd.cpp.

◆ OnCommand()

void SHostWnd::OnCommand ( UINT uNotifyCode,
int nID,
HWND wndCtl )
protected

Handles the WM_COMMAND message.

Parameters
uNotifyCodeNotification code.
nIDControl ID.
wndCtlControl window handle.

Definition at line 2089 of file shostwnd.cpp.

◆ OnCreate()

int SHostWnd::OnCreate ( LPCREATESTRUCT lpCreateStruct)
protected

Handles the WM_CREATE message.

Parameters
lpCreateStructCreate structure.
Returns
0 on success, non-zero on failure.

Definition at line 848 of file shostwnd.cpp.

◆ OnDestroy()

void SHostWnd::OnDestroy ( )
protected

Handles the WM_DESTROY message.

Definition at line 901 of file shostwnd.cpp.

◆ OnEraseBkgnd()

BOOL SHostWnd::OnEraseBkgnd ( HDC dc)
protected

Handles the WM_ERASEBKGND message.

Parameters
dcDevice context.
Returns
TRUE if the background is erased, FALSE otherwise.

Definition at line 812 of file shostwnd.cpp.

◆ OnFireEvent()

BOOL SHostWnd::OnFireEvent ( IEvtArgs * evt)

Fires an event in the container.

Parameters
evtPointer to the event arguments.
Returns
TRUE if the event was handled, FALSE otherwise.

Definition at line 1139 of file shostwnd.cpp.

◆ OnGetInitXmlNode()

SXmlNode SHostWnd::OnGetInitXmlNode ( SXmlDoc & xmlDoc)
protectedvirtual

Gets the initial XML node.

Parameters
xmlDocXML document.
Returns
Initial XML node.

Reimplemented in SMessageBoxImpl.

Definition at line 827 of file shostwnd.cpp.

◆ OnGetMinMaxInfo()

void SHostWnd::OnGetMinMaxInfo ( LPMINMAXINFO lpMMI)
protected

Handles the WM_GETMINMAXINFO message.

Parameters
lpMMIMin-max information.

Definition at line 1295 of file shostwnd.cpp.

◆ OnGetObject()

LRESULT SHostWnd::OnGetObject ( UINT uMsg,
WPARAM wParam,
LPARAM lParam )
protected

Handles the WM_GETOBJECT message.

Parameters
uMsgMessage identifier.
wParamWPARAM.
lParamLPARAM.
Returns
LRESULT.

Definition at line 1769 of file shostwnd.cpp.

◆ OnHostAnimationStarted()

void SHostWnd::OnHostAnimationStarted ( IAnimation * pAni)
protectedvirtual

Called when the host window animation starts.

Parameters
pAniPointer to the animation object.

Definition at line 1932 of file shostwnd.cpp.

◆ OnHostAnimationStoped()

void SHostWnd::OnHostAnimationStoped ( IAnimation * pAni)
protectedvirtual

Called when the host window animation stops.

Parameters
pAniPointer to the animation object.

Definition at line 1936 of file shostwnd.cpp.

◆ OnKeyEvent()

LRESULT SHostWnd::OnKeyEvent ( UINT uMsg,
WPARAM wParam,
LPARAM lParam )
protected

Handles key events.

Parameters
uMsgMessage identifier.
wParamWPARAM.
lParamLPARAM.
Returns
LRESULT.

Definition at line 1097 of file shostwnd.cpp.

◆ OnKillFocus()

void SHostWnd::OnKillFocus ( HWND wndFocus)
protected

Handles the WM_KILLFOCUS message.

Parameters
wndFocusNew focus window handle.

Definition at line 1326 of file shostwnd.cpp.

◆ OnLoadLayoutFromResourceID()

BOOL SHostWnd::OnLoadLayoutFromResourceID ( SXmlDoc & xmlDoc)
protectedvirtual

Loads the layout from a resource ID.

Parameters
xmlDocXML document.
Returns
TRUE if the layout was loaded successfully, FALSE otherwise.

Reimplemented in SMenuEx.

Definition at line 833 of file shostwnd.cpp.

◆ OnMenuExEvent()

LRESULT SHostWnd::OnMenuExEvent ( UINT uMsg,
WPARAM wParam,
LPARAM lParam )
protected

Handles custom menu events.

Parameters
uMsgMessage identifier.
wParamWPARAM.
lParamLPARAM.
Returns
LRESULT.

Definition at line 1724 of file shostwnd.cpp.

◆ OnMouseEvent()

LRESULT SHostWnd::OnMouseEvent ( UINT uMsg,
WPARAM wParam,
LPARAM lParam )
protected

Handles mouse events.

Parameters
uMsgMessage identifier.
wParamWPARAM.
lParamLPARAM.
Returns
LRESULT.

Definition at line 1050 of file shostwnd.cpp.

◆ OnMouseLeave()

void SHostWnd::OnMouseLeave ( )
protected

Handles the WM_MOUSELEAVE message.

Definition at line 992 of file shostwnd.cpp.

◆ OnMouseMove()

void SHostWnd::OnMouseMove ( UINT nFlags,
CPoint point )
protected

Handles the WM_MOUSEMOVE message.

Parameters
nFlagsMouse flags.
pointMouse position.

Definition at line 978 of file shostwnd.cpp.

◆ OnMouseWheel()

BOOL SHostWnd::OnMouseWheel ( UINT nFlags,
short zDelta,
CPoint pt )
protected

Handles the WM_MOUSEWHEEL message.

Parameters
nFlagsMouse flags.
zDeltaWheel delta.
ptMouse position.
Returns
TRUE if handled, FALSE otherwise.

Definition at line 1120 of file shostwnd.cpp.

◆ OnPaint()

void SHostWnd::OnPaint ( HDC dc)
protected

Handles the WM_PAINT message.

Parameters
dcDevice context.

Definition at line 800 of file shostwnd.cpp.

◆ OnPrint()

void SHostWnd::OnPrint ( HDC dc,
UINT uFlags = 0 )
protected

Handles the WM_PRINT message.

Parameters
dcDevice context.
uFlagsPrint flags.

Definition at line 761 of file shostwnd.cpp.

◆ OnRedraw()

void SHostWnd::OnRedraw ( LPCRECT rc,
BOOL bClip )

Redraws the specified rectangle in the container.

Parameters
rcPointer to the rectangle to redraw.
bClipFlag indicating whether to clip the redraw.

Definition at line 1191 of file shostwnd.cpp.

◆ OnReleaseSwndCapture()

BOOL SHostWnd::OnReleaseSwndCapture ( )

Releases the capture from the container.

Returns
TRUE if the capture was released, FALSE otherwise.

Definition at line 1210 of file shostwnd.cpp.

◆ onRootResize()

BOOL SHostWnd::onRootResize ( IEvtArgs * e)
virtual

Handles the resize event of the root window.

Parameters
ePointer to the event arguments.
Returns
TRUE if the event was handled, FALSE otherwise.

Definition at line 410 of file shostwnd.cpp.

◆ OnRunTasks()

LRESULT SHostWnd::OnRunTasks ( UINT uMsg,
WPARAM wp,
LPARAM lp )
protected

Handles the UM_RUN_TASKS message.

Parameters
uMsgMessage identifier.
wpWPARAM.
lpLPARAM.
Returns
LRESULT.

Definition at line 2182 of file shostwnd.cpp.

◆ OnSetCursor()

BOOL SHostWnd::OnSetCursor ( HWND hWnd,
UINT nHitTest,
UINT message )
protected

Handles the WM_SETCURSOR message.

Parameters
hWndHandle to the window.
nHitTestHit test code.
messageMessage identifier.
Returns
TRUE if the cursor is set, FALSE otherwise.

Definition at line 998 of file shostwnd.cpp.

◆ OnSetFocus()

void SHostWnd::OnSetFocus ( HWND wndOld)
protected

Handles the WM_SETFOCUS message.

Parameters
wndOldPrevious window handle.

Definition at line 1321 of file shostwnd.cpp.

◆ OnSetLanguage()

LRESULT SHostWnd::OnSetLanguage ( UINT uMsg,
WPARAM wp,
LPARAM lp )
protected

Handles the WM_SETLANGUAGE message.

Parameters
uMsgMessage identifier.
wpWPARAM.
lpLPARAM.
Returns
LRESULT.

Definition at line 2201 of file shostwnd.cpp.

◆ OnSetSwndCapture()

SWND SHostWnd::OnSetSwndCapture ( SWND swnd)

Sets the capture to the specified window.

Parameters
swndHandle to the window to capture.
Returns
Handle to the previously captured window.

Definition at line 1223 of file shostwnd.cpp.

◆ OnSize()

void SHostWnd::OnSize ( UINT nType,
CSize size )
protected

Handles the WM_SIZE message.

Parameters
nTypeSize type.
sizeNew size of the window.

Definition at line 948 of file shostwnd.cpp.

◆ OnSysCommand()

void SHostWnd::OnSysCommand ( UINT nID,
CPoint lParam )
protected

Handles the WM_SYSCOMMAND message.

Parameters
nIDSystem command identifier.
lParamLPARAM.

Definition at line 1941 of file shostwnd.cpp.

◆ OnTimer()

void SHostWnd::OnTimer ( UINT_PTR idEvent)
protected

Handles the WM_TIMER message.

Parameters
idEventTimer identifier.

Definition at line 1012 of file shostwnd.cpp.

◆ OnUpdateCursor()

void SHostWnd::OnUpdateCursor ( )

Updates the cursor for the container.

Definition at line 1916 of file shostwnd.cpp.

◆ OnUpdateFont()

LRESULT SHostWnd::OnUpdateFont ( UINT uMsg,
WPARAM wp,
LPARAM lp )
protected

Handles the WM_UPDATEFONT message.

Parameters
uMsgMessage identifier.
wpWPARAM.
lpLPARAM.
Returns
LRESULT.

Definition at line 2113 of file shostwnd.cpp.

◆ OnUserXmlNode()

void SHostWnd::OnUserXmlNode ( SXmlNode xmlUser)
protectedvirtual

Handles user-defined XML node.

Parameters
xmlUserUser-defined XML node.

Definition at line 1881 of file shostwnd.cpp.

◆ OnWindowPosChanged()

void SHostWnd::OnWindowPosChanged ( LPWINDOWPOS lpWndPos)
protected

Handles the WM_WINDOWPOSCHANGED message.

Parameters
lpWndPosWindow position structure.

Definition at line 1743 of file shostwnd.cpp.

◆ OnWindowPosChanging()

void SHostWnd::OnWindowPosChanging ( LPWINDOWPOS lpWndPos)
protected

Handles the WM_WINDOWPOSCHANGING message.

Parameters
lpWndPosWindow position structure.

Definition at line 1729 of file shostwnd.cpp.

◆ PostTask()

BOOL SHostWnd::PostTask ( IRunnable * runable,
BOOL bAsync = TRUE )

Posts a task to the container.

Parameters
runablePointer to the runnable task.
bAsyncFlag indicating whether the task should be run asynchronously.
Returns
TRUE if the task was posted, FALSE otherwise.

Definition at line 2127 of file shostwnd.cpp.

◆ RegisterTimelineHandler()

BOOL SHostWnd::RegisterTimelineHandler ( ITimelineHandler * pHandler)

Registers a timeline handler.

Parameters
pHandlerPointer to the timeline handler.
Returns
TRUE if the handler was registered, FALSE otherwise.

Definition at line 1534 of file shostwnd.cpp.

◆ RemoveTasksForObject()

int SHostWnd::RemoveTasksForObject ( void * pObj)

Removes tasks for the specified object.

Parameters
pObjPointer to the object.
Returns
Number of tasks removed.

Definition at line 2150 of file shostwnd.cpp.

◆ SetEventHandler()

void SHostWnd::SetEventHandler ( FunCallback fun,
void * ctx )

Sets the event handler for the host window.

Parameters
funCallback function for handling events.
ctxContext pointer passed to the callback function.

Definition at line 1971 of file shostwnd.cpp.

◆ SetHideLocalUiDef()

void SHostWnd::SetHideLocalUiDef ( BOOL bHide)
static

Sets whether to hide local UI definitions globally.

Parameters
bHideTRUE to hide, FALSE otherwise.

Definition at line 303 of file shostwnd.cpp.

◆ SetLayoutId()

void SHostWnd::SetLayoutId ( LPCTSTR pszLayoutId)
inline

Sets the layout ID for the host window.

Parameters
pszLayoutIdLayout resource identifier.

Definition at line 421 of file SHostWnd.h.

◆ SetPresenter()

void SHostWnd::SetPresenter ( IHostPresenter * pPresenter)

Sets the presenter for rendering.

Parameters
pPresenterPointer to the presenter interface.

Definition at line 2029 of file shostwnd.cpp.

◆ SetScale()

void SHostWnd::SetScale ( int nScale,
LPCRECT pDestRect )

Sets the scale factor for the host window.

Parameters
nScaleScale factor.
pDestRectDestination rectangle.

Definition at line 2102 of file shostwnd.cpp.

◆ SetTaskQueueBufSize()

void SHostWnd::SetTaskQueueBufSize ( int nBufSize)
static

Sets the buffer size for asynchronous task queues.

Parameters
nBufSizeBuffer size for task queues.

Definition at line 308 of file shostwnd.cpp.

◆ SetToolTip()

void SHostWnd::SetToolTip ( LPCRECT rc,
UINT tipAlign,
LPCTSTR pszTip )

Sets the tooltip for the container.

Parameters
rcRectangle for the tooltip.
tipAlignAlignment of the tooltip.
pszTipTooltip text.

Definition at line 1281 of file shostwnd.cpp.

◆ ShowHostWnd()

void SHostWnd::ShowHostWnd ( int uShowCmd,
BOOL bWaitAniDone )

Shows the host window with optional animation.

Parameters
uShowCmdCommand to show the window.
bWaitAniDoneWait for the animation to complete before returning.

Definition at line 2039 of file shostwnd.cpp.

◆ ShowWindow()

BOOL SHostWnd::ShowWindow ( int nCmdShow)

Shows or hides the host window.

Parameters
nCmdShowCommand to show or hide the window.
Returns
TRUE if successful, FALSE otherwise.

Implements INativeWnd.

Definition at line 1924 of file shostwnd.cpp.

◆ StartHostAnimation()

bool SHostWnd::StartHostAnimation ( IAnimation * pAni)

Starts an animation for the host window.

Parameters
pAniPointer to the animation object.
Returns
TRUE if successful, FALSE otherwise.

Definition at line 1840 of file shostwnd.cpp.

◆ StopHostAnimation()

bool SHostWnd::StopHostAnimation ( )

Stops the current animation for the host window.

Returns
TRUE if successful, FALSE otherwise.

Definition at line 1872 of file shostwnd.cpp.

◆ UnregisterTimelineHandler()

BOOL SHostWnd::UnregisterTimelineHandler ( ITimelineHandler * pHandler)

Unregisters a timeline handler.

Parameters
pHandlerPointer to the timeline handler.
Returns
TRUE if the handler was unregistered, FALSE otherwise.

Definition at line 1546 of file shostwnd.cpp.

◆ UpdateAutoSizeCount()

void SHostWnd::UpdateAutoSizeCount ( bool bInc)

Updates the auto-size count.

Parameters
bIncTRUE to increment, FALSE to decrement.

Definition at line 1886 of file shostwnd.cpp.

◆ UpdatePresenter()

void SHostWnd::UpdatePresenter ( HDC dc,
IRenderTarget * pRT,
LPCRECT rc,
BYTE byAlpha = 255,
UINT uFlag = 0 )
protected

Updates the presenter.

Parameters
dcDevice context.
pRTRender target.
rcRectangle.
byAlphaAlpha value.
uFlagFlags.

Definition at line 1184 of file shostwnd.cpp.

◆ UpdateRegion()

void SHostWnd::UpdateRegion ( IRegionS * rgn)

Updates the specified region in the container.

Parameters
rgnPointer to the region to update.

Definition at line 1203 of file shostwnd.cpp.

◆ UpdateTooltip()

void SHostWnd::UpdateTooltip ( )

Updates the tooltip for the container.

Definition at line 1252 of file shostwnd.cpp.

◆ UpdateWindow()

BOOL SHostWnd::UpdateWindow ( BOOL bForce = TRUE)

Updates the window.

Parameters
bForceFlag indicating whether to force the update.
Returns
TRUE if the update was successful, FALSE otherwise.

Definition at line 1239 of file shostwnd.cpp.

Friends And Related Symbol Documentation

◆ SDummyWnd

friend class SDummyWnd
friend

Friend class used for handling WM_PAINT messages in translucent windows.

Definition at line 319 of file SHostWnd.h.

◆ SNcPainter

friend class SNcPainter
friend

Friend class for non-client area painting.

Definition at line 321 of file SHostWnd.h.

◆ SRootWindow

friend class SRootWindow
friend

Friend class representing the root window.

Definition at line 320 of file SHostWnd.h.

Member Data Documentation

◆ m_AniState

DWORD SHostWnd::m_AniState
protected

Animation state.

Definition at line 348 of file SHostWnd.h.

◆ m_bFirstShow

BOOL SHostWnd::m_bFirstShow
protected

Indicates if it's the first time the window is shown.

Definition at line 349 of file SHostWnd.h.

◆ m_bNeedAllRepaint

BOOL SHostWnd::m_bNeedAllRepaint
protected

Indicates if a full repaint is required.

Definition at line 330 of file SHostWnd.h.

◆ m_bNeedRepaint

BOOL SHostWnd::m_bNeedRepaint
protected

Indicates if a repaint is required.

Definition at line 329 of file SHostWnd.h.

◆ m_bResizing

bool SHostWnd::m_bResizing
protected

Indicates if resizing is in progress.

Definition at line 345 of file SHostWnd.h.

◆ m_bTrackFlag

BOOL SHostWnd::m_bTrackFlag
protected

Mouse tracking flag.

Definition at line 328 of file SHostWnd.h.

◆ m_cEnableUiDefCount

int SHostWnd::m_cEnableUiDefCount
protected

Count of enabled local UI definitions.

Definition at line 337 of file SHostWnd.h.

◆ m_cs

SCriticalSection SHostWnd::m_cs
protected

Critical section for thread synchronization.

Definition at line 356 of file SHostWnd.h.

◆ m_csRunningQueue

SCriticalSection SHostWnd::m_csRunningQueue
protected

Critical section for running queue synchronization.

Definition at line 358 of file SHostWnd.h.

◆ m_dummyWnd

SDummyWnd* SHostWnd::m_dummyWnd
protected

A dummy window used to handle WM_PAINT messages for translucent windows.

Definition at line 324 of file SHostWnd.h.

◆ m_dwThreadID

tid_t SHostWnd::m_dwThreadID
protected

Thread ID.

Definition at line 350 of file SHostWnd.h.

◆ m_evtHandler

EventHandlerInfo SHostWnd::m_evtHandler
protected

Event handler information.

Definition at line 353 of file SHostWnd.h.

◆ m_hostAnimation

SAutoRefPtr<IAnimation> SHostWnd::m_hostAnimation
protected

Host animation object.

Definition at line 347 of file SHostWnd.h.

◆ m_hostAttr

SHostWndAttr SHostWnd::m_hostAttr
protected

Host attributes corresponding to the SOUI node in XML.

Definition at line 325 of file SHostWnd.h.

◆ m_memRT

SAutoRefPtr<IRenderTarget> SHostWnd::m_memRT
protected

Rendering cache.

Definition at line 335 of file SHostWnd.h.

◆ m_msgMouse

MSG SHostWnd::m_msgMouse
protected

Last mouse press message.

Definition at line 341 of file SHostWnd.h.

◆ m_nAutoSizing

int SHostWnd::m_nAutoSizing
protected

Auto-sizing trigger count for WM_SIZE messages.

Definition at line 344 of file SHostWnd.h.

◆ m_pNcPainter

SAutoRefPtr<SNcPainter> SHostWnd::m_pNcPainter
protected

Non-client area painter.

Definition at line 339 of file SHostWnd.h.

◆ m_presenter

SAutoRefPtr<IHostPresenter> SHostWnd::m_presenter
protected

Presenter for rendering.

Definition at line 354 of file SHostWnd.h.

◆ m_privateUiDefInfo

SAutoRefPtr<IUiDefInfo> SHostWnd::m_privateUiDefInfo
protected

Local UI definition information.

Definition at line 336 of file SHostWnd.h.

◆ m_pRoot

SRootWindow* SHostWnd::m_pRoot
protected

Pointer to the root window.

Definition at line 351 of file SHostWnd.h.

◆ m_pScriptModule

SAutoRefPtr<IScriptModule> SHostWnd::m_pScriptModule
protected

Script module for executing scripts.

Definition at line 338 of file SHostWnd.h.

◆ m_pTipCtrl

IToolTip* SHostWnd::m_pTipCtrl
protected

Interface for tooltip control.

Definition at line 332 of file SHostWnd.h.

◆ m_rgnInvalidate

SAutoRefPtr<IRegionS> SHostWnd::m_rgnInvalidate
protected

Invalid region requiring redraw.

Definition at line 334 of file SHostWnd.h.

◆ m_runnables

SList<IRunnable *> SHostWnd::m_runnables
protected

List of runnable tasks.

Definition at line 357 of file SHostWnd.h.

◆ m_runningQueue

SList<IRunnable *> SHostWnd::m_runningQueue
protected

Queue of currently running tasks.

Definition at line 359 of file SHostWnd.h.

◆ m_strXmlLayout

SStringT SHostWnd::m_strXmlLayout
protected

Layout resource name (e.g., xml:main_wnd).

Definition at line 326 of file SHostWnd.h.

◆ m_szAppSetted

CSize SHostWnd::m_szAppSetted
protected

Window size set by the application layer.

Definition at line 342 of file SHostWnd.h.

◆ m_szPrev

CSize SHostWnd::m_szPrev
protected

Previous window size.

Definition at line 343 of file SHostWnd.h.

◆ m_xmlInit

IXmlNode* SHostWnd::m_xmlInit
protected

Initial XML node.

Definition at line 360 of file SHostWnd.h.

◆ s_HideLocalUiDef

BOOL SHostWnd::s_HideLocalUiDef = TRUE
staticprotected

Global flag to hide local UI definitions.

Definition at line 361 of file SHostWnd.h.

◆ s_TaskQueueBufSize

int SHostWnd::s_TaskQueueBufSize = 5
staticprotected

Buffer size for asynchronous task queues (default: 5).

Definition at line 362 of file SHostWnd.h.


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