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

A split window that can contain multiple panes. More...

#include <SSplitWnd.h>

Inheritance diagram for SSplitWnd:
SWindow TObjRefImpl< SObjectImpl< IWindow > > SObjectImpl< IWindow > SSplitWnd_Col SSplitWnd_Row

Public Member Functions

 SSplitWnd (void)
 Constructor for SSplitWnd.
 
virtual ~SSplitWnd (void)
 Destructor for SSplitWnd.
 
SSplitPaneGetPane (UINT iPane)
 Retrieves a pane by index.
 
BOOL ShowPane (UINT iPane)
 Shows a pane.
 
BOOL HidePane (UINT iPane)
 Hides a pane.
 
int PaneIndex (const SStringW &strName) const
 Retrieves the index of a pane by its name.
 
int InsertItem (SSplitPane *pane, int index=-1)
 Inserts a new pane.
 
void RemoveItem (SSplitPane *pane)
 Removes a pane.
 
virtual HRESULT SetAttribute (const SNS::SStringW &amp;amp;amp;amp;strAttribName, const SNS::SStringW &amp;amp;amp;amp;strValue, BOOL bLoading=FALSE)
 
- Public Member Functions inherited from SWindow
 SWindow ()
 Constructor.
 
virtual ~SWindow ()
 Destructor.
 
BOOL IsMsgHandled () const
 Checks if the message is handled.
 
void SetMsgHandled (BOOL bHandled)
 Sets the message handled flag.
 
void OnFinalRelease ()
 Called when the last reference to the object is released.
 
SWND GetSwnd () SCONST OVERRIDE
 Retrieves the window handle.
 
ILayout * GetLayout () OVERRIDE
 Retrieves the layout object associated with the window.
 
ILayoutParam * GetLayoutParam () SCONST OVERRIDE
 Retrieves the layout parameter object associated with the window.
 
BOOL SetLayoutParam (ILayoutParam *pLayoutParam) OVERRIDE
 Sets the layout parameter object for the window.
 
BOOL IsFloat () SCONST OVERRIDE
 Checks if the window is floating.
 
BOOL IsDisplay () SCONST OVERRIDE
 Checks if the window is displayed.
 
void SetWindowText (LPCTSTR lpszText) OVERRIDE
 Sets the window text.
 
void SetWindowTextU8 (LPCSTR lpszText) OVERRIDE
 Sets the window text using a UTF-8 string.
 
void SetToolTipText (LPCTSTR pszText) OVERRIDE
 Sets the tooltip text for the window.
 
void SetToolTipTextU8 (LPCSTR pszText) OVERRIDE
 Sets the tooltip text using a UTF-8 string.
 
BOOL IsChecked () SCONST OVERRIDE
 Checks if the window is checked.
 
void SetCheck (BOOL bCheck) OVERRIDE
 Sets the check state of the window.
 
BOOL IsDisabled (BOOL bCheckParent=FALSE) SCONST OVERRIDE
 Checks if the window is disabled.
 
void EnableWindow (BOOL bEnable, BOOL bUpdate=FALSE) OVERRIDE
 Enables or disables the window.
 
BOOL IsVisible (BOOL bCheckParent=FALSE) SCONST OVERRIDE
 Checks if the window is visible.
 
void SetVisible (BOOL bVisible, BOOL bUpdate=FALSE) OVERRIDE
 Sets the visibility of the window.
 
BOOL IsMsgTransparent () SCONST OVERRIDE
 Checks if the window is message transparent.
 
ULONG_PTR GetUserData () SCONST OVERRIDE
 Retrieves the user data associated with the window.
 
ULONG_PTR SetUserData (ULONG_PTR uData) OVERRIDE
 Sets the user data for the window.
 
void GetWindowRect (LPRECT prect) SCONST OVERRIDE
 Retrieves the bounding rectangle of the window.
 
BOOL IsVideoCanvas () SCONST OVERRIDE
 Checks if the window is a video canvas.
 
void GetVisibleRect (LPRECT prect) SCONST OVERRIDE
 Retrieves the visible rectangle of the window.
 
void GetClientRect (LPRECT prect) SCONST OVERRIDE
 Retrieves the client rectangle of the window.
 
BOOL IsContainPoint (POINT pt, BOOL bClientOnly) SCONST OVERRIDE
 Checks if the window contains a specified point.
 
void DoColorize (COLORREF cr) OVERRIDE
 Applies colorization to the window.
 
COLORREF GetColorizeColor () SCONST OVERRIDE
 Retrieves the colorization color of the window.
 
BOOL Destroy () OVERRIDE
 Destroys the window.
 
void BringWindowToTop () OVERRIDE
 Brings the window to the top of the Z-order.
 
UINT GetChildrenCount () SCONST OVERRIDE
 Retrieves the number of child windows.
 
LRESULT SSendMessage (UINT uMsg, WPARAM wParam=0, LPARAM lParam=0, BOOL *pbMsgHandled=NULL) OVERRIDE
 Sends a message to the window.
 
void SDispatchMessage (UINT uMsg, WPARAM wParam=0, LPARAM lParam=0) OVERRIDE
 Dispatches a message to the window.
 
void SetFocus () OVERRIDE
 Sets the focus to the window.
 
void KillFocus () OVERRIDE
 Kills the focus from the window.
 
BOOL IsFocused () SCONST OVERRIDE
 Checks if the window has focus.
 
void Invalidate () OVERRIDE
 Invalidates the entire window.
 
void InvalidateRect (LPCRECT lprect) OVERRIDE
 Invalidates a specific rectangle area of the window.
 
void LockUpdate () OVERRIDE
 Locks updates to the window.
 
void UnlockUpdate () OVERRIDE
 Unlocks updates to the window.
 
BOOL IsUpdateLocked (BOOL bCheckParent=FALSE) SCONST OVERRIDE
 Checks if updates to the window are locked.
 
void Update (BOOL bForce=FALSE) OVERRIDE
 Updates the window.
 
void Move (LPCRECT prect) OVERRIDE
 Moves the window to a new position and size.
 
void SetWindowRgn (IRegionS *pRgn, BOOL bRedraw=TRUE) OVERRIDE
 Sets the window region.
 
IRegionSGetWindowRgn () SCONST OVERRIDE
 Retrieves the window region.
 
void SetWindowPath (IPathS *pPath, BOOL bRedraw=TRUE) OVERRIDE
 Sets the window path.
 
IPathS * GetWindowPath () SCONST OVERRIDE
 Retrieves the window path.
 
BOOL SetTimer (char id, UINT uElapse) OVERRIDE
 Sets a timer for the window.
 
BOOL KillTimer (char id) OVERRIDE
 Kills a timer for the window.
 
SWND GetCapture () SCONST OVERRIDE
 Retrieves the window that has captured the mouse.
 
SWND SetCapture () OVERRIDE
 Sets the window to capture the mouse.
 
BOOL ReleaseCapture () OVERRIDE
 Releases the mouse capture from the window.
 
void SetAnimation (IAnimation *animation) OVERRIDE
 Sets an animation for the window.
 
IAnimation * GetAnimation () SCONST OVERRIDE
 Retrieves the animation object associated with the window.
 
void StartAnimation (IAnimation *animation) OVERRIDE
 Starts an animation for the window.
 
void ClearAnimation () OVERRIDE
 Clears the animation for the window.
 
void SetAlpha (BYTE byAlpha) OVERRIDE
 Sets the alpha value for the window.
 
BYTE GetAlpha () SCONST OVERRIDE
 Retrieves the alpha value of the window.
 
void SetMatrix (const IMatrix *mtx) OVERRIDE
 Sets the transformation matrix for the window.
 
void GetMatrix (IMatrix *mtx) SCONST OVERRIDE
 Retrieves the transformation matrix of the window.
 
int GetScale () SCONST OVERRIDE
 Retrieves the scale factor of the window.
 
BOOL IsSiblingsAutoGroupped () SCONST OVERRIDE
 Checks if siblings are auto-grouped.
 
void RequestRelayout () OVERRIDE
 Requests a relayout of the window.
 
void UpdateLayout () OVERRIDE
 Updates the layout of the window.
 
UINT OnGetDlgCode () SCONST OVERRIDE
 Retrieves the dialog code for the window.
 
BOOL IsFocusable () SCONST OVERRIDE
 Checks if the window is focusable.
 
BOOL IsClipClient () SCONST OVERRIDE
 Checks if client area clipping is enabled.
 
BOOL IsLayoutDirty () SCONST OVERRIDE
 Checks if the layout is dirty.
 
IWindow * GetNextLayoutIChild (const IWindow *pCurChild) SCONST OVERRIDE
 Retrieves the next layout child window.
 
void UpdateChildrenPosition () OVERRIDE
 Updates the position of child windows.
 
IWindow * GetIWindow (int uCode) SCONST OVERRIDE
 Retrieves a window based on a given code.
 
IWindow * GetIChild (int iChild) SCONST OVERRIDE
 Retrieves a child window by index.
 
IWindow * GetIParent () SCONST OVERRIDE
 Retrieves the parent window.
 
IWindow * GetIRoot () SCONST OVERRIDE
 Retrieves the root window in the hierarchy.
 
BOOL IsDescendant (const IWindow *pWnd) SCONST OVERRIDE
 Checks if a window is a descendant of this window.
 
BOOL AdjustIZOrder (IWindow *pInsertAfter) OVERRIDE
 Adjusts the Z-order of the window.
 
void InsertIChild (IWindow *pNewChild, IWindow *pInsertAfter=NULL) OVERRIDE
 Inserts a child window into the window tree.
 
BOOL RemoveIChild (IWindow *pChild) OVERRIDE
 Removes a child window from the window tree.
 
BOOL DestroyIChild (IWindow *pChild) OVERRIDE
 Destroys a child window.
 
void DestroyAllChildren () OVERRIDE
 Destroys all child windows.
 
IWindow * FindIChildByID (int nId) OVERRIDE
 Finds a child window by its ID.
 
IWindow * FindIChildByName (LPCWSTR pszName) OVERRIDE
 Finds a child window by its name.
 
IWindow * FindIChildByNameA (LPCSTR pszName) OVERRIDE
 Finds a child window by its name (ANSI version).
 
ISwndContainerGetContainer () OVERRIDE
 Retrieves the container associated with this window.
 
void SetContainer (ISwndContainer *pContainer) OVERRIDE
 Sets the container for the window.
 
void GetChildrenLayoutRect (RECT *prc) SCONST OVERRIDE
 Retrieves the layout rectangle of the children.
 
void GetDesiredSize (SIZE *psz, int nParentWid, int nParentHei) OVERRIDE
 Retrieves the desired size of the window.
 
void Move2 (int x, int y, int cx=-1, int cy=-1) OVERRIDE
 Moves the window to a new position and optionally resizes it.
 
int GetWindowText (TCHAR *pBuf, int nBufLen, BOOL bRawText) OVERRIDE
 Retrieves the window text.
 
int GetWindowTextU8 (IStringA *pStr, BOOL bRawText) OVERRIDE
 Retrieves the window text as a UTF-8 string.
 
void SetEventMute (BOOL bMute) OVERRIDE
 Sets the event mute state.
 
DWORD GetState () SCONST OVERRIDE
 Retrieves the current state of the window.
 
DWORD ModifyState (DWORD dwStateAdd, DWORD dwStateRemove, BOOL bUpdate=FALSE) OVERRIDE
 Modifies the state of the window.
 
void SetIOwner (IWindow *pOwner) OVERRIDE
 Sets the owner window.
 
IWindow * GetIOwner () SCONST OVERRIDE
 Retrieves the owner window.
 
BOOL CreateChildrenFromXml (LPCWSTR pszXml) OVERRIDE
 Creates child windows from XML.
 
BOOL CreateChildrenFromResId (LPCTSTR pszResId) OVERRIDE
 Creates child windows from a resource ID.
 
BOOL InitFromXml (IXmlNode *pNode) OVERRIDE
 Initializes the window from an XML node.
 
BOOL GetAttribute (LPCWSTR pszName, IStringW *strValue) SCONST OVERRIDE
 Retrieves an attribute value from the window.
 
COLORREF GetBkgndColor () SCONST OVERRIDE
 Retrieves the background color of the window.
 
IWindow * GetISelectedSiblingInGroup () OVERRIDE
 Retrieves the selected sibling window in a group.
 
IWindow * GetISelectedChildInGroup () OVERRIDE
 Retrieves the selected child window in a group.
 
SWND SwndFromPoint (POINT *pt, BOOL bIncludeMsgTransparent=FALSE) SCONST OVERRIDE
 Retrieves the window handle at a specified point.
 
BOOL FireEvent (IEvtArgs *evt) OVERRIDE
 Fires an event.
 
BOOL FireCommand () OVERRIDE
 Fires a command event.
 
BOOL FireCtxMenu (POINT pt) OVERRIDE
 Fires a context menu event.
 
BOOL SubscribeEvent (DWORD evtId, const IEvtSlot *pSlot) OVERRIDE
 Subscribes to an event.
 
BOOL UnsubscribeEvent (DWORD evtId, const IEvtSlot *pSlot) OVERRIDE
 Unsubscribes from an event.
 
HRESULT QueryInterface (REFGUID id, IObjRef **ppRet) OVERRIDE
 Queries an interface.
 
BOOL AddEvent (DWORD dwEventID, LPCWSTR pszEventHandlerName) OVERRIDE
 Adds an event handler.
 
BOOL RemoveEvent (DWORD dwEventID) OVERRIDE
 Removes an event handler.
 
BOOL SwndProc (UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *lResult) OVERRIDE
 Processes a window message.
 
void SetSwndProc (FunSwndProc swndProc) OVERRIDE
 Sets the window procedure.
 
HWND GetHostHwnd () OVERRIDE
 Retrieves the host window handle.
 
ITimelineHandlersMgr * GetTimelineHandlersMgr () OVERRIDE
 Retrieves the timeline handlers manager.
 
BOOL RegisterDragDrop (IDropTarget *pDragTarget) OVERRIDE
 Registers a drop target for the window.
 
BOOL UnregisterDragDrop () OVERRIDE
 Unregisters a drop target for the window.
 
BOOL CreateCaret (HBITMAP pBmp, int nWid, int nHeight) OVERRIDE
 Creates a caret.
 
void ShowCaret (BOOL bShow) OVERRIDE
 Shows or hides the caret.
 
void SetCaretPos (int x, int y) OVERRIDE
 Sets the caret position.
 
IAccProxy * GetAccProxy ()
 Retrieves the accessibility proxy for the window.
 
void accNotifyEvent (DWORD dwEvt)
 Notifies an accessibility event.
 
PSWNDMSG GetCurMsg (void) const
 Retrieves the current message being processed.
 
const ISwndContainerGetContainer () const
 Retrieves the container associated with this window.
 
SWindowGetWindow (int uCode) const
 Retrieves a window based on a given code.
 
SWindowGetChild (int iChild) const
 Retrieves a child window by index.
 
SWindowGetParent () const
 Retrieves the parent window.
 
SWindowGetRoot () const
 Retrieves the root window in the hierarchy.
 
SWindowGetNextLayoutChild (const SWindow *pCurChild) const
 Retrieves the next layout child after a specified child.
 
BOOL AdjustZOrder (SWindow *pInsertAfter)
 Adjusts the Z-order of the window.
 
void InsertChild (SWindow *pNewChild, SWindow *pInsertAfter=NULL)
 Inserts a child window into the window tree.
 
BOOL RemoveChild (SWindow *pChild)
 Removes a child window from the window tree.
 
BOOL DestroyChild (SWindow *pChild)
 Destroys a child window.
 
void SetMatrix (const SMatrix &mtx)
 Sets the transformation matrix for the window.
 
virtual SStringT GetWindowText (BOOL bRawText=FALSE)
 Retrieves the text of the window.
 
virtual SStringT GetToolTipText ()
 Retrieves the tooltip text of the window.
 
SEventSetGetEventSet ()
 Retrieves the event set associated with the window.
 
const SwndStyleGetStyle () const
 Retrieves the style of the window.
 
SwndStyleGetStyle ()
 
void SetOwner (SWindow *pOwner)
 Sets the owner of the window.
 
SWindowGetOwner () const
 Retrieves the current owner of the window.
 
UINT GetTextAlign () const
 Retrieves the text alignment of the window.
 
CRect GetWindowRect () const
 Retrieves the bounding rectangle of the window.
 
virtual CRect GetClientRect () const
 Retrieves the client rectangle of the window.
 
SWindowFindChildByID (int nID, int nDeep=-1)
 Finds a child window by its ID.
 
template<class T>
T * GetLayoutParamT ()
 Template method to cast layout parameters to a specific type.
 
template<class T>
T * FindChildByID2 (int nID, int nDeep=-1)
 Finds a child window by its ID and casts it to a specific type.
 
SWindowFindChildByName (LPCWSTR strName, int nDeep=-1)
 Finds a child window by its name.
 
SWindowFindChildByName (LPCSTR strName, int nDeep=-1)
 Overloaded method to find 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 and casts it to a specific type.
 
template<class T>
T * FindChildByName2 (LPCSTR pszName, int nDeep=-1)
 Overloaded method to find a child window by its name and cast it to a specific type (ANSI version).
 
template<class T>
T * FindChildByClass (int nDeep=-1) const
 Recursively finds a child window by its class type.
 
virtual SIZE MeasureContent (int nParentWid, int nParentHei)
 Measures the size of the content within the window.
 
virtual SIZE MeasureChildren (int nParentWid, int nParentHei)
 Measures the size of all child windows.
 
virtual BOOL UpdateToolTip (CPoint pt, SwndToolTipInfo &tipInfo)
 Handle tooltip updates.
 
virtual SWindowGetSelectedSiblingInGroup ()
 Get selected sibling in group.
 
virtual SWindowGetSelectedChildInGroup ()
 Get selected child in group.
 
virtual SWindowCreateChildByName (LPCWSTR pszName)
 Create child window by name.
 
virtual void RequestRelayout (SWND hSource, BOOL bSourceResizable)
 Request layout update.
 
virtual SStringW tr (const SStringW &strSrc) const
 Translation function.
 
virtual SWND SwndFromPoint (CPoint &pt, BOOL bIncludeMsgTransparent=false) const
 Get window from point.
 
virtual BOOL OnNcHitTest (CPoint pt)
 Non-client area hit test.
 
virtual void OnUpdateFloatPosition (const CRect &rcParent)
 Update floating window position.
 
virtual BOOL NeedRedrawWhenStateChange ()
 Determine if redraw is needed on state change.
 
virtual void GetTextRect (LPRECT pRect)
 Calculate text display rectangle.
 
virtual void DrawText (IRenderTarget *pRT, LPCTSTR pszBuf, int cchText, LPRECT pRect, UINT uFormat)
 Draw text content.
 
virtual void DrawFocus (IRenderTarget *pRT)
 Draw focus state.
 
virtual void BeforePaint (IRenderTarget *pRT, SPainter &painter)
 Prepare rendering environment.
 
virtual void AfterPaint (IRenderTarget *pRT, SPainter &painter)
 Restore rendering environment.
 
virtual LPCWSTR GetTrCtx () const
 Get translation context.
 
void RedrawRegion (IRenderTarget *pRT, IRegionS *pRgn)
 Renders the content of the window and its child windows onto the RenderTarget.
 
IRenderTargetGetRenderTarget (LPCRECT pRc=NULL, GrtFlag gdcFlags=GRT_NODRAW, BOOL bClientRT=TRUE)
 Retrieves a memory DC compatible with the SWND window.
 
IRenderTargetGetRenderTarget (GrtFlag gdcFlags, IRegionS *pRgn)
 Retrieves a memory DC compatible with the SWND window.
 
void ReleaseRenderTarget (IRenderTarget *pRT)
 Releases the RenderTarget obtained via GetRenderTarget.
 
void PaintBackground (IRenderTarget *pRT, LPRECT pRc)
 Draws the background content of the window.
 
void PaintForeground (IRenderTarget *pRT, LPRECT pRc, SWindow *pStartFrom=NULL)
 Draws the foreground content of the window.
 
void BeforePaintEx (IRenderTarget *pRT)
 Prepares the drawing environment for the current window's RenderTarget, starting from the top-level window.
 
void TransformPoint (CPoint &pt) const
 Transforms a point based on the current window's transformation matrix.
 
void TransformPointEx (CPoint &pt) const
 Extends the transformation of a point.
 
BOOL FireEvent (SEvtArgs &evt)
 Fires an event.
 
- Public Member Functions inherited from TObjRefImpl< SObjectImpl< IWindow > >
 TObjRefImpl ()
 Constructor that initializes the reference count to 1.
 
virtual ~TObjRefImpl ()
 Virtual destructor.
 
long AddRef () override
 Increments the reference count.
 
long Release () override
 Decrements the reference count and deletes the object if the count reaches zero.
 
void OnFinalRelease () override
 Deletes the object.
 
- Public Member Functions inherited from SObjectImpl< IWindow >
 SObjectImpl ()
 Constructor.
 
BOOL InitFromXml (IXmlNode *pXmlNode) OVERRIDE
 Initializes the object from an XML node.
 
LPCWSTR GetName () SCONST OVERRIDE
 Retrieves the object's name.
 
LPCSTR GetNameA () SCONST OVERRIDE
 Retrieves the object's name in ANSI format.
 
void SetName (LPCWSTR pszName) OVERRIDE
 Sets the object's name.
 
int GetID () SCONST OVERRIDE
 Retrieves the object's ID.
 
void SetID (int nID) OVERRIDE
 Sets the object's ID.
 
HRESULT AfterAttribute (LPCWSTR strAttribName, LPCWSTR strValue, BOOL bLoading, HRESULT hr) OVERRIDE
 Handles attribute processing after setting an attribute.
 
HRESULT SetAttributeA (LPCSTR pszAttr, LPCSTR pszValue, BOOL bLoading) OVERRIDE
 Sets an attribute using ANSI strings.
 
HRESULT SetAttribute (LPCWSTR pszAttr, LPCWSTR pszValue, BOOL bLoading) OVERRIDE
 Sets an attribute using wide strings.
 
virtual HRESULT SetAttribute (const SStringW &strAttr, const SStringW &strValue, BOOL bLoading)
 Sets an attribute using wide strings.
 
HRESULT ISetAttribute (const IStringW *strAttr, const IStringW *strValue, BOOL bLoading) OVERRIDE
 Sets an attribute using IStringW objects.
 
LPCWSTR GetObjectClass () SCONST OVERRIDE
 Retrieves the object's class name.
 
int GetObjectType () SCONST OVERRIDE
 Retrieves the object's type.
 
BOOL IsClass (LPCWSTR lpszName) SCONST OVERRIDE
 Checks if the object is of a specific class.
 
BOOL GetAttribute (LPCWSTR strAttr, IStringW *pValue) SCONST OVERRIDE
 Retrieves an attribute value.
 
void OnInitFinished (IXmlNode *xmlNode) OVERRIDE
 Handles initialization completion.
 
void SetAttrHandler (FunAttrHandler attrHandler) OVERRIDE
 Sets the attribute handler.
 

Protected Types

typedef SArray< SSplitPane * > SplitPaneList
 
- Protected Types inherited from SWindow
enum  LayoutDirtyType { dirty_clean = 0 , dirty_self = 1 , dirty_child = 2 }
 Enumerates the types of layout dirty states. More...
 
typedef struct SWindow::GETRTDATA * PGETRTDATA
 

Protected Member Functions

void GetChildrenLayoutRect (RECT *prc) SCONST OVERRIDE
 Retrieves the layout rectangle for child windows.
 
void UpdateChildrenPosition () OVERRIDE
 Updates the positions of child windows.
 
virtual BOOL CreateChildren (SXmlNode xmlNode)
 Creates child windows from an XML node.
 
virtual BOOL OnSetCursor (const CPoint &pt)
 Sets the cursor.
 
void OnPaint (IRenderTarget *pRT)
 Paints the window.
 
void OnLButtonDown (UINT nFlags, CPoint pt)
 Handles left mouse button down events.
 
void OnLButtonUp (UINT nFlags, CPoint pt)
 Handles left mouse button up events.
 
void OnMouseMove (UINT nFlags, CPoint pt)
 Handles mouse move events.
 
void SortPriorityList (SplitPaneList &lstPane)
 Sorts the pane list by priority.
 
void FatchPaneSizeInfo (const SplitPaneList &lstPane, PANESIZELIST &lstPaneSize)
 Fetches size information for the panes.
 
int ResetPanesPostion (SplitPaneList &lstPane, SplitPaneList &lstPanePriority, PANESIZELIST &lstPaneSize, int offset)
 Resets the positions of the panes based on size information.
 
int AdjustPanesSize (PANESIZELIST &lstPriority, int remain)
 Adjusts the sizes of the panes.
 
void Relayout (const CRect &rc, PANESIZELIST lstPaneSize=PANESIZELIST())
 Relayouts the panes within the window.
 
- Protected Member Functions inherited from SWindow
IScriptModule * GetScriptModule ()
 Retrieves the script module interface.
 
void InvalidateRect (const CRect &rect, BOOL bFromThis=TRUE, BOOL bClip=FALSE)
 Invalidates a specific rectangle area of the window.
 
STransformation GetTransformation () const
 Retrieves the current transformation matrix of the window.
 
BOOL CreateChild (SXmlNode xmlChild)
 Creates a child window from an XML node.
 
void CreateChilds (SXmlNode xmlNode)
 Creates multiple child windows from XML nodes.
 
void OnAnimationStart (IAnimation *animation)
 Called when an animation starts.
 
void OnAnimationStop (IAnimation *animation)
 Called when an animation stops.
 
void OnAnimationRepeat (IAnimation *animation)
 Called when an animation repeats.
 
void OnAnimationPauseChange (IAnimation *animation, BOOL bPaused)
 Called when the pause state of an animation changes.
 
virtual void OnAnimationInvalidate (IAnimation *pAni, bool bErase)
 Called when an animation requires a redraw.
 
virtual void OnContentChanged ()
 Called when the content of the window changes.
 
virtual void OnColorize (COLORREF cr)
 Adjusts the color tone of the window.
 
virtual void OnStateChanging (DWORD dwOldState, DWORD dwNewState)
 Called before the state of the window changes.
 
virtual void OnStateChanged (DWORD dwOldState, DWORD dwNewState)
 Called after the state of the window changes.
 
virtual void OnCaptureChanged (BOOL bCaptured)
 Called when the capture state of the window changes.
 
virtual BOOL OnRelayout (const CRect &rcWnd)
 Handles window position changes during layout updates.
 
bool IsCacheDirty () const
 Checks if the cache is marked as dirty.
 
void MarkCacheDirty (bool bDirty)
 Marks the cache as dirty.
 
virtual bool IsDrawToCache () const
 Checks if the window content is being drawn to the cache.
 
virtual BOOL IsLayeredWindow () const
 Determines if the window requires a render layer.
 
virtual void DispatchPaint (IRenderTarget *pRT, IRegionS *pRgn, UINT iZorderBegin, UINT iZorderEnd)
 Handles paint dispatching for the window.
 
virtual void OnCommitSurface (IRenderTarget *pRtDest, LPCRECT pRcDest, IRenderTarget *pRtSrc, LPCRECT pRcSrc, BYTE alpha)
 Commits surface changes.
 
virtual SWindow_FindChildByID (int nID, int nDeep)
 Finds a child window by ID.
 
virtual SWindow_FindChildByName (const SStringW &strName, int nDeep)
 Finds a child window by name.
 
SWindow_GetCurrentLayeredWindow ()
 Retrieves the host window for the current render layer.
 
bool _ApplyMatrix (IRenderTarget *pRT, SMatrix &oriMtx)
 Applies a transformation matrix to the RenderTarget.
 
SMatrix _GetMatrixEx () const
 Retrieves the extended transformation matrix for the window.
 
bool _WndRectInRgn (const CRect &rc, const IRegionS *rgn) const
 Checks if the window rectangle lies within a specified region.
 
void _PaintClient (IRenderTarget *pRT)
 Renders the client area of the window onto the RenderTarget.
 
void _PaintNonClient (IRenderTarget *pRT)
 Renders the non-client area of the window onto the RenderTarget.
 
void _RedrawNonClient ()
 Redraws the non-client area of the window.
 
void _PaintRegion (IRenderTarget *pRT, IRegionS *pRgn, UINT iZorderBegin, UINT iZorderEnd)
 Renders a specific region of the window onto the RenderTarget.
 
void _PaintChildren (IRenderTarget *pRT, IRegionS *pRgn, UINT iBeginZorder, UINT iEndZorder)
 Renders child windows within a specific Z-order range.
 
void DrawDefFocusRect (IRenderTarget *pRT, CRect rc)
 Draws the default focus rectangle.
 
void UpdateCacheMode ()
 Updates the cache mode for the window.
 
void TestMainThread ()
 Tests if the current thread is the main UI thread.
 
void GetScaleSkin (SAutoRefPtr< ISkinObj > &pSkin, int nScale)
 Retrieves a scaled skin object based on the current scale factor.
 
int OnCreate (LPVOID)
 Handles the creation of the window.
 
void OnSize (UINT nType, CSize size)
 Handles the resizing of the window.
 
void OnDestroy ()
 Handles the destruction of the window.
 
BOOL OnEraseBkgnd (IRenderTarget *pRT)
 Handles the erasing of the background.
 
void OnPaint (IRenderTarget *pRT)
 Handles the painting of the window.
 
void OnNcPaint (IRenderTarget *pRT)
 Handles the painting of the non-client area.
 
void OnShowWindow (BOOL bShow, UINT nStatus)
 Handles showing or hiding the window.
 
void OnEnable (BOOL bEnable, UINT nStatus)
 Handles enabling or disabling the window.
 
void OnLButtonDown (UINT nFlags, CPoint pt)
 Handles the left mouse button down event.
 
void OnLButtonDbClick (UINT nFlags, CPoint point)
 Handles the left mouse button double-click event.
 
void OnLButtonUp (UINT nFlags, CPoint pt)
 Handles the left mouse button up event.
 
void OnRButtonDown (UINT nFlags, CPoint point)
 Handles the right mouse button down event.
 
void OnRButtonUp (UINT nFlags, CPoint point)
 Handles the right mouse button up event.
 
void OnMouseHover (UINT nFlags, CPoint ptPos)
 Handles the mouse hover event.
 
void OnMouseMove (UINT nFlags, CPoint pt)
 Handles the mouse move event.
 
void OnMouseLeave ()
 Handles the mouse leave event.
 
BOOL OnMouseWheel (UINT nFlags, short zDelta, CPoint pt)
 Handles the mouse wheel event.
 
LRESULT OnMouseClick (UINT uMsg, WPARAM wParam, LPARAM lParam)
 Handles general mouse click events.
 
void OnSetFocus (SWND wndOld)
 Handles gaining focus.
 
void OnKillFocus (SWND wndFocus)
 Handles losing focus.
 
LRESULT OnSetScale (UINT uMsg, WPARAM wParam, LPARAM lParam)
 Handles setting the scale of the window.
 
LRESULT OnSetLanguage (UINT uMsg, WPARAM wParam, LPARAM lParam)
 Handles setting the language of the window.
 
LRESULT OnSetColorize (UINT uMsg, WPARAM wParam, LPARAM lParam)
 Handles setting the colorization of the window.
 
LRESULT OnUpdateFont (UINT uMsg, WPARAM wParam, LPARAM lParam)
 Handles updating the font of the window.
 
HRESULT OnAttrVisible (const SStringW &strValue, BOOL bLoading)
 Handles the 'visible' attribute.
 
HRESULT OnAttrEnable (const SStringW &strValue, BOOL bLoading)
 Handles the 'enable' attribute.
 
HRESULT OnAttrDisplay (const SStringW &strValue, BOOL bLoading)
 Handles the 'display' attribute.
 
HRESULT OnAttrCache (const SStringW &strValue, BOOL bLoading)
 Handles the 'cache' attribute.
 
HRESULT OnAttrAlpha (const SStringW &strValue, BOOL bLoading)
 Handles the 'alpha' attribute.
 
HRESULT OnAttrSkin (const SStringW &strValue, BOOL bLoading)
 Handles the 'skin' attribute.
 
HRESULT OnAttrLayout (const SStringW &strValue, BOOL bLoading)
 Handles the 'layout' attribute.
 
HRESULT OnAttrClass (const SStringW &strValue, BOOL bLoading)
 Handles the 'class' attribute.
 
HRESULT OnAttrTrackMouseEvent (const SStringW &strValue, BOOL bLoading)
 Handles the 'trackMouseEvent' attribute.
 
HRESULT OnAttrVideoCanvas (const SStringW &strValue, BOOL bLoading)
 Handles the 'videoCanvas' attribute.
 
HRESULT OnAttrID (const SStringW &strValue, BOOL bLoading)
 Handles the 'id' attribute.
 
HRESULT OnAttrName (const SStringW &strValue, BOOL bLoading)
 Handles the 'name' attribute.
 
HRESULT OnAttrTip (const SStringW &strValue, BOOL bLoading)
 Handles the 'tip' attribute.
 
HRESULT OnAttrText (const SStringW &strValue, BOOL bLoading)
 Handles the 'text' attribute.
 
HRESULT DefAttributeProc (const SStringW &strAttribName, const SStringW &strValue, BOOL bLoading)
 Default attribute processing function.
 
virtual HRESULT AfterAttribute (const SStringW &strAttribName, const SStringW &strValue, BOOL bLoading, HRESULT hr)
 Called after an attribute is processed.
 
virtual HRESULT OnLanguageChanged ()
 Called when the language of the window changes.
 
virtual void OnScaleChanged (int scale)
 Called when the scale of the window changes.
 
virtual void OnRebuildFont ()
 Called when the font of the window needs to be rebuilt.
 
virtual void OnBeforeInsertChild (SWindow *pChild)
 Called before a child window is inserted into this window.
 
virtual void OnAfterInsertChild (SWindow *pChild)
 Called after a child window has been inserted into this window.
 
virtual void OnBeforeRemoveChild (SWindow *pChild)
 Called before a child window is removed from this window.
 
virtual void OnAfterRemoveChild (SWindow *pChild)
 Called after a child window has been removed from this window.
 
virtual void OnContainerChanged (ISwndContainer *pOldContainer, ISwndContainer *pNewContainer)
 Called when the container of the window changes.
 

Static Protected Member Functions

static int FunComp (const void *p1, const void *p2)
 Comparison function for qsort.
 

Protected Attributes

SplitPaneList m_lstPane
 
SplitPaneList m_lstPriority
 
int m_spliterSize
 
int m_orintation
 
BOOL m_bAdjustable
 
SAutoRefPtr< ISkinObjm_pSkinSep
 
CPoint m_ptDragPrev
 
int m_iDragSep
 
- Protected Attributes inherited from SWindow
SWND m_swnd
 Member variables representing various properties of the window.
 
BOOL m_bFloat
 
ISwndContainerm_pContainer
 
SEventSet m_evtSet
 
SAutoRefPtr< ILayout > m_pLayout
 
SAutoRefPtr< ILayoutParam > m_pLayoutParam
 
SWindowm_pOwner
 
SWindowm_pParent
 
SWindowm_pFirstChild
 
SWindowm_pLastChild
 
SWindowm_pNextSibling
 
SWindowm_pPrevSibling
 
UINT m_nChildrenCount
 
SWNDMSGm_pCurMsg
 
SwndStyle m_style
 
STrText m_strText
 
STrText m_strToolTipText
 
SStringW m_strTrCtx
 
UINT m_uZorder
 
int m_nUpdateLockCnt
 
BOOL m_dwState
 
BOOL m_bVisible
 
BOOL m_bDisable
 
BOOL m_bDisplay
 
BOOL m_bClipClient
 
BOOL m_bMsgTransparent
 
BOOL m_bFocusable
 
BOOL m_bDrawFocusRect
 
BOOL m_bCacheDraw
 
BOOL m_bCacheDirty
 
BOOL m_bLayeredWindow
 
BOOL m_isLoading
 
BOOL m_bHoverAware
 
BOOL m_bMsgHandled
 
LayoutDirtyType m_layoutDirty
 
SAutoRefPtr< IRenderTargetm_cachedRT
 
SAutoRefPtr< IRegionSm_clipRgn
 
SAutoRefPtr< IPathS > m_clipPath
 
SAutoRefPtr< ISkinObjm_pBgSkin
 
SAutoRefPtr< ISkinObjm_pNcSkin
 
ULONG_PTR m_uData
 
SLayoutSize m_nMaxWidth
 
COLORREF m_crColorize
 
SAutoRefPtr< IAnimation > m_animation
 
SAnimationHandler m_animationHandler
 
STransformation m_transform
 
bool m_isAnimating
 
bool m_isDestroying
 
PGETRTDATA m_pGetRTData
 
SAutoRefPtr< IAttrStorage > m_attrStorage
 
SAutoRefPtr< ICaret > m_caret
 
FunSwndProc m_funSwndProc
 
- Protected Attributes inherited from TObjRefImpl< SObjectImpl< IWindow > >
LONG m_cRef
 Reference count.
 
- Protected Attributes inherited from SObjectImpl< IWindow >
SStringW m_strName
 
int m_nID
 
FunAttrHandler m_attrHandler
 

Additional Inherited Members

- Static Public Member Functions inherited from SWindow
static SStringW GetXmlText (const SXmlNode &xmlNode)
 Gets the XML text from a node.
 
- Static Public Member Functions inherited from SObjectImpl< IWindow >
static int GetClassType ()
 Retrieves the class type.
 
static LPCWSTR GetClassName ()
 Retrieves the class name.
 
static LPCWSTR GetClassAlias ()
 Retrieves the class alias.
 
static void MarkAttributeHandled (SXmlAttr xmlAttr, bool bHandled)
 Marks an attribute as handled.
 
static bool IsAttributeHandled (SXmlAttr xmlAttr)
 Checks if an attribute is handled.
 

Detailed Description

A split window that can contain multiple panes.

This class represents a split window that can be divided into multiple panes, which can be adjusted in size.

Definition at line 69 of file SSplitWnd.h.

Member Typedef Documentation

◆ SplitPaneList

typedef SArray<SSplitPane *> SSplitWnd::SplitPaneList
protected

Definition at line 97 of file SSplitWnd.h.

Constructor & Destructor Documentation

◆ SSplitWnd()

SSplitWnd::SSplitWnd ( void )

Constructor for SSplitWnd.

Definition at line 26 of file SSplitWnd.cpp.

◆ ~SSplitWnd()

SSplitWnd::~SSplitWnd ( void )
virtual

Destructor for SSplitWnd.

Definition at line 35 of file SSplitWnd.cpp.

Member Function Documentation

◆ AdjustPanesSize()

int SSplitWnd::AdjustPanesSize ( PANESIZELIST & lstPriority,
int remain )
protected

Adjusts the sizes of the panes.

Parameters
lstPriorityThe list of panes sorted by priority.
remainThe remaining space to distribute.
Returns
The remaining space after adjustment.

Definition at line 415 of file SSplitWnd.cpp.

◆ CreateChildren()

BOOL SSplitWnd::CreateChildren ( SXmlNode xmlNode)
protectedvirtual

Creates child windows from an XML node.

Parameters
xmlNodeThe XML node containing the child window definitions.
Returns
TRUE if successful, otherwise FALSE.

Reimplemented from SWindow.

Definition at line 59 of file SSplitWnd.cpp.

◆ FatchPaneSizeInfo()

void SSplitWnd::FatchPaneSizeInfo ( const SplitPaneList & lstPane,
PANESIZELIST & lstPaneSize )
protected

Fetches size information for the panes.

Parameters
lstPaneThe list of panes.
lstPaneSizeThe list to store the size information.

Definition at line 530 of file SSplitWnd.cpp.

◆ FunComp()

int SSplitWnd::FunComp ( const void * p1,
const void * p2 )
staticprotected

Comparison function for qsort.

Parameters
p1Pointer to the first element.
p2Pointer to the second element.
Returns
Comparison result.

Definition at line 564 of file SSplitWnd.cpp.

◆ GetChildrenLayoutRect()

void SSplitWnd::GetChildrenLayoutRect ( RECT * prc)
protected

Retrieves the layout rectangle for child windows.

Parameters
prcPointer to the rectangle to receive the layout rectangle.

Definition at line 351 of file SSplitWnd.cpp.

◆ GetPane()

SSplitPane * SSplitWnd::GetPane ( UINT iPane)

Retrieves a pane by index.

Parameters
iPaneThe index of the pane.
Returns
Pointer to the SSplitPane object.

Definition at line 323 of file SSplitWnd.cpp.

◆ HidePane()

BOOL SSplitWnd::HidePane ( UINT iPane)

Hides a pane.

Parameters
iPaneThe index of the pane to hide.
Returns
TRUE if successful, otherwise FALSE.

Definition at line 49 of file SSplitWnd.cpp.

◆ InsertItem()

int SSplitWnd::InsertItem ( SSplitPane * pane,
int index = -1 )

Inserts a new pane.

Parameters
panePointer to the SSplitPane object to insert.
indexThe index at which to insert the pane, default is -1 (end).
Returns
Index of the inserted pane.

Definition at line 358 of file SSplitWnd.cpp.

◆ OnLButtonDown()

void SSplitWnd::OnLButtonDown ( UINT nFlags,
CPoint pt )
protected

Handles left mouse button down events.

Parameters
nFlagsFlags associated with the mouse event.
ptThe mouse position.

Definition at line 115 of file SSplitWnd.cpp.

◆ OnLButtonUp()

void SSplitWnd::OnLButtonUp ( UINT nFlags,
CPoint pt )
protected

Handles left mouse button up events.

Parameters
nFlagsFlags associated with the mouse event.
ptThe mouse position.

Definition at line 147 of file SSplitWnd.cpp.

◆ OnMouseMove()

void SSplitWnd::OnMouseMove ( UINT nFlags,
CPoint pt )
protected

Handles mouse move events.

Parameters
nFlagsFlags associated with the mouse event.
ptThe mouse position.

Definition at line 153 of file SSplitWnd.cpp.

◆ OnPaint()

void SSplitWnd::OnPaint ( IRenderTarget * pRT)
protected

Paints the window.

Parameters
pRTPointer to the render target.

Definition at line 86 of file SSplitWnd.cpp.

◆ OnSetCursor()

BOOL SSplitWnd::OnSetCursor ( const CPoint & pt)
protectedvirtual

Sets the cursor.

Parameters
ptThe mouse position.
Returns
TRUE if the cursor was set, otherwise FALSE.

Reimplemented from SWindow.

Definition at line 77 of file SSplitWnd.cpp.

◆ PaneIndex()

int SSplitWnd::PaneIndex ( const SStringW & strName) const

Retrieves the index of a pane by its name.

Parameters
strNameThe name of the pane.
Returns
Index of the pane, or -1 if not found.

Definition at line 313 of file SSplitWnd.cpp.

◆ Relayout()

void SSplitWnd::Relayout ( const CRect & rc,
PANESIZELIST lstPaneSize = PANESIZELIST() )
protected

Relayouts the panes within the window.

Parameters
rcThe new rectangle for the window.
lstPaneSizeThe list of pane size information.

Definition at line 392 of file SSplitWnd.cpp.

◆ RemoveItem()

void SSplitWnd::RemoveItem ( SSplitPane * pane)

Removes a pane.

Parameters
panePointer to the SSplitPane object to remove.

Definition at line 337 of file SSplitWnd.cpp.

◆ ResetPanesPostion()

int SSplitWnd::ResetPanesPostion ( SplitPaneList & lstPane,
SplitPaneList & lstPanePriority,
PANESIZELIST & lstPaneSize,
int offset )
protected

Resets the positions of the panes based on size information.

Parameters
lstPaneThe list of panes.
lstPanePriorityThe list of panes sorted by priority.
lstPaneSizeThe list of pane size information.
offsetThe offset to apply.
Returns
The remaining space after resetting positions.

Definition at line 499 of file SSplitWnd.cpp.

◆ SetAttribute()

virtual HRESULT SSplitWnd::SetAttribute ( const SNS::SStringW &amp;amp;amp;amp; strAttribName,
const SNS::SStringW &amp;amp;amp;amp; strValue,
BOOL bLoading = FALSE )
inlinevirtual

< Size of the splitter bar.

< Skin object for the splitter bar.

< Flag indicating if the panes are adjustable in size.

< Orientation of the split window, see SPLIT_ORINTATION.

Reimplemented from SWindow.

Definition at line 263 of file SSplitWnd.h.

◆ ShowPane()

BOOL SSplitWnd::ShowPane ( UINT iPane)

Shows a pane.

Parameters
iPaneThe index of the pane to show.
Returns
TRUE if successful, otherwise FALSE.

Definition at line 39 of file SSplitWnd.cpp.

◆ SortPriorityList()

void SSplitWnd::SortPriorityList ( SplitPaneList & lstPane)
protected

Sorts the pane list by priority.

Parameters
lstPaneThe list of panes to sort.

Definition at line 571 of file SSplitWnd.cpp.

◆ UpdateChildrenPosition()

void SSplitWnd::UpdateChildrenPosition ( )
protected

Updates the positions of child windows.

Definition at line 330 of file SSplitWnd.cpp.

Member Data Documentation

◆ m_bAdjustable

BOOL SSplitWnd::m_bAdjustable
protected

Flag indicating if the panes are adjustable in size.

Definition at line 103 of file SSplitWnd.h.

◆ m_iDragSep

int SSplitWnd::m_iDragSep
protected

Index of the splitter bar being dragged, -1 if no dragging.

Definition at line 107 of file SSplitWnd.h.

◆ m_lstPane

SplitPaneList SSplitWnd::m_lstPane
protected

List of panes sorted by display order.

Definition at line 98 of file SSplitWnd.h.

◆ m_lstPriority

SplitPaneList SSplitWnd::m_lstPriority
protected

List of panes sorted by priority.

Definition at line 99 of file SSplitWnd.h.

◆ m_orintation

int SSplitWnd::m_orintation
protected

Orientation of the split window, see SPLIT_ORINTATION.

Definition at line 101 of file SSplitWnd.h.

◆ m_pSkinSep

SAutoRefPtr<ISkinObj> SSplitWnd::m_pSkinSep
protected

Skin object for the splitter bar.

Definition at line 104 of file SSplitWnd.h.

◆ m_ptDragPrev

CPoint SSplitWnd::m_ptDragPrev
protected

Previous position during dragging.

Definition at line 106 of file SSplitWnd.h.

◆ m_spliterSize

int SSplitWnd::m_spliterSize
protected

Size of the splitter bar.

Definition at line 100 of file SSplitWnd.h.


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