]> git.saurik.com Git - wxWidgets.git/blob - include/wx/aui/floatpane.h
bf158933b8a6e2f6d2536e378be92a7bc3609434
[wxWidgets.git] / include / wx / aui / floatpane.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/aui/floatpane.h
3 // Purpose: wxaui: wx advanced user interface - docking window manager
4 // Author: Benjamin I. Williams
5 // Modified by:
6 // Created: 2005-05-17
7 // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
8 // Licence: wxWindows Library Licence, Version 3.1
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_FLOATPANE_H_
12 #define _WX_FLOATPANE_H_
13
14 // ----------------------------------------------------------------------------
15 // headers
16 // ----------------------------------------------------------------------------
17
18 #include "wx/defs.h"
19 #include "wx/weakref.h"
20
21 #if wxUSE_AUI
22
23 #if wxUSE_MINIFRAME
24 #include "wx/minifram.h"
25 #define wxAuiFloatingFrameBaseClass wxMiniFrame
26 #else
27 #include "wx/frame.h"
28 #define wxAuiFloatingFrameBaseClass wxFrame
29 #endif
30
31 class WXDLLIMPEXP_AUI wxAuiFloatingFrame : public wxAuiFloatingFrameBaseClass
32 {
33 public:
34 wxAuiFloatingFrame(wxWindow* parent,
35 wxAuiManager* ownerMgr,
36 const wxAuiPaneInfo& pane,
37 wxWindowID id = wxID_ANY,
38 long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
39 wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT |
40 wxCLIP_CHILDREN
41 );
42 virtual ~wxAuiFloatingFrame();
43 void SetPaneWindow(const wxAuiPaneInfo& pane);
44 wxAuiManager* GetOwnerManager() const;
45
46 protected:
47 virtual void OnMoveStart();
48 virtual void OnMoving(const wxRect& windowRect, wxDirection dir);
49 virtual void OnMoveFinished();
50
51 private:
52 void OnSize(wxSizeEvent& event);
53 void OnClose(wxCloseEvent& event);
54 void OnMoveEvent(wxMoveEvent& event);
55 void OnIdle(wxIdleEvent& event);
56 void OnActivate(wxActivateEvent& event);
57 static bool isMouseDown();
58
59 private:
60 wxWindow* m_paneWindow; // pane window being managed
61 bool m_solidDrag; // true if system uses solid window drag
62 bool m_moving;
63 wxRect m_lastRect;
64 wxRect m_last2Rect;
65 wxRect m_last3Rect;
66 wxSize m_lastSize;
67 wxDirection m_lastDirection;
68
69 wxWeakRef<wxAuiManager> m_ownerMgr;
70 wxAuiManager m_mgr;
71
72 #ifndef SWIG
73 DECLARE_EVENT_TABLE()
74 DECLARE_CLASS(wxAuiFloatingFrame)
75 #endif // SWIG
76 };
77
78 #endif // wxUSE_AUI
79 #endif //_WX_FLOATPANE_H_
80