#include <window.h>
Inheritance diagram for MWidgets::Window:

Public Member Functions | |
| Window () | |
| Constructor. | |
| ~Window () | |
| Destructor. | |
| virtual void | Create (int x, int y, int w, int h, string caption) |
| Create widgets window. | |
| virtual WIDGET_TYPE | GetType () |
| Returns class's identifier like WINDOW or BUTTON. | |
| void | DockToLeft (DockWindow *pWnd) |
| Dock window to left side of container. | |
| void | DockToTop (DockWindow *pWnd) |
| Dock window to left top of container. | |
| void | DockToRight (DockWindow *pWnd) |
| Dock window to left right of container. | |
| void | DockToBottom (DockWindow *pWnd) |
| Dock window to left bottom of container. | |
| void | UndockFromLeft (DockWindow *pWnd) |
| Undock window from left side of container. | |
| void | UndockFromTop (DockWindow *pWnd) |
| Undock window from left top of container. | |
| void | UndockFromRight (DockWindow *pWnd) |
| Undock window from left right of container. | |
| void | UndockFromBottom (DockWindow *pWnd) |
| Undock window from left bottom of container. | |
| int | GetLeftWidth () |
| Returns widht of left dock side. | |
| int | GetLeftHeight () |
| Returns height of left dock side,relative to allready docked windows. | |
| int | GetTopHeight () |
| Returns height of top dock side. | |
| int | GetTopWidth () |
| Returns width of top dock side,relative to allready docked windows. | |
| int | GetRightWidth () |
| Returns widht of right dock side. | |
| int | GetRightHeight () |
| Returns height of right dock side,relative to allready docked windows. | |
| int | GetBottomHeight () |
| Returns height of bottom dock side. | |
| int | GetBottomWidth () |
| Returns width of bottom dock side,relative to allready docked windows. | |
| RECT | UpdateLayout (DockWindow *pWnd=NULL) |
| Reorder all docked windows, recalculate sizes. | |
| bool | IsFirst (DockWindow *pWnd) |
| Return true if dockwindow is first in layout. | |
| bool | IsLast (DockWindow *pWnd) |
| Return true if dockwindow is last in layout. | |
| void | ActivateDockWindows (bool bActivate) |
| Activate or disactivate all docked windows. | |
Protected Member Functions | |
| virtual LRESULT | OnMessage (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) |
| Subclassing for overrides. | |
Protected Attributes | |
| std::vector< DockWindow * > | m_vecLeft |
| Array of docked to left windows. | |
| std::vector< DockWindow * > | m_vecTop |
| Array of docked to top windows. | |
| std::vector< DockWindow * > | m_vecRight |
| Array of docked to right windows. | |
| std::vector< DockWindow * > | m_vecBottom |
| Array of docked to bottom windows. | |
| int | m_iLeftWidth |
| Width of left dock side. | |
| int | m_iTopHeight |
| Height of top dock side. | |
| int | m_iRightWidth |
| Width of left dock side. | |
| int | m_iBottomHeight |
| Height of bottom dock side. | |
| std::map< int, DockStartPos > | m_mapDockOrder |
| Shows oder in which docked windows are added,as offset. | |
Classes | |
| struct | DockStartPos |
| Structure for ordering layout. More... | |
Definition at line 14 of file window.h.
| MWidgets::Window::Window | ( | ) |
Constructor.
Definition at line 21 of file window.cpp.
References MWidgets::BOTTOM_DOCK, MWidgets::LEFT_DOCK, m_iBottomHeight, m_iLeftWidth, m_iRightWidth, m_iTopHeight, m_mapDockOrder, MWidgets::RIGHT_DOCK, and MWidgets::TOP_DOCK.
| MWidgets::Window::~Window | ( | ) |
Destructor.
Definition at line 37 of file window.cpp.
References MWidgets::Widget::m_pOnSizeHandler.
| void MWidgets::Window::ActivateDockWindows | ( | bool | bActivate | ) |
Activate or disactivate all docked windows.
| bActivate | if equals true windows will be activated. |
Definition at line 633 of file window.cpp.
References m_vecBottom, m_vecLeft, m_vecRight, and m_vecTop.
Referenced by OnMessage().
| void MWidgets::Window::Create | ( | int | x, | |
| int | y, | |||
| int | w, | |||
| int | h, | |||
| string | caption | |||
| ) | [virtual] |
Create widgets window.
| w | new widget's width. | |
| h | new widget's height. | |
| caption | new widget's caption. |
Definition at line 43 of file window.cpp.
References MWidgets::Widget::Create().
| void MWidgets::Window::DockToBottom | ( | DockWindow * | pWnd | ) |
Dock window to left bottom of container.
Definition at line 166 of file window.cpp.
References MWidgets::BOTTOM_DOCK, MWidgets::Widget::GetHwnd(), MWidgets::Widget::m_hWnd, m_iBottomHeight, m_iLeftWidth, m_iRightWidth, m_mapDockOrder, m_vecBottom, and MWidgets::DockWindow::SetLayout().
Referenced by MWidgets::DockWindow::Dock().
| void MWidgets::Window::DockToLeft | ( | DockWindow * | pWnd | ) |
Dock window to left side of container.
Definition at line 84 of file window.cpp.
References MWidgets::Widget::GetHwnd(), MWidgets::LEFT_DOCK, MWidgets::Widget::m_hWnd, m_iBottomHeight, m_iLeftWidth, m_iTopHeight, m_mapDockOrder, m_vecLeft, and MWidgets::DockWindow::SetLayout().
Referenced by MWidgets::DockWindow::Dock().
| void MWidgets::Window::DockToRight | ( | DockWindow * | pWnd | ) |
Dock window to left right of container.
Definition at line 139 of file window.cpp.
References MWidgets::Widget::GetHwnd(), MWidgets::Widget::m_hWnd, m_iBottomHeight, m_iRightWidth, m_iTopHeight, m_mapDockOrder, m_vecRight, MWidgets::RIGHT_DOCK, and MWidgets::DockWindow::SetLayout().
Referenced by MWidgets::DockWindow::Dock().
| void MWidgets::Window::DockToTop | ( | DockWindow * | pWnd | ) |
Dock window to left top of container.
Definition at line 111 of file window.cpp.
References MWidgets::Widget::GetHwnd(), MWidgets::Widget::m_hWnd, m_iLeftWidth, m_iRightWidth, m_iTopHeight, m_mapDockOrder, m_vecTop, MWidgets::DockWindow::SetLayout(), and MWidgets::TOP_DOCK.
Referenced by MWidgets::DockWindow::Dock().
| int MWidgets::Window::GetBottomHeight | ( | ) |
Returns height of bottom dock side.
Definition at line 332 of file window.cpp.
References m_iBottomHeight.
Referenced by MWidgets::DockWindow::CheckDockPos().
| int MWidgets::Window::GetBottomWidth | ( | ) |
Returns width of bottom dock side,relative to allready docked windows.
Definition at line 337 of file window.cpp.
References MWidgets::Widget::m_hWnd, and m_vecBottom.
Referenced by MWidgets::DockWindow::CheckDockPos().
| int MWidgets::Window::GetLeftHeight | ( | ) |
Returns height of left dock side,relative to allready docked windows.
Definition at line 286 of file window.cpp.
References MWidgets::Widget::m_hWnd, and m_vecLeft.
Referenced by MWidgets::DockWindow::CheckDockPos().
| int MWidgets::Window::GetLeftWidth | ( | ) |
Returns widht of left dock side.
Definition at line 281 of file window.cpp.
References m_iLeftWidth.
Referenced by MWidgets::DockWindow::CheckDockPos().
| int MWidgets::Window::GetRightHeight | ( | ) |
Returns height of right dock side,relative to allready docked windows.
Definition at line 320 of file window.cpp.
References MWidgets::Widget::m_hWnd, and m_vecRight.
Referenced by MWidgets::DockWindow::CheckDockPos().
| int MWidgets::Window::GetRightWidth | ( | ) |
Returns widht of right dock side.
Definition at line 315 of file window.cpp.
References m_iRightWidth.
Referenced by MWidgets::DockWindow::CheckDockPos().
| int MWidgets::Window::GetTopHeight | ( | ) |
Returns height of top dock side.
Definition at line 298 of file window.cpp.
References m_iTopHeight.
Referenced by MWidgets::DockWindow::CheckDockPos().
| int MWidgets::Window::GetTopWidth | ( | ) |
Returns width of top dock side,relative to allready docked windows.
Definition at line 303 of file window.cpp.
References MWidgets::Widget::m_hWnd, and m_vecTop.
Referenced by MWidgets::DockWindow::CheckDockPos().
| WIDGET_TYPE MWidgets::Window::GetType | ( | ) | [virtual] |
Returns class's identifier like WINDOW or BUTTON.
Implements MWidgets::Widget.
Definition at line 79 of file window.cpp.
References MWidgets::WINDOW.
| bool MWidgets::Window::IsFirst | ( | DockWindow * | pWnd | ) |
Return true if dockwindow is first in layout.
Definition at line 581 of file window.cpp.
References MWidgets::BOTTOM_DOCK, MWidgets::DockWindow::GetDockPos(), MWidgets::LEFT_DOCK, m_vecBottom, m_vecLeft, m_vecRight, m_vecTop, MWidgets::NONE_DOCK, MWidgets::RIGHT_DOCK, and MWidgets::TOP_DOCK.
| bool MWidgets::Window::IsLast | ( | DockWindow * | pWnd | ) |
Return true if dockwindow is last in layout.
Definition at line 607 of file window.cpp.
References MWidgets::BOTTOM_DOCK, MWidgets::DockWindow::GetDockPos(), MWidgets::LEFT_DOCK, m_vecBottom, m_vecLeft, m_vecRight, m_vecTop, MWidgets::NONE_DOCK, MWidgets::RIGHT_DOCK, and MWidgets::TOP_DOCK.
Referenced by MWidgets::DockWindow::OnMessage().
| LRESULT MWidgets::Window::OnMessage | ( | HWND | hWnd, | |
| UINT | message, | |||
| WPARAM | wParam, | |||
| LPARAM | lParam | |||
| ) | [protected, virtual] |
Subclassing for overrides.
Reimplemented from MWidgets::Widget.
Definition at line 48 of file window.cpp.
References ActivateDockWindows(), m_iBottomHeight, m_iLeftWidth, m_iRightWidth, m_iTopHeight, MWidgets::Widget::OnMessage(), MWidgets::Widget::OnSize(), and UpdateLayout().
| void MWidgets::Window::UndockFromBottom | ( | DockWindow * | pWnd | ) |
Undock window from left bottom of container.
Definition at line 259 of file window.cpp.
References MWidgets::BOTTOM_DOCK, EXCEPT, MWidgets::LEFT_DOCK, m_iBottomHeight, m_mapDockOrder, m_vecBottom, and MWidgets::RIGHT_DOCK.
Referenced by MWidgets::DockWindow::UnDock().
| void MWidgets::Window::UndockFromLeft | ( | DockWindow * | pWnd | ) |
Undock window from left side of container.
Definition at line 193 of file window.cpp.
References MWidgets::BOTTOM_DOCK, EXCEPT, MWidgets::LEFT_DOCK, m_iLeftWidth, m_mapDockOrder, m_vecLeft, and MWidgets::TOP_DOCK.
Referenced by MWidgets::DockWindow::UnDock().
| void MWidgets::Window::UndockFromRight | ( | DockWindow * | pWnd | ) |
Undock window from left right of container.
Definition at line 237 of file window.cpp.
References MWidgets::BOTTOM_DOCK, EXCEPT, m_iRightWidth, m_mapDockOrder, m_vecRight, MWidgets::RIGHT_DOCK, and MWidgets::TOP_DOCK.
Referenced by MWidgets::DockWindow::UnDock().
| void MWidgets::Window::UndockFromTop | ( | DockWindow * | pWnd | ) |
Undock window from left top of container.
Definition at line 215 of file window.cpp.
References EXCEPT, MWidgets::LEFT_DOCK, m_iTopHeight, m_mapDockOrder, m_vecTop, MWidgets::RIGHT_DOCK, and MWidgets::TOP_DOCK.
Referenced by MWidgets::DockWindow::UnDock().
| RECT MWidgets::Window::UpdateLayout | ( | DockWindow * | pWnd = NULL |
) |
Reorder all docked windows, recalculate sizes.
| pWnd | anchor window. |
Definition at line 349 of file window.cpp.
References MWidgets::BOTTOM_DOCK, MWidgets::DockWindow::GetDockPos(), MWidgets::Widget::GetHwnd(), MWidgets::LEFT_DOCK, MWidgets::Widget::m_hWnd, m_iBottomHeight, m_iLeftWidth, m_iRightWidth, m_iTopHeight, m_mapDockOrder, m_vecBottom, m_vecLeft, m_vecRight, m_vecTop, MWidgets::NONE_DOCK, MWidgets::RIGHT_DOCK, and MWidgets::TOP_DOCK.
Referenced by MWidgets::DockWindow::Dock(), OnMessage(), MWidgets::DockWindow::OnMessage(), and MWidgets::DockWindow::UnDock().
int MWidgets::Window::m_iBottomHeight [protected] |
Height of bottom dock side.
Definition at line 24 of file window.h.
Referenced by DockToBottom(), DockToLeft(), DockToRight(), GetBottomHeight(), OnMessage(), UndockFromBottom(), UpdateLayout(), and Window().
int MWidgets::Window::m_iLeftWidth [protected] |
Width of left dock side.
Definition at line 21 of file window.h.
Referenced by DockToBottom(), DockToLeft(), DockToTop(), GetLeftWidth(), OnMessage(), UndockFromLeft(), UpdateLayout(), and Window().
int MWidgets::Window::m_iRightWidth [protected] |
Width of left dock side.
Definition at line 23 of file window.h.
Referenced by DockToBottom(), DockToRight(), DockToTop(), GetRightWidth(), OnMessage(), UndockFromRight(), UpdateLayout(), and Window().
int MWidgets::Window::m_iTopHeight [protected] |
Height of top dock side.
Definition at line 22 of file window.h.
Referenced by DockToLeft(), DockToRight(), DockToTop(), GetTopHeight(), OnMessage(), UndockFromTop(), UpdateLayout(), and Window().
std::map<int,DockStartPos> MWidgets::Window::m_mapDockOrder [protected] |
Shows oder in which docked windows are added,as offset.
Definition at line 32 of file window.h.
Referenced by DockToBottom(), DockToLeft(), DockToRight(), DockToTop(), UndockFromBottom(), UndockFromLeft(), UndockFromRight(), UndockFromTop(), UpdateLayout(), and Window().
std::vector<DockWindow*> MWidgets::Window::m_vecBottom [protected] |
Array of docked to bottom windows.
Definition at line 20 of file window.h.
Referenced by ActivateDockWindows(), DockToBottom(), GetBottomWidth(), IsFirst(), IsLast(), UndockFromBottom(), and UpdateLayout().
std::vector<DockWindow*> MWidgets::Window::m_vecLeft [protected] |
Array of docked to left windows.
Definition at line 17 of file window.h.
Referenced by ActivateDockWindows(), DockToLeft(), GetLeftHeight(), IsFirst(), IsLast(), UndockFromLeft(), and UpdateLayout().
std::vector<DockWindow*> MWidgets::Window::m_vecRight [protected] |
Array of docked to right windows.
Definition at line 19 of file window.h.
Referenced by ActivateDockWindows(), DockToRight(), GetRightHeight(), IsFirst(), IsLast(), UndockFromRight(), and UpdateLayout().
std::vector<DockWindow*> MWidgets::Window::m_vecTop [protected] |
Array of docked to top windows.
Definition at line 18 of file window.h.
Referenced by ActivateDockWindows(), DockToTop(), GetTopWidth(), IsFirst(), IsLast(), UndockFromTop(), and UpdateLayout().
1.4.7