Implementation of the SOUI window container. More...
#include <SWndContainerImpl.h>
Public Member Functions | |
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 |
下一个动画帧处理接口 | |
Protected Member Functions | |
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. | |
Protected Attributes | |
SWindow * | m_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 |
Implementation of the SOUI window container.
This class implements the ISwndContainer and ITimelineHandler interfaces to manage a container of SOUI windows. It handles drag-and-drop operations, focus management, mouse and keyboard events, and timeline handling.
Definition at line 32 of file SWndContainerImpl.h.
SwndContainerImpl::SwndContainerImpl | ( | ) |
Constructor.
Definition at line 13 of file SwndContainerImpl.cpp.
|
protected |
Recursively builds the z-order of the window tree.
pWnd | Pointer to the window. |
iOrder | Current z-order index. |
Definition at line 471 of file SwndContainerImpl.cpp.
|
protected |
Rebuilds the window tree's z-order.
Definition at line 461 of file SwndContainerImpl.cpp.
|
virtual |
Processes frame events.
uMsg | Message identifier. |
wParam | Additional message-specific information. |
lParam | Additional message-specific information. |
Definition at line 29 of file SwndContainerImpl.cpp.
|
inlineprotected |
Transforms a rectangle from frame coordinates to host coordinates.
rc | Rectangle to transform. |
Definition at line 114 of file SWndContainerImpl.h.
|
inlineprotected |
Retrieves the accelerator manager.
Definition at line 140 of file SWndContainerImpl.h.
|
inline |
Retrieves the drop target.
Definition at line 45 of file SWndContainerImpl.h.
|
protected |
Retrieves the window handle that has focus.
Definition at line 135 of file SwndContainerImpl.cpp.
|
inline |
Retrieves the focus manager.
Definition at line 54 of file SWndContainerImpl.h.
|
protected |
Retrieves the window handle that is hovered.
Definition at line 140 of file SwndContainerImpl.cpp.
|
protected |
Marks the window tree's z-order as dirty.
Definition at line 456 of file SwndContainerImpl.cpp.
|
protected |
Handles window activation events.
nState | Activation state. |
Definition at line 422 of file SwndContainerImpl.cpp.
|
protected |
Handles application activation events.
bActive | TRUE if the application is being activated, FALSE if deactivated. |
dwThreadID | Thread identifier of the application. |
Definition at line 434 of file SwndContainerImpl.cpp.
|
protected |
Handles key down events within the frame.
nChar | Virtual-key code of the key. |
nRepCnt | Repeat count of the key. |
nFlags | Flags indicating the state of the key. |
Definition at line 394 of file SwndContainerImpl.cpp.
|
protected |
Handles key events within the frame.
uMsg | Message identifier. |
wParam | Additional message-specific information. |
lParam | Additional message-specific information. |
Definition at line 368 of file SwndContainerImpl.cpp.
|
protected |
Handles mouse events within the frame.
uMsg | Message identifier. |
wParam | Additional message-specific information. |
lParam | Additional message-specific information. |
Definition at line 304 of file SwndContainerImpl.cpp.
|
protected |
Handles mouse leave events within the frame.
Definition at line 252 of file SwndContainerImpl.cpp.
|
protected |
Handles mouse move events within the frame.
uFlag | Flags indicating the state of the mouse buttons. |
pt | Current mouse position. |
Definition at line 145 of file SwndContainerImpl.cpp.
|
protected |
Handles mouse wheel events within the frame.
uMsg | Message identifier. |
wParam | Additional message-specific information. |
lParam | Additional message-specific information. |
Definition at line 339 of file SwndContainerImpl.cpp.
|
protected |
Sets the cursor based on the mouse position.
pt | Current mouse position. |
Definition at line 290 of file SwndContainerImpl.cpp.
|
protected |
Retrieves the window handle that has capture.
Definition at line 130 of file SwndContainerImpl.cpp.
void SwndContainerImpl::OnNextFrame | ( | ) |
Called when the next frame is ready.
Definition at line 492 of file SwndContainerImpl.cpp.
|
protected |
Releases the window capture.
Definition at line 95 of file SwndContainerImpl.cpp.
|
protected |
Sets the window capture.
swnd | Window handle. |
Definition at line 106 of file SwndContainerImpl.cpp.
|
protected |
Sets the window focus.
swnd | Window handle. |
Definition at line 121 of file SwndContainerImpl.cpp.
|
protected |
Registers a drop target for a window.
swnd | Window handle. |
pDropTarget | Pointer to the drop target. |
Definition at line 412 of file SwndContainerImpl.cpp.
|
protected |
Registers a timeline handler.
pHandler | Pointer to the timeline handler. |
Definition at line 482 of file SwndContainerImpl.cpp.
|
protected |
Registers a window for tracking mouse events.
swnd | Window handle. |
Definition at line 439 of file SwndContainerImpl.cpp.
|
protected |
Registers a window as a video canvas.
swnd | Window handle. |
Definition at line 499 of file SwndContainerImpl.cpp.
void SwndContainerImpl::SetRoot | ( | SWindow * | pRoot | ) |
Sets the root window of the container.
pRoot | Pointer to the root window. |
Definition at line 22 of file SwndContainerImpl.cpp.
|
protected |
Unregisters a drop target for a window.
swnd | Window handle. |
Definition at line 417 of file SwndContainerImpl.cpp.
|
protected |
Unregisters a timeline handler.
pHandler | Pointer to the timeline handler. |
Definition at line 487 of file SwndContainerImpl.cpp.
|
protected |
Unregisters a window for tracking mouse events.
swnd | Window handle. |
Definition at line 447 of file SwndContainerImpl.cpp.
|
protected |
Unregisters a window as a video canvas.
swnd | Window handle. |
Definition at line 508 of file SwndContainerImpl.cpp.
|
protected |
Non-client area hover flag
Definition at line 281 of file SWndContainerImpl.h.
|
protected |
Z-order dirty flag
Definition at line 284 of file SWndContainerImpl.h.
|
protected |
Caret
Definition at line 287 of file SWndContainerImpl.h.
|
protected |
Drop target dispatcher
Definition at line 283 of file SWndContainerImpl.h.
|
protected |
Focus manager
Definition at line 282 of file SWndContainerImpl.h.
|
protected |
Window handle with capture
Definition at line 279 of file SWndContainerImpl.h.
|
protected |
Window handle that is hovered
Definition at line 280 of file SWndContainerImpl.h.
|
protected |
List of windows tracking mouse events
Definition at line 285 of file SWndContainerImpl.h.
|
protected |
List of video canvas windows
Definition at line 286 of file SWndContainerImpl.h.
|
protected |
Root window of the container
Definition at line 278 of file SWndContainerImpl.h.
|
protected |
Timeline handler manager
Definition at line 288 of file SWndContainerImpl.h.