wxAUI_MGR_TRANSPARENT_DRAG = 1 << 2,
wxAUI_MGR_TRANSPARENT_HINT = 1 << 3,
wxAUI_MGR_TRANSPARENT_HINT_FADE = 1 << 4,
+ // The venetian blind effect is ONLY used when the wxAUI_MGR_TRANSPARENT_HINT has been used, but
+ // at runtime we determine we cannot use transparency (because, for instance, the OS does not support it).
+ // setting this flag drops back in such circumstances (only) to the behaviour without wxAUI_MGR_TRANSPARENT_HINT
+ wxAUI_MGR_DISABLE_VENETIAN_BLINDS = 1 << 5,
+ wxAUI_MGR_DISABLE_VENETIAN_BLINDS_FADE = 1 << 6,
wxAUI_MGR_DEFAULT = wxAUI_MGR_ALLOW_FLOATING |
wxAUI_MGR_TRANSPARENT_HINT |
- wxAUI_MGR_TRANSPARENT_HINT_FADE
+ wxAUI_MGR_TRANSPARENT_HINT_FADE |
+ wxAUI_MGR_DISABLE_VENETIAN_BLINDS_FADE
};
enum wxPaneDockArtSetting
wxString caption; // caption displayed on the window
wxWindow* window; // window that is in this pane
- wxWindow* frame; // floating frame window that holds the pane
+ wxFrame* frame; // floating frame window that holds the pane
unsigned int state; // a combination of wxPaneState values
int dock_direction; // dock direction (top, bottom, left, right, center)
public:
- wxFrameManager(wxFrame* frame = NULL,
+ wxFrameManager(wxWindow* managed_wnd = NULL,
unsigned int flags = wxAUI_MGR_DEFAULT);
virtual ~wxFrameManager();
void UnInit();
void SetFlags(unsigned int flags);
unsigned int GetFlags() const;
- void SetFrame(wxWindow* frame);
- wxWindow* GetFrame() const;
+ void SetManagedWindow(wxWindow* managed_wnd);
+ wxWindow* GetManagedWindow() const;
#ifdef SWIG
%disownarg( wxDockArt* art_provider );
bool AddPane(wxWindow* window,
const wxPaneInfo& pane_info);
+
+ bool AddPane(wxWindow* window,
+ const wxPaneInfo& pane_info,
+ const wxPoint& drop_pos);
bool AddPane(wxWindow* window,
int direction = wxLEFT,
void Update();
-protected:
+
+public:
void DrawHintRect(wxWindow* pane_window,
const wxPoint& pt,
const wxPoint& offset);
+ virtual void ShowHint(const wxRect& rect);
+ virtual void HideHint();
+public:
+
+ // deprecated -- please use SetManagedWindow() and
+ // and GetManagedWindow() instead
+
+ wxDEPRECATED( void SetFrame(wxFrame* frame) );
+ wxDEPRECATED( wxFrame* GetFrame() const );
+
+protected:
+
+
+
void DoFrameLayout();
void LayoutAddPane(wxSizer* container,
wxDockUIPartArray& uiparts,
bool spacer_only = false);
+ virtual bool ProcessDockResult(wxPaneInfo& target,
+ const wxPaneInfo& new_pos);
+
bool DoDrop(wxDockInfoArray& docks,
wxPaneInfoArray& panes,
wxPaneInfo& drop,
void GetPanePositionsAndSizes(wxDockInfo& dock,
wxArrayInt& positions,
wxArrayInt& sizes);
- virtual void ShowHint(const wxRect& rect);
- virtual void HideHint();
+
+
+public:
+
+ // public events (which can be invoked externally)
+ void OnRender(wxFrameManagerEvent& evt);
+ void OnPaneButton(wxFrameManagerEvent& evt);
protected:
- // events
- void OnPaint(wxPaintEvent& event);
- void OnEraseBackground(wxEraseEvent& event);
- void OnSize(wxSizeEvent& event);
- void OnSetCursor(wxSetCursorEvent& event);
- void OnLeftDown(wxMouseEvent& event);
- void OnLeftUp(wxMouseEvent& event);
- void OnMotion(wxMouseEvent& event);
- void OnLeaveWindow(wxMouseEvent& event);
- void OnPaneButton(wxFrameManagerEvent& event);
- void OnChildFocus(wxChildFocusEvent& event);
- void OnHintFadeTimer(wxTimerEvent& event);
+ // protected events
+ void OnPaint(wxPaintEvent& evt);
+ void OnEraseBackground(wxEraseEvent& evt);
+ void OnSize(wxSizeEvent& evt);
+ void OnSetCursor(wxSetCursorEvent& evt);
+ void OnLeftDown(wxMouseEvent& evt);
+ void OnLeftUp(wxMouseEvent& evt);
+ void OnMotion(wxMouseEvent& evt);
+ void OnLeaveWindow(wxMouseEvent& evt);
+ void OnChildFocus(wxChildFocusEvent& evt);
+ void OnHintFadeTimer(wxTimerEvent& evt);
protected:
wxRect m_last_hint; // last hint rectangle
wxPoint m_last_mouse_move; // last mouse move position (see OnMotion)
- wxWindow* m_hint_wnd; // transparent hint window (for now, only msw)
- wxTimer m_hint_fadetimer; // transparent fade timer (for now, only msw)
- int m_hint_fadeamt; // transparent fade amount (for now, only msw)
+ wxFrame* m_hint_wnd; // transparent hint window, if supported by platform
+ wxTimer m_hint_fadetimer; // transparent fade timer
+ wxByte m_hint_fadeamt; // transparent fade amount
+ wxByte m_hint_fademax; // maximum value of hint fade
#ifndef SWIG
DECLARE_EVENT_TABLE()
button = 0;
veto_flag = false;
canveto_flag = true;
+ dc = NULL;
}
#ifndef SWIG
wxFrameManagerEvent(const wxFrameManagerEvent& c) : wxEvent(c)
button = c.button;
veto_flag = c.veto_flag;
canveto_flag = c.canveto_flag;
+ dc = c.dc;
}
#endif
wxEvent *Clone() const { return new wxFrameManagerEvent(*this); }
void SetPane(wxPaneInfo* p) { pane = p; }
void SetButton(int b) { button = b; }
+ void SetDC(wxDC* pdc) { dc = pdc; }
+
wxPaneInfo* GetPane() { return pane; }
int GetButton() { return button; }
+ wxDC* GetDC() { return dc; }
void Veto(bool veto = true) { veto_flag = veto; }
bool GetVeto() const { return veto_flag; }
int button;
bool veto_flag;
bool canveto_flag;
+ wxDC* dc;
#ifndef SWIG
private:
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANEBUTTON, 0)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANECLOSE, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_RENDER, 0)
END_DECLARE_EVENT_TYPES()
typedef void (wxEvtHandler::*wxFrameManagerEventFunction)(wxFrameManagerEvent&);
wx__DECLARE_EVT0(wxEVT_AUI_PANEBUTTON, wxFrameManagerEventHandler(func))
#define EVT_AUI_PANECLOSE(func) \
wx__DECLARE_EVT0(wxEVT_AUI_PANECLOSE, wxFrameManagerEventHandler(func))
+#define EVT_AUI_RENDER(func) \
+ wx__DECLARE_EVT0(wxEVT_AUI_RENDER, wxFrameManagerEventHandler(func))
#else
%constant wxEventType wxEVT_AUI_PANEBUTTON;
%constant wxEventType wxEVT_AUI_PANECLOSE;
+%constant wxEventType wxEVT_AUI_RENDER;
%pythoncode {
EVT_AUI_PANEBUTTON = wx.PyEventBinder( wxEVT_AUI_PANEBUTTON )
EVT_AUI_PANECLOSE = wx.PyEventBinder( wxEVT_AUI_PANECLOSE )
+ EVT_AUI_RENDER = wx.PyEventBinder( wxEVT_AUI_RENDER )
}
#endif // SWIG