9#define WM_NCMOUSEFIRST WM_NCMOUSEMOVE
10#define WM_NCMOUSELAST WM_NCMBUTTONDBLCLK
39 OnFrameMouseMove((UINT)wParam, CPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)));
51 HCURSOR hCursor = GETRESPROVIDER->LoadCursor(IDC_ARROW);
56 OnFrameKeyDown((UINT)wParam, (UINT)lParam & 0xFFFF, (UINT)((lParam & 0xFFFF0000) >> 16));
70 case WM_IME_STARTCOMPOSITION:
71 case WM_IME_ENDCOMPOSITION:
72 case WM_IME_COMPOSITION:
82 if (uMsg >= WM_KEYFIRST && uMsg <= WM_KEYLAST)
84 else if (uMsg >= WM_MOUSEFIRST && uMsg <= WM_MOUSELAST)
152 SWND hHover = pHover ? pHover->
GetSwnd() : 0;
166 pHover->
SSendMessage(WM_NCMOUSEHOVER, uFlag, MAKELPARAM(pt.x, pt.y));
167 pHover->
SSendMessage(WM_MOUSEHOVER, uFlag, MAKELPARAM(pt.x, pt.y));
175 SWND hHover =
m_pRoot->SwndFromPoint(pt2);
201 pHover->
SSendMessage(WM_NCMOUSEHOVER, uFlag, MAKELPARAM(pt2.x, pt2.y));
202 pHover->
SSendMessage(WM_MOUSEHOVER, uFlag, MAKELPARAM(pt2.x, pt2.y));
213 pHover->
SSendMessage(WM_NCMOUSEHOVER, uFlag, MAKELPARAM(pt2.x, pt2.y));
310 uMsg += (UINT)WM_NCMOUSEFIRST - WM_MOUSEFIRST;
311 BOOL bMsgHandled = FALSE;
312 CPoint pt(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
314 lParam = MAKELPARAM(pt.x, pt.y);
315 pCapture->
SSendMessage(uMsg, wParam, lParam, &bMsgHandled);
316 m_pRoot->SetMsgHandled(bMsgHandled);
320 CPoint pt(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
325 BOOL bMsgHandled = FALSE;
327 uMsg += (UINT)WM_NCMOUSEFIRST - WM_MOUSEFIRST;
328 lParam = MAKELPARAM(pt.x, pt.y);
329 pHover->
SSendMessage(uMsg, wParam, lParam, &bMsgHandled);
330 m_pRoot->SetMsgHandled(bMsgHandled);
346 CPoint pt(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
356 if (pWndTarget && !pWndTarget->
IsDisabled(TRUE))
358 BOOL bMsgHandled = FALSE;
359 pWndTarget->
SSendMessage(uMsg, wParam, lParam, &bMsgHandled);
360 m_pRoot->SetMsgHandled(bMsgHandled);
371 if ((uMsg == WM_KEYDOWN || uMsg == WM_KEYUP) && GetKeyState(VK_MENU) & 0x80)
373 UINT vKey = (UINT)wParam;
374 if (vKey >=
'a' && vKey <=
'z')
383 BOOL bMsgHandled = FALSE;
384 lRet = pFocus->
SSendMessage(uMsg, wParam, lParam, &bMsgHandled);
385 m_pRoot->SetMsgHandled(bMsgHandled);
402 BOOL bMsgHandled = FALSE;
403 pFocus->
SSendMessage(WM_KEYDOWN, nChar, MAKELPARAM(nRepCnt, nFlags), &bMsgHandled);
404 m_pRoot->SetMsgHandled(bMsgHandled);
414 return m_dropTarget.RegisterDragDrop(swnd, pDropTarget);
424 if (nState == WA_INACTIVE)
428 else if (nState == WA_ACTIVE)
436 m_pRoot->SDispatchMessage(WM_ACTIVATEAPP, (WPARAM)bActive, (LPARAM)dwThreadID);
465 UINT uInitZorder = 0;
473 ((
SWindow *)pWnd)->m_uZorder = iOrder++;
494 if (!
m_pRoot->IsVisible(FALSE))
Base class for SOUI DUI windows.
SWND GetSwnd() SCONST OVERRIDE
Retrieves the window handle.
DWORD GetState() SCONST OVERRIDE
Retrieves the current state of the window.
virtual void OnCaptureChanged(BOOL bCaptured)
Called when the capture state of the window changes.
BOOL IsVisible(BOOL bCheckParent=FALSE) SCONST OVERRIDE
Checks if the window is visible.
void TransformPointEx(CPoint &pt) const
Extends the transformation of a point.
LRESULT SSendMessage(UINT uMsg, WPARAM wParam=0, LPARAM lParam=0, BOOL *pbMsgHandled=NULL) OVERRIDE
Sends a message to the window.
BOOL IsContainPoint(POINT pt, BOOL bClientOnly) SCONST OVERRIDE
Checks if the window contains a specified point.
BOOL IsDisabled(BOOL bCheckParent=FALSE) SCONST OVERRIDE
Checks if the window is disabled.
virtual BOOL OnSetCursor(const CPoint &pt)
Sets the cursor when the mouse hovers over the window.
void SetMsgHandled(BOOL bHandled)
Sets the message handled flag.
const SwndStyle & GetStyle() const
Retrieves the style of the window.
virtual BOOL OnNcHitTest(CPoint pt)
Non-client area hit test.
static SWindow * GetWindow(SWND swnd)
Retrieves the SWindow pointer from a given handle.
SWND GetHover() SCONST OVERRIDE
Retrieves the window handle that is hovered.
void BuildWndTreeZorder() OVERRIDE
Rebuilds the window tree's z-order.
SDropTargetDispatcher m_dropTarget
STimerlineHandlerMgr m_timelineHandlerMgr
BOOL RegisterTrackMouseEvent(SWND swnd) OVERRIDE
Registers a window for tracking mouse events.
void OnFrameMouseLeave()
Handles mouse leave events within the frame.
SWND GetFocus() SCONST OVERRIDE
Retrieves the window handle that has focus.
void OnSetSwndFocus(SWND swnd) OVERRIDE
Sets the window focus.
BOOL OnFrameSetCursor(const CPoint &pt)
Sets the cursor based on the mouse position.
void OnFrameMouseWheel(UINT uMsg, WPARAM wParam, LPARAM lParam)
Handles mouse wheel events within the frame.
void MarkWndTreeZorderDirty() OVERRIDE
Marks the window tree's z-order as dirty.
SList< SWND > m_lstTrackMouseEvtWnd
void OnActivate(UINT nState)
Handles window activation events.
BOOL RegisterTimelineHandler(ITimelineHandler *pHandler) OVERRIDE
Registers a timeline handler.
BOOL RegisterDragDrop(SWND swnd, IDropTarget *pDropTarget) OVERRIDE
Registers a drop target for a window.
void SetRoot(SWindow *pRoot)
Sets the root window of the container.
void OnFrameKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
Handles key down events within the frame.
void OnNextFrame() OVERRIDE
Called when the next frame is ready.
SList< SWND > m_lstVideoCanvas
virtual LRESULT DoFrameEvent(UINT uMsg, WPARAM wParam, LPARAM lParam)
Processes frame events.
BOOL OnReleaseSwndCapture() OVERRIDE
Releases the window capture.
BOOL UnregisterVideoCanvas(SWND swnd) OVERRIDE
Unregisters a window as a video canvas.
LRESULT OnFrameKeyEvent(UINT uMsg, WPARAM wParam, LPARAM lParam)
Handles key events within the frame.
SWND OnSetSwndCapture(SWND swnd) OVERRIDE
Sets the window capture.
SWND OnGetSwndCapture() SCONST OVERRIDE
Retrieves the window handle that has capture.
BOOL UnregisterTimelineHandler(ITimelineHandler *pHandler) OVERRIDE
Unregisters a timeline handler.
BOOL UnregisterTrackMouseEvent(SWND swnd) OVERRIDE
Unregisters a window for tracking mouse events.
void _BuildWndTreeZorder(IWindow *pWnd, UINT &iOrder)
Recursively builds the z-order of the window tree.
SwndContainerImpl()
Constructor.
void OnFrameMouseEvent(UINT uMsg, WPARAM wParam, LPARAM lParam)
Handles mouse events within the frame.
void OnActivateApp(BOOL bActive, DWORD dwThreadID)
Handles application activation events.
void OnFrameMouseMove(UINT uFlag, CPoint pt)
Handles mouse move events within the frame.
BOOL RegisterVideoCanvas(SWND swnd) OVERRIDE
Registers a window as a video canvas.
BOOL UnregisterDragDrop(SWND swnd) OVERRIDE
Unregisters a drop target for a window.
long AddRef() override
Increments the reference count.
long Release() override
Decrements the reference count and deletes the object if the count reaches zero.
HWND GetHostHwnd() PURE
Retrieves the handle to the host window.
BOOL IsSendWheel2Hover() SCONST PURE
Checks if mouseWheel messages are sent to the hover window.