The main host window class responsible for managing the layout, events, and rendering of SOUI windows. More...
#include <SHostWnd.h>
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. | |
IMessageLoop * | GetMsgLoop () 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. | |
SWindow * | FindChildByName (LPCWSTR strName, int nDeep=-1) |
Finds a child window by its name (Unicode version). | |
SWindow * | FindChildByName (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. | |
SWindow * | FindChildByID (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. | |
SWindow * | GetRoot () const |
Gets the root window. | |
SNativeWnd * | GetNative () |
Gets the native window interface. | |
CRect | GetWindowRect () const |
Gets the window rectangle. | |
CRect | GetClientRect () const |
Gets the client rectangle. | |
SHostWndAttr & | GetHostAttr () |
Gets the host window attributes. | |
IToolTip * | GetToolTip () 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. | |
![]() | |
SwndContainerImpl () | |
Constructor. | |
IDropTarget * | GetDropTarget () |
Retrieves the drop target. | |
SFocusManager * | GetFocusManager () |
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. | |
![]() | |
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. | |
IMessageLoop * | GetMsgLoop () 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. | |
IAcceleratorMgr * | GetAcceleratorMgr () 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. | |
![]() | |
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 IToolTip * | CreateTooltip () 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 SRootWindow * | CreateRoot () |
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. | |
![]() | |
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. | |
IAcceleratorMgr * | GetAcceleratorMgr () |
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. | |
Static Protected Attributes | |
static BOOL | s_HideLocalUiDef = TRUE |
static int | s_TaskQueueBufSize = 5 |
Friends | |
class | SDummyWnd |
class | SRootWindow |
class | SNcPainter |
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.
Definition at line 316 of file SHostWnd.h.
anonymous enum |
Definition at line 395 of file SHostWnd.h.
SHostWnd::SHostWnd | ( | LPCWSTR | pszResName = NULL | ) |
Constructs a SHostWnd object with an optional resource name.
pszResName | Resource name for the layout (can be NULL). |
Definition at line 313 of file shostwnd.cpp.
SHostWnd::SHostWnd | ( | LPCSTR | pszResName | ) |
Constructs a SHostWnd object with an optional resource name (ANSI version).
pszResName | Resource name for the layout (can be NULL). |
Definition at line 320 of file shostwnd.cpp.
|
virtual |
Destructor for SHostWnd.
Definition at line 351 of file shostwnd.cpp.
|
protected |
Excludes the video canvas from painting.
pRT | Render target. |
Definition at line 1987 of file shostwnd.cpp.
|
virtual |
Handles an event.
pEvt | Pointer to the event arguments. |
Reimplemented in SMenuEx.
Definition at line 1982 of file shostwnd.cpp.
|
protected |
Initializes the host window.
Definition at line 327 of file shostwnd.cpp.
|
protected |
Invalidates a specific region of the window.
prc | Rectangle to invalidate. |
Definition at line 1818 of file shostwnd.cpp.
|
protected |
Paints the video canvas in the foreground.
pRT | Render target. |
Definition at line 2003 of file shostwnd.cpp.
|
protected |
Redraws the entire window.
Definition at line 718 of file shostwnd.cpp.
|
protected |
Redraws a specific region of the window.
pRgn | Region to redraw. |
rcInvalid | Invalid rectangle. |
Definition at line 725 of file shostwnd.cpp.
|
protected |
Restores the click state of the window.
Definition at line 1797 of file shostwnd.cpp.
|
protected |
Sets tooltip information for the window.
info | Tooltip information. |
bNcTip | Flag indicating if the tooltip is for the non-client area. |
Definition at line 1956 of file shostwnd.cpp.
BOOL SHostWnd::AnimateHostWindow | ( | DWORD | dwTime, |
DWORD | dwFlags ) |
Animates the host window.
dwTime | Duration of the animation in milliseconds. |
dwFlags | Animation flags. |
Definition at line 1336 of file shostwnd.cpp.
HWND SHostWnd::Create | ( | HWND | hWndParent, |
int | x = 0, | ||
int | y = 0, | ||
int | nWidth = 0, | ||
int | nHeight = 0 ) |
Creates the host window.
hWndParent | Handle to the parent window. |
x | X position of the window (default: 0). |
y | Y position of the window (default: 0). |
nWidth | Width of the window (default: 0). |
nHeight | Height of the window (default: 0). |
Definition at line 402 of file shostwnd.cpp.
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.
hWndParent | Handle to the parent window. |
dwStyle | Window style. |
dwExStyle | Extended window style. |
x | X position of the window. |
y | Y position of the window. |
nWidth | Width of the window. |
nHeight | Height of the window. |
xmlInit | Optional XML node for initialization. |
Definition at line 361 of file shostwnd.cpp.
|
protectedvirtual |
Creates the root window.
Reimplemented in SMenuEx.
Definition at line 843 of file shostwnd.cpp.
|
protectedvirtual |
Creates a tooltip for the container.
Definition at line 817 of file shostwnd.cpp.
|
protectedvirtual |
Destroys the specified tooltip.
pTooltip | Pointer to the tooltip to destroy. |
Definition at line 822 of file shostwnd.cpp.
BOOL SHostWnd::DestroyWindow | ( | ) |
Destroys the host window.
Implements INativeWnd.
Definition at line 1684 of file shostwnd.cpp.
void SHostWnd::EnableDragDrop | ( | ) |
Enables drag-and-drop functionality for the host window.
Definition at line 2034 of file shostwnd.cpp.
void SHostWnd::EnableHostPrivateUiDef | ( | BOOL | bEnable | ) |
Enables or disables host private UI definitions.
bEnable | TRUE to enable, FALSE to disable. |
Definition at line 2122 of file shostwnd.cpp.
void SHostWnd::EnableIME | ( | BOOL | bEnable | ) |
Enables or disables IME (Input Method Editor).
bEnable | TRUE to enable, FALSE to disable. |
Definition at line 1894 of file shostwnd.cpp.
void SHostWnd::EnablePrivateUiDef | ( | BOOL | bEnable | ) |
Enables or disables private UI definitions for the host window.
bEnable | TRUE to enable, FALSE to disable. |
Definition at line 424 of file shostwnd.cpp.
|
inline |
Finds a child window by its class.
T | Type of the child window to find. |
nDeep | Depth of the search (default: -1, search all levels). |
Definition at line 675 of file SHostWnd.h.
|
inline |
Finds a child window by its ID.
nID | The ID of the child window to find. |
nDeep | Depth of the search (default: -1, search all levels). |
Definition at line 648 of file SHostWnd.h.
|
inline |
Finds a child window by its ID with template support.
T | Type of the child window to find. |
nID | The ID of the child window to find. |
nDeep | Depth of the search (default: -1, search all levels). |
Definition at line 662 of file SHostWnd.h.
|
inline |
Finds a child window by its name (ANSI version).
strName | The name of the child window to find. |
nDeep | Depth of the search (default: -1, search all levels). |
Definition at line 608 of file SHostWnd.h.
|
inline |
Finds a child window by its name (Unicode version).
strName | The name of the child window to find. |
nDeep | Depth of the search (default: -1, search all levels). |
Definition at line 596 of file SHostWnd.h.
|
inline |
Finds a child window by its name (ANSI version) with template support.
T | Type of the child window to find. |
pszName | The name of the child window to find. |
nDeep | Depth of the search (default: -1, search all levels). |
Definition at line 636 of file SHostWnd.h.
|
inline |
Finds a child window by its name (Unicode version) with template support.
T | Type of the child window to find. |
pszName | The name of the child window to find. |
nDeep | Depth of the search (default: -1, search all levels). |
Definition at line 622 of file SHostWnd.h.
|
inline |
Finds a child window by its ID.
nId | The ID of the child window to find. |
Definition at line 463 of file SHostWnd.h.
|
inline |
Finds a child window by its name (Unicode version).
pszName | The name of the child window to find. |
Definition at line 474 of file SHostWnd.h.
|
inline |
Finds a child window by its name (ANSI version).
pszName | The name of the child window to find. |
Definition at line 485 of file SHostWnd.h.
CRect SHostWnd::GetClientRect | ( | ) | const |
Gets the client rectangle.
Definition at line 1717 of file shostwnd.cpp.
void SHostWnd::GetContainerRect | ( | RECT * | ret | ) | const |
Gets the rectangle of the container.
ret | Pointer to the rectangle to be filled. |
Definition at line 1174 of file shostwnd.cpp.
EventHandlerInfo * SHostWnd::GetEventHandler | ( | ) |
Gets the event handler information for the host window.
Definition at line 1977 of file shostwnd.cpp.
|
inline |
Gets the host window attributes.
Definition at line 719 of file SHostWnd.h.
HWND SHostWnd::GetHostHwnd | ( | ) |
Gets the handle to the host window.
Definition at line 1179 of file shostwnd.cpp.
|
inline |
Gets the root window interface.
Definition at line 429 of file SHostWnd.h.
IMessageLoop * SHostWnd::GetMsgLoop | ( | ) |
Gets the message loop interface.
Definition at line 1563 of file shostwnd.cpp.
|
inline |
Gets the native window interface.
Definition at line 695 of file SHostWnd.h.
|
inline |
Gets the non-client area painter for the host window.
Definition at line 495 of file SHostWnd.h.
IHostPresenter * SHostWnd::GetPresenter | ( | ) |
Gets the presenter interface for rendering.
Definition at line 2024 of file shostwnd.cpp.
|
inline |
int SHostWnd::GetScale | ( | ) | const |
Gets the scale factor for the container.
Definition at line 1678 of file shostwnd.cpp.
IScriptModule * SHostWnd::GetScriptModule | ( | ) |
Gets the script module for the container.
Definition at line 1673 of file shostwnd.cpp.
|
inline |
Gets the tooltip interface.
Definition at line 729 of file SHostWnd.h.
LPCWSTR SHostWnd::GetTranslatorContext | ( | ) | const |
Gets the translator context for the container.
Definition at line 1558 of file shostwnd.cpp.
CRect SHostWnd::GetWindowRect | ( | ) | const |
Gets the window rectangle.
Definition at line 1710 of file shostwnd.cpp.
BOOL SHostWnd::InitFromXml | ( | IXmlNode * | pNode | ) |
Initializes the host window from an XML node.
pNode | Pointer to the XML node. |
Definition at line 440 of file shostwnd.cpp.
BOOL SHostWnd::IsSendWheel2Hover | ( | ) | const |
Checks if wheel messages are sent to the hover window.
Definition at line 1234 of file shostwnd.cpp.
BOOL SHostWnd::IsTranslucent | ( | ) |
Checks if the host window is translucent.
Definition at line 1229 of file shostwnd.cpp.
|
protected |
Handles the WM_ACTIVATE message.
nState | Activation state. |
bMinimized | Minimized flag. |
wndOther | Other window handle. |
Definition at line 1126 of file shostwnd.cpp.
|
protected |
Handles the WM_ACTIVATEAPP message.
uMsg | Message identifier. |
wParam | WPARAM. |
lParam | LPARAM. |
Definition at line 1113 of file shostwnd.cpp.
|
protected |
Handles the WM_CAPTURECHANGED message.
wnd | New capture window handle. |
Definition at line 1657 of file shostwnd.cpp.
|
protected |
Handles the WM_COMMAND message.
uNotifyCode | Notification code. |
nID | Control ID. |
wndCtl | Control window handle. |
Definition at line 2089 of file shostwnd.cpp.
|
protected |
Handles the WM_CREATE message.
lpCreateStruct | Create structure. |
Definition at line 848 of file shostwnd.cpp.
|
protected |
Handles the WM_DESTROY message.
Definition at line 901 of file shostwnd.cpp.
|
protected |
Handles the WM_ERASEBKGND message.
dc | Device context. |
Definition at line 812 of file shostwnd.cpp.
BOOL SHostWnd::OnFireEvent | ( | IEvtArgs * | evt | ) |
Fires an event in the container.
evt | Pointer to the event arguments. |
Definition at line 1139 of file shostwnd.cpp.
Gets the initial XML node.
xmlDoc | XML document. |
Reimplemented in SMessageBoxImpl.
Definition at line 827 of file shostwnd.cpp.
|
protected |
Handles the WM_GETMINMAXINFO message.
lpMMI | Min-max information. |
Definition at line 1295 of file shostwnd.cpp.
|
protected |
Handles the WM_GETOBJECT message.
uMsg | Message identifier. |
wParam | WPARAM. |
lParam | LPARAM. |
Definition at line 1769 of file shostwnd.cpp.
|
protectedvirtual |
Called when the host window animation starts.
pAni | Pointer to the animation object. |
Definition at line 1932 of file shostwnd.cpp.
|
protectedvirtual |
Called when the host window animation stops.
pAni | Pointer to the animation object. |
Definition at line 1936 of file shostwnd.cpp.
|
protected |
Handles key events.
uMsg | Message identifier. |
wParam | WPARAM. |
lParam | LPARAM. |
Definition at line 1097 of file shostwnd.cpp.
|
protected |
Handles the WM_KILLFOCUS message.
wndFocus | New focus window handle. |
Definition at line 1326 of file shostwnd.cpp.
|
protectedvirtual |
Loads the layout from a resource ID.
xmlDoc | XML document. |
Reimplemented in SMenuEx.
Definition at line 833 of file shostwnd.cpp.
|
protected |
Handles custom menu events.
uMsg | Message identifier. |
wParam | WPARAM. |
lParam | LPARAM. |
Definition at line 1724 of file shostwnd.cpp.
|
protected |
Handles mouse events.
uMsg | Message identifier. |
wParam | WPARAM. |
lParam | LPARAM. |
Definition at line 1050 of file shostwnd.cpp.
|
protected |
Handles the WM_MOUSELEAVE message.
Definition at line 992 of file shostwnd.cpp.
|
protected |
Handles the WM_MOUSEMOVE message.
nFlags | Mouse flags. |
point | Mouse position. |
Definition at line 978 of file shostwnd.cpp.
|
protected |
Handles the WM_MOUSEWHEEL message.
nFlags | Mouse flags. |
zDelta | Wheel delta. |
pt | Mouse position. |
Definition at line 1120 of file shostwnd.cpp.
|
protected |
Handles the WM_PAINT message.
dc | Device context. |
Definition at line 800 of file shostwnd.cpp.
|
protected |
Handles the WM_PRINT message.
dc | Device context. |
uFlags | Print flags. |
Definition at line 761 of file shostwnd.cpp.
void SHostWnd::OnRedraw | ( | LPCRECT | rc, |
BOOL | bClip ) |
Redraws the specified rectangle in the container.
rc | Pointer to the rectangle to redraw. |
bClip | Flag indicating whether to clip the redraw. |
Definition at line 1191 of file shostwnd.cpp.
BOOL SHostWnd::OnReleaseSwndCapture | ( | ) |
Releases the capture from the container.
Definition at line 1210 of file shostwnd.cpp.
|
virtual |
Handles the resize event of the root window.
e | Pointer to the event arguments. |
Definition at line 410 of file shostwnd.cpp.
|
protected |
Handles the UM_RUN_TASKS message.
uMsg | Message identifier. |
wp | WPARAM. |
lp | LPARAM. |
Definition at line 2182 of file shostwnd.cpp.
|
protected |
Handles the WM_SETCURSOR message.
hWnd | Handle to the window. |
nHitTest | Hit test code. |
message | Message identifier. |
Definition at line 998 of file shostwnd.cpp.
|
protected |
Handles the WM_SETFOCUS message.
wndOld | Previous window handle. |
Definition at line 1321 of file shostwnd.cpp.
|
protected |
Handles the WM_SETLANGUAGE message.
uMsg | Message identifier. |
wp | WPARAM. |
lp | LPARAM. |
Definition at line 2201 of file shostwnd.cpp.
SWND SHostWnd::OnSetSwndCapture | ( | SWND | swnd | ) |
Sets the capture to the specified window.
swnd | Handle to the window to capture. |
Definition at line 1223 of file shostwnd.cpp.
|
protected |
Handles the WM_SIZE message.
nType | Size type. |
size | New size of the window. |
Definition at line 948 of file shostwnd.cpp.
|
protected |
Handles the WM_SYSCOMMAND message.
nID | System command identifier. |
lParam | LPARAM. |
Definition at line 1941 of file shostwnd.cpp.
|
protected |
Handles the WM_TIMER message.
idEvent | Timer identifier. |
Definition at line 1012 of file shostwnd.cpp.
void SHostWnd::OnUpdateCursor | ( | ) |
Updates the cursor for the container.
Definition at line 1916 of file shostwnd.cpp.
|
protected |
Handles the WM_UPDATEFONT message.
uMsg | Message identifier. |
wp | WPARAM. |
lp | LPARAM. |
Definition at line 2113 of file shostwnd.cpp.
|
protectedvirtual |
Handles user-defined XML node.
xmlUser | User-defined XML node. |
Definition at line 1881 of file shostwnd.cpp.
|
protected |
Handles the WM_WINDOWPOSCHANGED message.
lpWndPos | Window position structure. |
Definition at line 1743 of file shostwnd.cpp.
|
protected |
Handles the WM_WINDOWPOSCHANGING message.
lpWndPos | Window position structure. |
Definition at line 1729 of file shostwnd.cpp.
BOOL SHostWnd::PostTask | ( | IRunnable * | runable, |
BOOL | bAsync = TRUE ) |
Posts a task to the container.
runable | Pointer to the runnable task. |
bAsync | Flag indicating whether the task should be run asynchronously. |
Definition at line 2127 of file shostwnd.cpp.
BOOL SHostWnd::RegisterTimelineHandler | ( | ITimelineHandler * | pHandler | ) |
Registers a timeline handler.
pHandler | Pointer to the timeline handler. |
Definition at line 1534 of file shostwnd.cpp.
int SHostWnd::RemoveTasksForObject | ( | void * | pObj | ) |
Removes tasks for the specified object.
pObj | Pointer to the object. |
Definition at line 2150 of file shostwnd.cpp.
void SHostWnd::SetEventHandler | ( | FunCallback | fun, |
void * | ctx ) |
Sets the event handler for the host window.
fun | Callback function for handling events. |
ctx | Context pointer passed to the callback function. |
Definition at line 1971 of file shostwnd.cpp.
|
static |
Sets whether to hide local UI definitions globally.
bHide | TRUE to hide, FALSE otherwise. |
Definition at line 303 of file shostwnd.cpp.
|
inline |
Sets the layout ID for the host window.
pszLayoutId | Layout resource identifier. |
Definition at line 421 of file SHostWnd.h.
void SHostWnd::SetPresenter | ( | IHostPresenter * | pPresenter | ) |
Sets the presenter for rendering.
pPresenter | Pointer to the presenter interface. |
Definition at line 2029 of file shostwnd.cpp.
void SHostWnd::SetScale | ( | int | nScale, |
LPCRECT | pDestRect ) |
Sets the scale factor for the host window.
nScale | Scale factor. |
pDestRect | Destination rectangle. |
Definition at line 2102 of file shostwnd.cpp.
|
static |
Sets the buffer size for asynchronous task queues.
nBufSize | Buffer size for task queues. |
Definition at line 308 of file shostwnd.cpp.
void SHostWnd::SetToolTip | ( | LPCRECT | rc, |
UINT | tipAlign, | ||
LPCTSTR | pszTip ) |
Sets the tooltip for the container.
rc | Rectangle for the tooltip. |
tipAlign | Alignment of the tooltip. |
pszTip | Tooltip text. |
Definition at line 1281 of file shostwnd.cpp.
void SHostWnd::ShowHostWnd | ( | int | uShowCmd, |
BOOL | bWaitAniDone ) |
Shows the host window with optional animation.
uShowCmd | Command to show the window. |
bWaitAniDone | Wait for the animation to complete before returning. |
Definition at line 2039 of file shostwnd.cpp.
BOOL SHostWnd::ShowWindow | ( | int | nCmdShow | ) |
Shows or hides the host window.
nCmdShow | Command to show or hide the window. |
Implements INativeWnd.
Definition at line 1924 of file shostwnd.cpp.
bool SHostWnd::StartHostAnimation | ( | IAnimation * | pAni | ) |
Starts an animation for the host window.
pAni | Pointer to the animation object. |
Definition at line 1840 of file shostwnd.cpp.
bool SHostWnd::StopHostAnimation | ( | ) |
Stops the current animation for the host window.
Definition at line 1872 of file shostwnd.cpp.
BOOL SHostWnd::UnregisterTimelineHandler | ( | ITimelineHandler * | pHandler | ) |
Unregisters a timeline handler.
pHandler | Pointer to the timeline handler. |
Definition at line 1546 of file shostwnd.cpp.
void SHostWnd::UpdateAutoSizeCount | ( | bool | bInc | ) |
Updates the auto-size count.
bInc | TRUE to increment, FALSE to decrement. |
Definition at line 1886 of file shostwnd.cpp.
|
protected |
Updates the presenter.
dc | Device context. |
pRT | Render target. |
rc | Rectangle. |
byAlpha | Alpha value. |
uFlag | Flags. |
Definition at line 1184 of file shostwnd.cpp.
void SHostWnd::UpdateRegion | ( | IRegionS * | rgn | ) |
Updates the specified region in the container.
rgn | Pointer to the region to update. |
Definition at line 1203 of file shostwnd.cpp.
void SHostWnd::UpdateTooltip | ( | ) |
Updates the tooltip for the container.
Definition at line 1252 of file shostwnd.cpp.
BOOL SHostWnd::UpdateWindow | ( | BOOL | bForce = TRUE | ) |
Updates the window.
bForce | Flag indicating whether to force the update. |
Definition at line 1239 of file shostwnd.cpp.
|
friend |
Friend class used for handling WM_PAINT messages in translucent windows.
Definition at line 319 of file SHostWnd.h.
|
friend |
Friend class for non-client area painting.
Definition at line 321 of file SHostWnd.h.
|
friend |
Friend class representing the root window.
Definition at line 320 of file SHostWnd.h.
|
protected |
Animation state.
Definition at line 348 of file SHostWnd.h.
|
protected |
Indicates if it's the first time the window is shown.
Definition at line 349 of file SHostWnd.h.
|
protected |
Indicates if a full repaint is required.
Definition at line 330 of file SHostWnd.h.
|
protected |
Indicates if a repaint is required.
Definition at line 329 of file SHostWnd.h.
|
protected |
Indicates if resizing is in progress.
Definition at line 345 of file SHostWnd.h.
|
protected |
Mouse tracking flag.
Definition at line 328 of file SHostWnd.h.
|
protected |
Count of enabled local UI definitions.
Definition at line 337 of file SHostWnd.h.
|
protected |
Critical section for thread synchronization.
Definition at line 356 of file SHostWnd.h.
|
protected |
Critical section for running queue synchronization.
Definition at line 358 of file SHostWnd.h.
|
protected |
A dummy window used to handle WM_PAINT messages for translucent windows.
Definition at line 324 of file SHostWnd.h.
|
protected |
Thread ID.
Definition at line 350 of file SHostWnd.h.
|
protected |
Event handler information.
Definition at line 353 of file SHostWnd.h.
|
protected |
Host animation object.
Definition at line 347 of file SHostWnd.h.
|
protected |
Host attributes corresponding to the SOUI node in XML.
Definition at line 325 of file SHostWnd.h.
|
protected |
Rendering cache.
Definition at line 335 of file SHostWnd.h.
|
protected |
Last mouse press message.
Definition at line 341 of file SHostWnd.h.
|
protected |
Auto-sizing trigger count for WM_SIZE messages.
Definition at line 344 of file SHostWnd.h.
|
protected |
Non-client area painter.
Definition at line 339 of file SHostWnd.h.
|
protected |
Presenter for rendering.
Definition at line 354 of file SHostWnd.h.
|
protected |
Local UI definition information.
Definition at line 336 of file SHostWnd.h.
|
protected |
Pointer to the root window.
Definition at line 351 of file SHostWnd.h.
|
protected |
Script module for executing scripts.
Definition at line 338 of file SHostWnd.h.
|
protected |
Interface for tooltip control.
Definition at line 332 of file SHostWnd.h.
|
protected |
Invalid region requiring redraw.
Definition at line 334 of file SHostWnd.h.
|
protected |
List of runnable tasks.
Definition at line 357 of file SHostWnd.h.
|
protected |
Queue of currently running tasks.
Definition at line 359 of file SHostWnd.h.
|
protected |
Layout resource name (e.g., xml:main_wnd).
Definition at line 326 of file SHostWnd.h.
|
protected |
Window size set by the application layer.
Definition at line 342 of file SHostWnd.h.
|
protected |
Previous window size.
Definition at line 343 of file SHostWnd.h.
|
protected |
Initial XML node.
Definition at line 360 of file SHostWnd.h.
|
staticprotected |
Global flag to hide local UI definitions.
Definition at line 361 of file SHostWnd.h.
|
staticprotected |
Buffer size for asynchronous task queues (default: 5).
Definition at line 362 of file SHostWnd.h.