Windows C++ Library
|
This is a window which hosts 2 other windows either side by side or one above the other. More...
#include <SplitWnd.hpp>
Public Types | |
enum | Split { VERTICAL, HORIZONTAL } |
The style of split. More... | |
enum | Sizing { FIXED, RESIZEABLE } |
The style of pane resizing. More... | |
enum | { LEFT_PANE = 0, RIGHT_PANE = 1, TOP_PANE = 0, BOTTOM_PANE = 1 } |
The Index of the panes. More... | |
Public Member Functions | |
CSplitWnd (Sizing eSizing) | |
Constructor. | |
CSplitWnd (Split eSplit, Sizing eSizing) | |
Constructor. | |
virtual | ~CSplitWnd () |
Destructor. | |
Split | SplitStyle () const |
Get the split style. | |
void | SetSplitStyle (Split eSplit) |
Set the split style. | |
CWnd * | Pane (size_t nPane) const |
Get the window inside a pane. | |
void | SetPane (size_t nPane, CWnd *pWnd) |
Set the window inside a pane. | |
uint | SizingBarPos () const |
Get the position of the sizing bar. | |
void | SetSizingBarPos (uint nPos) |
Set the position of the sizing bar. | |
CRect | PaneRect (size_t nPane) const |
Get the rectangle for a pane. | |
CRect | SizingBarRect () const |
Get the rectangle for the sizing bar. | |
Protected Member Functions | |
virtual void | GetClassParams (WNDCLASS &rParams) |
Get the window class settings. | |
virtual void | GetCreateParams (WNDCREATE &rParams) |
Get the window instance settings. | |
virtual void | OnResize (int iFlag, const CSize &rNewSize) |
Resize the child panes. | |
virtual void | OnPaint (CDC &rDC) |
Paint the window. | |
virtual void | OnSetCursor (HWND hWnd, uint nHitCode, uint nMouseMsg) |
Set the cursor for this window or one of it's children. | |
virtual void | OnLeftButtonDown (const CPoint &ptCursor, uint nKeyFlags) |
Handle a mouse click over the sizing bar. | |
virtual void | OnLeftButtonUp (const CPoint &ptCursor, uint nKeyFlags) |
Handle a mouse click over the sizing bar. | |
virtual void | OnMouseMove (const CPoint &ptCursor, uint nKeyFlags) |
Handle resizng of the panes. | |
void | Initialise () |
Common construction. | |
CRect | PaneRect (size_t nPane, const CRect &rcClient) const |
Get the rectangle for a pane. | |
Static Protected Member Functions | |
static int | ClipBarPos (int iBarPos, int iMin, int iMax) |
Clip the bar position. | |
Protected Attributes | |
CWnd * | m_pPanes [2] |
The window panes. | |
Split | m_eSplit |
The position of the split. | |
Sizing | m_eSizing |
The ability to resize the panes. | |
uint | m_nBarPos |
The x or y position of the bar. | |
CCursor | m_curArrow |
The arrow cursor. | |
CCursor | m_curSizer |
The sizing cursor. | |
Private Member Functions | |
CSplitWnd (const CSplitWnd &) | |
CSplitWnd & | operator= (const CSplitWnd &) |
This is a window which hosts 2 other windows either side by side or one above the other.
A bar separates the two windows and can be used to resize them.
enum CSplitWnd::Split |
enum CSplitWnd::Sizing |
anonymous enum |
CSplitWnd::CSplitWnd | ( | Sizing | eSizing | ) |
Constructor.
CSplitWnd::CSplitWnd | ( | Split | eSplit, |
Sizing | eSizing | ||
) |
Constructor.
CSplitWnd::~CSplitWnd | ( | ) | [virtual] |
Destructor.
CSplitWnd::CSplitWnd | ( | const CSplitWnd & | ) | [private] |
CSplitWnd::Split CSplitWnd::SplitStyle | ( | ) | const [inline] |
Get the split style.
void CSplitWnd::SetSplitStyle | ( | Split | eSplit | ) |
Set the split style.
CWnd * CSplitWnd::Pane | ( | size_t | nPane | ) | const |
Get the window inside a pane.
void CSplitWnd::SetPane | ( | size_t | nPane, |
CWnd * | pWnd | ||
) |
Set the window inside a pane.
uint CSplitWnd::SizingBarPos | ( | ) | const [inline] |
Get the position of the sizing bar.
void CSplitWnd::SetSizingBarPos | ( | uint | nPos | ) | [inline] |
Set the position of the sizing bar.
CRect CSplitWnd::PaneRect | ( | size_t | nPane | ) | const |
Get the rectangle for a pane.
CRect CSplitWnd::SizingBarRect | ( | ) | const |
Get the rectangle for the sizing bar.
void CSplitWnd::GetClassParams | ( | WNDCLASS & | rParams | ) | [protected, virtual] |
Get the window class settings.
Reimplemented from CPopupWnd.
void CSplitWnd::GetCreateParams | ( | WNDCREATE & | rParams | ) | [protected, virtual] |
Get the window instance settings.
Reimplemented from CCtrlWnd.
void CSplitWnd::OnResize | ( | int | iFlag, |
const CSize & | rNewSize | ||
) | [protected, virtual] |
Resize the child panes.
Reimplemented from CMsgWnd.
void CSplitWnd::OnPaint | ( | CDC & | rDC | ) | [protected, virtual] |
Paint the window.
Reimplemented from CMsgWnd.
void CSplitWnd::OnSetCursor | ( | HWND | hWnd, |
uint | nHitCode, | ||
uint | nMouseMsg | ||
) | [protected, virtual] |
Set the cursor for this window or one of it's children.
Reimplemented from CMsgWnd.
void CSplitWnd::OnLeftButtonDown | ( | const CPoint & | ptCursor, |
uint | nKeyFlags | ||
) | [protected, virtual] |
Handle a mouse click over the sizing bar.
Reimplemented from CPopupWnd.
void CSplitWnd::OnLeftButtonUp | ( | const CPoint & | ptCursor, |
uint | nKeyFlags | ||
) | [protected, virtual] |
Handle a mouse click over the sizing bar.
Reimplemented from CPopupWnd.
void CSplitWnd::OnMouseMove | ( | const CPoint & | ptCursor, |
uint | nKeyFlags | ||
) | [protected, virtual] |
Handle resizng of the panes.
Reimplemented from CPopupWnd.
void CSplitWnd::Initialise | ( | ) | [protected] |
Common construction.
CRect CSplitWnd::PaneRect | ( | size_t | nPane, |
const CRect & | rcClient | ||
) | const [protected] |
Get the rectangle for a pane.
int CSplitWnd::ClipBarPos | ( | int | iBarPos, |
int | iMin, | ||
int | iMax | ||
) | [static, protected] |
Clip the bar position.
CWnd* CSplitWnd::m_pPanes[2] [protected] |
The window panes.
Split CSplitWnd::m_eSplit [protected] |
The position of the split.
Sizing CSplitWnd::m_eSizing [protected] |
The ability to resize the panes.
uint CSplitWnd::m_nBarPos [protected] |
The x or y position of the bar.
CCursor CSplitWnd::m_curArrow [protected] |
The arrow cursor.
CCursor CSplitWnd::m_curSizer [protected] |
The sizing cursor.