git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43574
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// wx event machinery
BEGIN_DECLARE_EVENT_TYPES()
// wx event machinery
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_PANEMAXIMIZE, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANERESTORE, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_BUTTON, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_CLOSE, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_MAXIMIZE, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_RESTORE, 0)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_RENDER, 0)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_RENDER, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_FINDMANAGER, 0)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_FIND_MANAGER, 0)
END_DECLARE_EVENT_TYPES()
typedef void (wxEvtHandler::*wxAuiManagerEventFunction)(wxAuiManagerEvent&);
END_DECLARE_EVENT_TYPES()
typedef void (wxEvtHandler::*wxAuiManagerEventFunction)(wxAuiManagerEvent&);
#define wxAuiManagerEventHandler(func) \
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxAuiManagerEventFunction, &func)
#define wxAuiManagerEventHandler(func) \
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxAuiManagerEventFunction, &func)
-#define EVT_AUI_PANEBUTTON(func) \
- wx__DECLARE_EVT0(wxEVT_AUI_PANEBUTTON, wxAuiManagerEventHandler(func))
-#define EVT_AUI_PANECLOSE(func) \
- wx__DECLARE_EVT0(wxEVT_AUI_PANECLOSE, wxAuiManagerEventHandler(func))
-#define EVT_AUI_PANEMAXIMIZE(func) \
- wx__DECLARE_EVT0(wxEVT_AUI_PANEMAXIMIZE, wxAuiManagerEventHandler(func))
-#define EVT_AUI_PANERESTORE(func) \
- wx__DECLARE_EVT0(wxEVT_AUI_PANERESTORE, wxAuiManagerEventHandler(func))
+#define EVT_AUI_PANE_BUTTON(func) \
+ wx__DECLARE_EVT0(wxEVT_AUI_PANE_BUTTON, wxAuiManagerEventHandler(func))
+#define EVT_AUI_PANE_CLOSE(func) \
+ wx__DECLARE_EVT0(wxEVT_AUI_PANE_CLOSE, wxAuiManagerEventHandler(func))
+#define EVT_AUI_PANE_MAXIMIZE(func) \
+ wx__DECLARE_EVT0(wxEVT_AUI_PANE_MAXIMIZE, wxAuiManagerEventHandler(func))
+#define EVT_AUI_PANE_RESTORE(func) \
+ wx__DECLARE_EVT0(wxEVT_AUI_PANE_RESTORE, wxAuiManagerEventHandler(func))
#define EVT_AUI_RENDER(func) \
wx__DECLARE_EVT0(wxEVT_AUI_RENDER, wxAuiManagerEventHandler(func))
#define EVT_AUI_RENDER(func) \
wx__DECLARE_EVT0(wxEVT_AUI_RENDER, wxAuiManagerEventHandler(func))
-#define EVT_AUI_FINDMANAGER(func) \
- wx__DECLARE_EVT0(wxEVT_AUI_FINDMANAGER, wxAuiManagerEventHandler(func))
+#define EVT_AUI_FIND_MANAGER(func) \
+ wx__DECLARE_EVT0(wxEVT_AUI_FIND_MANAGER, wxAuiManagerEventHandler(func))
-%constant wxEventType wxEVT_AUI_PANEBUTTON;
-%constant wxEventType wxEVT_AUI_PANECLOSE;
-%constant wxEventType wxEVT_AUI_PANEMAXIMIZE;
-%constant wxEventType wxEVT_AUI_PANERESTORE;
+%constant wxEventType wxEVT_AUI_PANE_BUTTON;
+%constant wxEventType wxEVT_AUI_PANE_CLOSE;
+%constant wxEventType wxEVT_AUI_PANE_MAXIMIZE;
+%constant wxEventType wxEVT_AUI_PANE_RESTORE;
%constant wxEventType wxEVT_AUI_RENDER;
%constant wxEventType wxEVT_AUI_RENDER;
-%constant wxEventType wxEVT_AUI_FINDMANAGER;
+%constant wxEventType wxEVT_AUI_FIND_MANAGER;
- EVT_AUI_PANEBUTTON = wx.PyEventBinder( wxEVT_AUI_PANEBUTTON )
- EVT_AUI_PANECLOSE = wx.PyEventBinder( wxEVT_AUI_PANECLOSE )
- EVT_AUI_PANEMAXIMIZE = wx.PyEventBinder( wxEVT_AUI_PANEMAXIMIZE )
- EVT_AUI_PANERESTORE = wx.PyEventBinder( wxEVT_AUI_PANERESTORE )
+ EVT_AUI_PANE_BUTTON = wx.PyEventBinder( wxEVT_AUI_PANE_BUTTON )
+ EVT_AUI_PANE_CLOSE = wx.PyEventBinder( wxEVT_AUI_PANE_CLOSE )
+ EVT_AUI_PANE_MAXIMIZE = wx.PyEventBinder( wxEVT_AUI_PANE_MAXIMIZE )
+ EVT_AUI_PANE_RESTORE = wx.PyEventBinder( wxEVT_AUI_PANE_RESTORE )
EVT_AUI_RENDER = wx.PyEventBinder( wxEVT_AUI_RENDER )
EVT_AUI_RENDER = wx.PyEventBinder( wxEVT_AUI_RENDER )
- EVT_AUI_FINDMANAGER = wx.PyEventBinder( wxEVT_AUI_FINDMANAGER )
+ EVT_AUI_FIND_MANAGER = wx.PyEventBinder( wxEVT_AUI_FIND_MANAGER )
EVT_UPDATE_UI(ID_HorizontalGradient, MyFrame::OnUpdateUI)
EVT_MENU_RANGE(MyFrame::ID_FirstPerspective, MyFrame::ID_FirstPerspective+1000,
MyFrame::OnRestorePerspective)
EVT_UPDATE_UI(ID_HorizontalGradient, MyFrame::OnUpdateUI)
EVT_MENU_RANGE(MyFrame::ID_FirstPerspective, MyFrame::ID_FirstPerspective+1000,
MyFrame::OnRestorePerspective)
- EVT_AUI_PANECLOSE(MyFrame::OnPaneClose)
+ EVT_AUI_PANE_CLOSE(MyFrame::OnPaneClose)
EVT_AUINOTEBOOK_ALLOW_DND(wxID_ANY, MyFrame::OnAllowNotebookDnD)
EVT_AUINOTEBOOK_PAGE_CLOSE(wxID_ANY, MyFrame::OnNotebookPageClose)
END_EVENT_TABLE()
EVT_AUINOTEBOOK_ALLOW_DND(wxID_ANY, MyFrame::OnAllowNotebookDnD)
EVT_AUINOTEBOOK_PAGE_CLOSE(wxID_ANY, MyFrame::OnNotebookPageClose)
END_EVENT_TABLE()
Layer(0).Row(0).Position(0);
// Carry over the minimum size
Layer(0).Row(0).Position(0);
// Carry over the minimum size
+ wxSize pane_min_size = pane.window->GetMinSize();
+
+ // if the frame window's max size is greater than the min size
+ // then set the max size to the min size as well
+ wxSize cur_max_size = GetMaxSize();
+ if (cur_max_size.x < pane.min_size.x ||
+ cur_max_size.y < pane.min_size.y)
+ {
+ SetMaxSize(pane_min_size);
+ }
+
SetMinSize(pane.window->GetMinSize());
m_mgr.AddPane(m_pane_window, contained_pane);
SetMinSize(pane.window->GetMinSize());
m_mgr.AddPane(m_pane_window, contained_pane);
wxAuiPaneInfo wxAuiNullPaneInfo;
wxAuiDockInfo wxAuiNullDockInfo;
wxAuiPaneInfo wxAuiNullPaneInfo;
wxAuiDockInfo wxAuiNullDockInfo;
-DEFINE_EVENT_TYPE(wxEVT_AUI_PANEBUTTON)
-DEFINE_EVENT_TYPE(wxEVT_AUI_PANECLOSE)
-DEFINE_EVENT_TYPE(wxEVT_AUI_PANEMAXIMIZE)
-DEFINE_EVENT_TYPE(wxEVT_AUI_PANERESTORE)
+DEFINE_EVENT_TYPE(wxEVT_AUI_PANE_BUTTON)
+DEFINE_EVENT_TYPE(wxEVT_AUI_PANE_CLOSE)
+DEFINE_EVENT_TYPE(wxEVT_AUI_PANE_MAXIMIZE)
+DEFINE_EVENT_TYPE(wxEVT_AUI_PANE_RESTORE)
DEFINE_EVENT_TYPE(wxEVT_AUI_RENDER)
DEFINE_EVENT_TYPE(wxEVT_AUI_RENDER)
-DEFINE_EVENT_TYPE(wxEVT_AUI_FINDMANAGER)
+DEFINE_EVENT_TYPE(wxEVT_AUI_FIND_MANAGER)
#ifdef __WXMAC__
// a few defines to avoid nameclashes
#ifdef __WXMAC__
// a few defines to avoid nameclashes
BEGIN_EVENT_TABLE(wxAuiManager, wxEvtHandler)
BEGIN_EVENT_TABLE(wxAuiManager, wxEvtHandler)
- EVT_AUI_PANEBUTTON(wxAuiManager::OnPaneButton)
+ EVT_AUI_PANE_BUTTON(wxAuiManager::OnPaneButton)
EVT_AUI_RENDER(wxAuiManager::OnRender)
EVT_PAINT(wxAuiManager::OnPaint)
EVT_ERASE_BACKGROUND(wxAuiManager::OnEraseBackground)
EVT_AUI_RENDER(wxAuiManager::OnRender)
EVT_PAINT(wxAuiManager::OnPaint)
EVT_ERASE_BACKGROUND(wxAuiManager::OnEraseBackground)
EVT_MOTION(wxAuiManager::OnMotion)
EVT_LEAVE_WINDOW(wxAuiManager::OnLeaveWindow)
EVT_CHILD_FOCUS(wxAuiManager::OnChildFocus)
EVT_MOTION(wxAuiManager::OnMotion)
EVT_LEAVE_WINDOW(wxAuiManager::OnLeaveWindow)
EVT_CHILD_FOCUS(wxAuiManager::OnChildFocus)
- EVT_AUI_FINDMANAGER(wxAuiManager::OnFindManager)
+ EVT_AUI_FIND_MANAGER(wxAuiManager::OnFindManager)
EVT_TIMER(101, wxAuiManager::OnHintFadeTimer)
END_EVENT_TABLE()
EVT_TIMER(101, wxAuiManager::OnHintFadeTimer)
END_EVENT_TABLE()
// need to be managed by the manager itself.
wxAuiManager* wxAuiManager::GetManager(wxWindow* window)
{
// need to be managed by the manager itself.
wxAuiManager* wxAuiManager::GetManager(wxWindow* window)
{
- wxAuiManagerEvent evt(wxEVT_AUI_FINDMANAGER);
+ wxAuiManagerEvent evt(wxEVT_AUI_FIND_MANAGER);
evt.SetManager(NULL);
evt.ResumePropagation(wxEVENT_PROPAGATE_MAX);
if (!window->ProcessEvent(evt))
evt.SetManager(NULL);
evt.ResumePropagation(wxEVENT_PROPAGATE_MAX);
if (!window->ProcessEvent(evt))
- wxAuiManagerEvent e(wxEVT_AUI_PANECLOSE);
+ wxAuiManagerEvent e(wxEVT_AUI_PANE_CLOSE);
e.SetPane(&pane);
e.SetCanVeto(evt.CanVeto());
ProcessMgrEvent(e);
e.SetPane(&pane);
e.SetCanVeto(evt.CanVeto());
ProcessMgrEvent(e);
if (m_action_part == HitTest(event.GetX(), event.GetY()))
{
// fire button-click event
if (m_action_part == HitTest(event.GetX(), event.GetY()))
{
// fire button-click event
- wxAuiManagerEvent e(wxEVT_AUI_PANEBUTTON);
+ wxAuiManagerEvent e(wxEVT_AUI_PANE_BUTTON);
e.SetManager(this);
e.SetPane(m_action_part->pane);
e.SetButton(m_action_part->button->button_id);
e.SetManager(this);
e.SetPane(m_action_part->pane);
e.SetButton(m_action_part->button->button_id);
if (evt.button == wxAUI_BUTTON_CLOSE)
{
// fire pane close event
if (evt.button == wxAUI_BUTTON_CLOSE)
{
// fire pane close event
- wxAuiManagerEvent e(wxEVT_AUI_PANECLOSE);
+ wxAuiManagerEvent e(wxEVT_AUI_PANE_CLOSE);
e.SetManager(this);
e.SetPane(evt.pane);
ProcessMgrEvent(e);
e.SetManager(this);
e.SetPane(evt.pane);
ProcessMgrEvent(e);
else if (evt.button == wxAUI_BUTTON_MAXIMIZE_RESTORE && !pane.IsMaximized())
{
// fire pane close event
else if (evt.button == wxAUI_BUTTON_MAXIMIZE_RESTORE && !pane.IsMaximized())
{
// fire pane close event
- wxAuiManagerEvent e(wxEVT_AUI_PANEMAXIMIZE);
+ wxAuiManagerEvent e(wxEVT_AUI_PANE_MAXIMIZE);
e.SetManager(this);
e.SetPane(evt.pane);
ProcessMgrEvent(e);
e.SetManager(this);
e.SetPane(evt.pane);
ProcessMgrEvent(e);
else if (evt.button == wxAUI_BUTTON_MAXIMIZE_RESTORE && pane.IsMaximized())
{
// fire pane close event
else if (evt.button == wxAUI_BUTTON_MAXIMIZE_RESTORE && pane.IsMaximized())
{
// fire pane close event
- wxAuiManagerEvent e(wxEVT_AUI_PANERESTORE);
+ wxAuiManagerEvent e(wxEVT_AUI_PANE_RESTORE);
e.SetManager(this);
e.SetPane(evt.pane);
ProcessMgrEvent(e);
e.SetManager(this);
e.SetPane(evt.pane);
ProcessMgrEvent(e);