]> git.saurik.com Git - wxWidgets.git/blob - include/wx/aui/floatpane.h
Fixed a rare wxAuiFloatingFrame dtor crash on MSW using a registration mechanism...
[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
25 #if defined( __WXMSW__ ) || defined( __WXMAC__ ) || defined( __WXGTK__ )
26 #include "wx/minifram.h"
27 #define wxAuiFloatingFrameBaseClass wxMiniFrame
28 #else
29 #define wxAuiFloatingFrameBaseClass wxFrame
30 #endif
31
32 class WXDLLIMPEXP_AUI wxAuiFloatingFrame : public wxAuiFloatingFrameBaseClass
33 {
34 friend class wxAuiManager;
35
36 public:
37 wxAuiFloatingFrame(wxWindow* parent,
38 wxAuiManager* owner_mgr,
39 const wxAuiPaneInfo& pane,
40 wxWindowID id = wxID_ANY,
41 long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
42 wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT |
43 wxCLIP_CHILDREN
44 );
45 virtual ~wxAuiFloatingFrame();
46 void SetPaneWindow(const wxAuiPaneInfo& pane);
47 wxAuiManager* GetOwnerManager() const;
48
49 protected:
50 void SetOwnerManager(wxAuiManager* owner_mgr);
51 virtual void OnMoveStart();
52 virtual void OnMoving(const wxRect& window_rect, wxDirection dir);
53 virtual void OnMoveFinished();
54
55 private:
56 void OnSize(wxSizeEvent& event);
57 void OnClose(wxCloseEvent& event);
58 void OnMoveEvent(wxMoveEvent& event);
59 void OnIdle(wxIdleEvent& event);
60 void OnActivate(wxActivateEvent& event);
61 static bool isMouseDown();
62
63 private:
64 wxWindow* m_pane_window; // pane window being managed
65 bool m_solid_drag; // true if system uses solid window drag
66 bool m_moving;
67 wxRect m_last_rect;
68 wxRect m_last2_rect;
69 wxRect m_last3_rect;
70 wxSize m_last_size;
71 wxDirection m_lastDirection;
72
73 wxAuiManager* m_owner_mgr;
74 wxAuiManager m_mgr;
75
76 #ifndef SWIG
77 DECLARE_EVENT_TABLE()
78 DECLARE_CLASS(wxAuiFloatingFrame)
79 #endif // SWIG
80 };
81
82 #endif // wxUSE_AUI
83 #endif //_WX_FLOATPANE_H_
84