#ifndef _WX_DYNAMICSASH_H_
#define _WX_DYNAMICSASH_H_
+#include "wx/gizmos/gizmos.h"
+
/*
wxDynamicSashWindow
for instance, you wish to scroll a subwindow of the view you add to
your wxDynamicSashWindow object, rather than scrolling the whole view.)
In this case, you will need to construct your wxDynamicSashWindow without
- the wxMANAGE_SCROLLBARS style and you will need to use the
+ the wxDS_MANAGE_SCROLLBARS style and you will need to use the
GetHScrollBar() and GetVScrollBar() methods to retrieve the scrollbar
controls and call SetEventHanler() on them to redirect the scrolling
events whenever your window is reparented by wxDyanmicSashWindow.
/*
- wxMANAGE_SCROLLBARS is a default style of wxDynamicSashWindow which
+ wxDS_MANAGE_SCROLLBARS is a default style of wxDynamicSashWindow which
will cause it to respond to scrollbar events for your application by
automatically scrolling the child view.
*/
-#define wxMANAGE_SCROLLBARS 0x00800000
+#define wxDS_MANAGE_SCROLLBARS 0x0010
+
+
+/*
+ wxDS_DRAG_CORNER style indicates that the views can also be resized by
+ dragging the corner piece between the scrollbars, and which is reflected up
+ to the frame if necessary.
+*/
+#define wxDS_DRAG_CORNER 0x0020
/*
a child of the wxDynamicSashWindow. wxDynamicSashWindow will
automatically reparent it to the proper place in its window hierarchy.
*/
-class wxDynamicSashSplitEvent : public wxCommandEvent {
+class WXDLLIMPEXP_GIZMOS wxDynamicSashSplitEvent : public wxCommandEvent {
public:
wxDynamicSashSplitEvent();
+ wxDynamicSashSplitEvent(const wxDynamicSashSplitEvent& event): wxCommandEvent(event) { }
wxDynamicSashSplitEvent(wxObject *target);
+ virtual wxEvent* Clone() const { return new wxDynamicSashSplitEvent(*this); }
+
private:
DECLARE_DYNAMIC_CLASS(wxDynamicSashSplitEvent)
};
the scrollbars' event handlers connected to your view's event handler
class.
*/
-class wxDynamicSashUnifyEvent : public wxCommandEvent {
+class WXDLLIMPEXP_GIZMOS wxDynamicSashUnifyEvent : public wxCommandEvent {
public:
wxDynamicSashUnifyEvent();
+ wxDynamicSashUnifyEvent(const wxDynamicSashUnifyEvent& event): wxCommandEvent(event) {}
wxDynamicSashUnifyEvent(wxObject *target);
+ virtual wxEvent* Clone() const { return new wxDynamicSashUnifyEvent(*this); }
+
private:
- DECLARE_DYNAMIC_CLASS(wxDynamicSashUnifyEvent);
+ DECLARE_DYNAMIC_CLASS(wxDynamicSashUnifyEvent)
};
+typedef void (wxEvtHandler::*wxDynamicSashSplitEventFunction)(wxDynamicSashSplitEvent&);
+typedef void (wxEvtHandler::*wxDynamicSashUnifyEventFunction)(wxDynamicSashUnifyEvent&);
+
/*
wxDynamicSashWindow. See above.
*/
-class wxDynamicSashWindow : public wxWindow {
+WXDLLIMPEXP_GIZMOS extern const wxChar* wxDynamicSashWindowNameStr;
+
+class WXDLLIMPEXP_GIZMOS wxDynamicSashWindow : public wxWindow {
public:
wxDynamicSashWindow();
wxDynamicSashWindow(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
- long style = wxCLIP_CHILDREN | wxMANAGE_SCROLLBARS,
- const wxString& name = "dynamicSashWindow");
+ long style = wxCLIP_CHILDREN | wxDS_MANAGE_SCROLLBARS | wxDS_DRAG_CORNER,
+ const wxString& name = wxDynamicSashWindowNameStr);
virtual ~wxDynamicSashWindow();
virtual bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
- long style = wxCLIP_CHILDREN | wxMANAGE_SCROLLBARS,
- const wxString& name = "dynamicSashWindow");
+ long style = wxCLIP_CHILDREN | wxDS_MANAGE_SCROLLBARS | wxDS_DRAG_CORNER,
+ const wxString& name = wxDynamicSashWindowNameStr);
virtual wxScrollBar *GetHScrollBar(const wxWindow *child) const;
virtual wxScrollBar *GetVScrollBar(const wxWindow *child) const;