src/dockwindow.h

Go to the documentation of this file.
00001 /*
00002 * Copyright (c) 2006 by Kirill Kolodyazhniy.
00003 * See the file "license.terms" for information on usage and redistribution
00004 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
00005 */
00006 
00007 #ifndef M_DOCKWINDOW_H
00008 #define M_DOCKWINDOW_H
00009 
00010 namespace MWidgets
00011 {
00013         enum DOCKPOS
00014         {
00015                 LEFT_DOCK,
00016                 TOP_DOCK,
00017                 RIGHT_DOCK,
00018                 BOTTOM_DOCK,
00019                 NONE_DOCK
00020         };
00021         class Window;
00023         class DockWindow:public Widget
00024         {
00025         protected:
00026                 bool m_bDrawGripper;
00027                 Window *m_pParent;
00028                 POINT m_ptPrevMousePos;
00029                 RECT  m_rPrevRect;
00030                 bool m_bDrag;
00031                 WORD m_wDotPatternBmp[8];
00032                 RECT m_rPrevWndFloatSize;
00033                 DOCKPOS m_dpDocked;
00034                 float m_fLayout;
00035                 bool m_bActive;
00036         protected:
00038                 virtual LRESULT OnMessage (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
00040                 void DrawGripper();
00042                 void DrawDragFrame(RECT* pRect);
00044                 void UnDock();
00047                 void Dock(DOCKPOS pos);
00048 
00049         public:
00051                 DockWindow();
00056                 virtual void Create(Widget* parent,int x,int y,int w,int h,string caption);
00058                 virtual WIDGET_TYPE GetType();
00062                 DOCKPOS CheckDockPos(POINT* pPos,RECT* pRect);
00064                 DOCKPOS GetDockPos();
00066                 float GetLayout();
00068                 void SetLayout(float val);
00070                 void DockToLeft();
00072                 void DockToTop();
00074                 void DockToRight();
00076                 void DockToBottom();
00077         };
00078 };
00079 
00080 #endif

Generated on Thu Oct 26 13:47:45 2006 for MWidgets by  doxygen 1.4.7