projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Set/GetTitle out of wxWindowBase, forked and put to gtk/window.h and mgl/window.h...
[wxWidgets.git]
/
include
/
wx
/
generic
/
splitter.h
diff --git
a/include/wx/generic/splitter.h
b/include/wx/generic/splitter.h
index 69cd1f478de04ccac630b9e38edc2f5b02fd32d6..09fa572b011ccf7245ed24b24a6f57859d05c2ca 100644
(file)
--- a/
include/wx/generic/splitter.h
+++ b/
include/wx/generic/splitter.h
@@
-60,16
+60,30
@@
public:
// Public API
// Default constructor
// Public API
// Default constructor
- wxSplitterWindow();
+ wxSplitterWindow()
+ {
+ Init();
+ }
// Normal constructor
wxSplitterWindow(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
// Normal constructor
wxSplitterWindow(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxSP_3D|wxCLIP_CHILDREN,
- const wxString& name = "splitter");
+ long style = wxSP_3D,
+ const wxString& name = "splitter")
+ {
+ Init();
+ Create(parent, id, pos, size, style, name);
+ }
+
~wxSplitterWindow();
~wxSplitterWindow();
+ bool Create(wxWindow *parent, wxWindowID id = -1,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxSP_3D,
+ const wxString& name = "splitter");
+
// Gets the only or left/top pane
wxWindow *GetWindow1() const { return m_windowOne; }
// Gets the only or left/top pane
wxWindow *GetWindow1() const { return m_windowOne; }
@@
-164,35
+178,43
@@
public:
void OnIdle(wxIdleEvent& event);
// Draws borders
void OnIdle(wxIdleEvent& event);
// Draws borders
- void DrawBorders(wxDC& dc);
+ v
irtual v
oid DrawBorders(wxDC& dc);
// Draws the sash
// Draws the sash
- void DrawSash(wxDC& dc);
+ v
irtual v
oid DrawSash(wxDC& dc);
// Draws the sash tracker (for whilst moving the sash)
// Draws the sash tracker (for whilst moving the sash)
- void DrawSashTracker(int x, int y);
+ v
irtual v
oid DrawSashTracker(int x, int y);
// Tests for x, y over sash
// Tests for x, y over sash
- bool SashHitTest(int x, int y, int tolerance = 2);
+
virtual
bool SashHitTest(int x, int y, int tolerance = 2);
// Resizes subwindows
// Resizes subwindows
- void SizeWindows();
+ v
irtual v
oid SizeWindows();
// Initialize colours
void InitColours();
// Initialize colours
void InitColours();
+ void SetNeedUpdating(bool needUpdating) { m_needUpdating = needUpdating; }
+ bool GetNeedUpdating() const { return m_needUpdating ; }
+
protected:
// our event handlers
void OnSashPosChanged(wxSplitterEvent& event);
void OnSashPosChanging(wxSplitterEvent& event);
void OnDoubleClick(wxSplitterEvent& event);
void OnUnsplitEvent(wxSplitterEvent& event);
protected:
// our event handlers
void OnSashPosChanged(wxSplitterEvent& event);
void OnSashPosChanging(wxSplitterEvent& event);
void OnDoubleClick(wxSplitterEvent& event);
void OnUnsplitEvent(wxSplitterEvent& event);
+ void OnSetCursor(wxSetCursorEvent& event);
void SendUnsplitEvent(wxWindow *winRemoved);
void SendUnsplitEvent(wxWindow *winRemoved);
+protected:
+ void Init();
+
+
int m_splitMode;
bool m_permitUnsplitAlways;
int m_splitMode;
bool m_permitUnsplitAlways;
- bool m_needUpdating; // when in live mode, set th
e
to TRUE to resize children in idle
+ bool m_needUpdating; // when in live mode, set th
is
to TRUE to resize children in idle
wxWindow* m_windowOne;
wxWindow* m_windowTwo;
int m_dragMode;
wxWindow* m_windowOne;
wxWindow* m_windowTwo;
int m_dragMode;
@@
-235,6
+257,7
@@
public:
: wxCommandEvent(type)
{
SetEventObject(splitter);
: wxCommandEvent(type)
{
SetEventObject(splitter);
+ if (splitter) m_id = splitter->GetId();
}
// SASH_POS_CHANGED methods
}
// SASH_POS_CHANGED methods
@@
-300,39
+323,39
@@
private:
typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&);
#define EVT_SPLITTER_SASH_POS_CHANGED(id, fn) \
typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&);
#define EVT_SPLITTER_SASH_POS_CHANGED(id, fn) \
-
{
\
+
DECLARE_EVENT_TABLE_ENTRY(
\
wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, \
id, \
-1, \
(wxObjectEventFunction)(wxEventFunction)(wxSplitterEventFunction) &fn, \
NULL \
wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, \
id, \
-1, \
(wxObjectEventFunction)(wxEventFunction)(wxSplitterEventFunction) &fn, \
NULL \
-
}
,
+
)
,
#define EVT_SPLITTER_SASH_POS_CHANGING(id, fn) \
#define EVT_SPLITTER_SASH_POS_CHANGING(id, fn) \
-
{
\
+
DECLARE_EVENT_TABLE_ENTRY(
\
wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, \
id, \
-1, \
(wxObjectEventFunction)(wxEventFunction)(wxSplitterEventFunction) &fn, \
NULL \
wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, \
id, \
-1, \
(wxObjectEventFunction)(wxEventFunction)(wxSplitterEventFunction) &fn, \
NULL \
-
}
,
+
)
,
#define EVT_SPLITTER_DCLICK(id, fn) \
#define EVT_SPLITTER_DCLICK(id, fn) \
-
{
\
+
DECLARE_EVENT_TABLE_ENTRY(
\
wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, \
id, \
-1, \
(wxObjectEventFunction)(wxEventFunction)(wxSplitterEventFunction) &fn, \
NULL \
wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, \
id, \
-1, \
(wxObjectEventFunction)(wxEventFunction)(wxSplitterEventFunction) &fn, \
NULL \
-
}
,
+
)
,
#define EVT_SPLITTER_UNSPLIT(id, fn) \
#define EVT_SPLITTER_UNSPLIT(id, fn) \
-
{
\
+
DECLARE_EVENT_TABLE_ENTRY(
\
wxEVT_COMMAND_SPLITTER_UNSPLIT, \
id, \
-1, \
(wxObjectEventFunction)(wxEventFunction)(wxSplitterEventFunction) &fn, \
NULL \
wxEVT_COMMAND_SPLITTER_UNSPLIT, \
id, \
-1, \
(wxObjectEventFunction)(wxEventFunction)(wxSplitterEventFunction) &fn, \
NULL \
-
}
,
+
)
,
#endif // __SPLITTERH_G__
#endif // __SPLITTERH_G__