floatpane.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. #ifndef _WX_FLOATPANE_H_
  11. #define _WX_FLOATPANE_H_
  12. // ----------------------------------------------------------------------------
  13. // headers
  14. // ----------------------------------------------------------------------------
  15. #include "wx/defs.h"
  16. #include "wx/weakref.h"
  17. #if wxUSE_AUI
  18. #if wxUSE_MINIFRAME
  19. #include "wx/minifram.h"
  20. #define wxAuiFloatingFrameBaseClass wxMiniFrame
  21. #else
  22. #include "wx/frame.h"
  23. #define wxAuiFloatingFrameBaseClass wxFrame
  24. #endif
  25. class WXDLLIMPEXP_AUI wxAuiFloatingFrame : public wxAuiFloatingFrameBaseClass
  26. {
  27. public:
  28. wxAuiFloatingFrame(wxWindow* parent,
  29. wxAuiManager* ownerMgr,
  30. const wxAuiPaneInfo& pane,
  31. wxWindowID id = wxID_ANY,
  32. long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
  33. wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT |
  34. wxCLIP_CHILDREN
  35. );
  36. virtual ~wxAuiFloatingFrame();
  37. void SetPaneWindow(const wxAuiPaneInfo& pane);
  38. wxAuiManager* GetOwnerManager() const;
  39. protected:
  40. virtual void OnMoveStart();
  41. virtual void OnMoving(const wxRect& windowRect, wxDirection dir);
  42. virtual void OnMoveFinished();
  43. private:
  44. void OnSize(wxSizeEvent& event);
  45. void OnClose(wxCloseEvent& event);
  46. void OnMoveEvent(wxMoveEvent& event);
  47. void OnIdle(wxIdleEvent& event);
  48. void OnActivate(wxActivateEvent& event);
  49. static bool isMouseDown();
  50. private:
  51. wxWindow* m_paneWindow; // pane window being managed
  52. bool m_solidDrag; // true if system uses solid window drag
  53. bool m_moving;
  54. wxRect m_lastRect;
  55. wxRect m_last2Rect;
  56. wxRect m_last3Rect;
  57. wxSize m_lastSize;
  58. wxDirection m_lastDirection;
  59. wxWeakRef<wxAuiManager> m_ownerMgr;
  60. wxAuiManager m_mgr;
  61. #ifndef SWIG
  62. DECLARE_EVENT_TABLE()
  63. DECLARE_CLASS(wxAuiFloatingFrame)
  64. #endif // SWIG
  65. };
  66. #endif // wxUSE_AUI
  67. #endif //_WX_FLOATPANE_H_