]> git.saurik.com Git - wxWidgets.git/blob - include/wx/aui/floatpane.h
added wxDebugContext::SetShutdownNotifyFunction() (patch 1887210)
[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 // RCS-ID: $Id$
8 // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
9 // Licence: wxWindows Library Licence, Version 3.1
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_FLOATPANE_H_
13 #define _WX_FLOATPANE_H_
14
15 // ----------------------------------------------------------------------------
16 // headers
17 // ----------------------------------------------------------------------------
18
19 #include "wx/defs.h"
20
21 #if wxUSE_AUI
22
23 #include "wx/frame.h"
24 #include "wx/weakref.h"
25
26 #if defined( __WXMSW__ ) || defined( __WXMAC__ ) || defined( __WXGTK__ )
27 #include "wx/minifram.h"
28 #define wxAuiFloatingFrameBaseClass wxMiniFrame
29 #else
30 #define wxAuiFloatingFrameBaseClass wxFrame
31 #endif
32
33 class WXDLLIMPEXP_AUI wxAuiFloatingFrame : public wxAuiFloatingFrameBaseClass
34 {
35 public:
36 wxAuiFloatingFrame(wxWindow* parent,
37 wxAuiManager* owner_mgr,
38 const wxAuiPaneInfo& pane,
39 wxWindowID id = wxID_ANY,
40 long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
41 wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT |
42 wxCLIP_CHILDREN
43 );
44 virtual ~wxAuiFloatingFrame();
45 void SetPaneWindow(const wxAuiPaneInfo& pane);
46 wxAuiManager* GetOwnerManager() const;
47
48 protected:
49 virtual void OnMoveStart();
50 virtual void OnMoving(const wxRect& window_rect, wxDirection dir);
51 virtual void OnMoveFinished();
52
53 private:
54 void OnSize(wxSizeEvent& event);
55 void OnClose(wxCloseEvent& event);
56 void OnMoveEvent(wxMoveEvent& event);
57 void OnIdle(wxIdleEvent& event);
58 void OnActivate(wxActivateEvent& event);
59 static bool isMouseDown();
60
61 private:
62 wxWindow* m_pane_window; // pane window being managed
63 bool m_solid_drag; // true if system uses solid window drag
64 bool m_moving;
65 wxRect m_last_rect;
66 wxRect m_last2_rect;
67 wxRect m_last3_rect;
68 wxSize m_last_size;
69 wxDirection m_lastDirection;
70
71 wxWeakRef<wxAuiManager> m_owner_mgr;
72 wxAuiManager m_mgr;
73
74 #ifndef SWIG
75 DECLARE_EVENT_TABLE()
76 DECLARE_CLASS(wxAuiFloatingFrame)
77 #endif // SWIG
78 };
79
80 #endif // wxUSE_AUI
81 #endif //_WX_FLOATPANE_H_
82