// Adjusts the panes
void OnSize(wxSizeEvent& event);
+ // In live mode, resize child windows in idle time
+ void OnIdle(wxIdleEvent& event);
+
// Draws borders
void DrawBorders(wxDC& dc);
protected:
// our event handlers
void OnSashPosChanged(wxSplitterEvent& event);
+ void OnSashPosChanging(wxSplitterEvent& event);
void OnDoubleClick(wxSplitterEvent& event);
void OnUnsplitEvent(wxSplitterEvent& event);
void SendUnsplitEvent(wxWindow *winRemoved);
int m_splitMode;
+ bool m_permitUnsplitAlways;
+ bool m_needUpdating; // when in live mode, set the to TRUE to resize children in idle
wxWindow* m_windowOne;
wxWindow* m_windowTwo;
int m_dragMode;
: wxCommandEvent(type)
{
SetEventObject(splitter);
+ if (splitter) m_id = splitter->GetId();
}
// SASH_POS_CHANGED methods
// all
void SetSashPosition(int pos)
{
- wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED );
+ wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED
+ || GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING);
m_data.pos = pos;
}
int GetSashPosition() const
{
- wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED );
+ wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED
+ || GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING);
return m_data.pos;
}
}
private:
- friend wxSplitterWindow;
+ friend class WXDLLEXPORT wxSplitterWindow;
// data for the different types of event
union
NULL \
},
-#define EVT_SPLITTER_DCLICK(id, fn) \
+#define EVT_SPLITTER_SASH_POS_CHANGING(id, fn) \
+ { \
+ wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, \
+ id, \
+ -1, \
+ (wxObjectEventFunction)(wxEventFunction)(wxSplitterEventFunction) &fn, \
+ NULL \
+ },
+
+#define EVT_SPLITTER_DCLICK(id, fn) \
{ \
- wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, \
+ wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, \
id, \
-1, \
(wxObjectEventFunction)(wxEventFunction)(wxSplitterEventFunction) &fn, \