Layout fixes for wxPlotWindow [#1192416] + source cleaning to the wxW 2.6 coding starndards.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -326,12 +326,12 @@ public:
|
||||
// options
|
||||
// -------
|
||||
|
||||
void SetScrollOnThumbRelease( bool scrollOnThumbRelease = TRUE )
|
||||
void SetScrollOnThumbRelease( bool scrollOnThumbRelease = true )
|
||||
{ m_scrollOnThumbRelease = scrollOnThumbRelease; }
|
||||
bool GetScrollOnThumbRelease()
|
||||
{ return m_scrollOnThumbRelease; }
|
||||
|
||||
void SetEnlargeAroundWindowCentre( bool enlargeAroundWindowCentre = TRUE )
|
||||
void SetEnlargeAroundWindowCentre( bool enlargeAroundWindowCentre = true )
|
||||
{ m_enlargeAroundWindowCentre = enlargeAroundWindowCentre; }
|
||||
bool GetEnlargeAroundWindowCentre()
|
||||
{ return m_enlargeAroundWindowCentre; }
|
||||
@@ -389,51 +389,51 @@ typedef void (wxEvtHandler::*wxPlotEventFunction)(wxPlotEvent&);
|
||||
|
||||
#if WXWIN_COMPATIBILITY_EVENT_TYPES
|
||||
|
||||
#define EVT_PLOT(id, fn) { wxEVT_PLOT_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_SEL_CHANGING(id, fn) { wxEVT_PLOT_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_SEL_CHANGED(id, fn) { wxEVT_PLOT_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_CLICKED(id, fn) { wxEVT_PLOT_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_DOUBLECLICKED(id, fn) { wxEVT_PLOT_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_ZOOM_IN(id, fn) { wxEVT_PLOT_ZOOM_IN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_ZOOM_OUT(id, fn) { wxEVT_PLOT_ZOOM_OUT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_VALUE_SEL_CREATING(id, fn) { wxEVT_PLOT_VALUE_SEL_CREATING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_VALUE_SEL_CREATED(id, fn) { wxEVT_PLOT_VALUE_SEL_CREATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_VALUE_SEL_CHANGING(id, fn) { wxEVT_PLOT_VALUE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_VALUE_SEL_CHANGED(id, fn) { wxEVT_PLOT_VALUE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_AREA_SEL_CREATING(id, fn) { wxEVT_PLOT_AREA_SEL_CREATING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_AREA_SEL_CREATED(id, fn) { wxEVT_PLOT_AREA_SEL_CREATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_AREA_SEL_CHANGING(id, fn) { wxEVT_PLOT_AREA_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_AREA_SEL_CHANGED(id, fn) { wxEVT_PLOT_AREA_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_BEGIN_X_LABEL_EDIT(id, fn) { wxEVT_PLOT_BEGIN_X_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_END_X_LABEL_EDIT(id, fn) { wxEVT_PLOT_END_X_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_BEGIN_Y_LABEL_EDIT(id, fn) { wxEVT_PLOT_BEGIN_Y_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_END_Y_LABEL_EDIT(id, fn) { wxEVT_PLOT_END_Y_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_BEGIN_TITLE_EDIT(id, fn) { wxEVT_PLOT_BEGIN_TITLE_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_END_TITLE_EDIT(id, fn) { wxEVT_PLOT_END_TITLE_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT(id, fn) { wxEVT_PLOT_DOUBLECLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_SEL_CHANGING(id, fn) { wxEVT_PLOT_SEL_CHANGING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_SEL_CHANGED(id, fn) { wxEVT_PLOT_SEL_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_CLICKED(id, fn) { wxEVT_PLOT_CLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_DOUBLECLICKED(id, fn) { wxEVT_PLOT_DOUBLECLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_ZOOM_IN(id, fn) { wxEVT_PLOT_ZOOM_IN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_ZOOM_OUT(id, fn) { wxEVT_PLOT_ZOOM_OUT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_VALUE_SEL_CREATING(id, fn) { wxEVT_PLOT_VALUE_SEL_CREATING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_VALUE_SEL_CREATED(id, fn) { wxEVT_PLOT_VALUE_SEL_CREATED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_VALUE_SEL_CHANGING(id, fn) { wxEVT_PLOT_VALUE_SEL_CHANGING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_VALUE_SEL_CHANGED(id, fn) { wxEVT_PLOT_VALUE_SEL_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_AREA_SEL_CREATING(id, fn) { wxEVT_PLOT_AREA_SEL_CREATING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_AREA_SEL_CREATED(id, fn) { wxEVT_PLOT_AREA_SEL_CREATED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_AREA_SEL_CHANGING(id, fn) { wxEVT_PLOT_AREA_SEL_CHANGING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_AREA_SEL_CHANGED(id, fn) { wxEVT_PLOT_AREA_SEL_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_BEGIN_X_LABEL_EDIT(id, fn) { wxEVT_PLOT_BEGIN_X_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_END_X_LABEL_EDIT(id, fn) { wxEVT_PLOT_END_X_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_BEGIN_Y_LABEL_EDIT(id, fn) { wxEVT_PLOT_BEGIN_Y_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_END_Y_LABEL_EDIT(id, fn) { wxEVT_PLOT_END_Y_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_BEGIN_TITLE_EDIT(id, fn) { wxEVT_PLOT_BEGIN_TITLE_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
#define EVT_PLOT_END_TITLE_EDIT(id, fn) { wxEVT_PLOT_END_TITLE_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxPlotEventFunction) & fn, (wxObject *) NULL },
|
||||
|
||||
#else
|
||||
|
||||
#define EVT_PLOT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_CLICKED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_DOUBLECLICKED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_ZOOM_IN(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_ZOOM_IN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_ZOOM_OUT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_ZOOM_OUT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_VALUE_SEL_CREATING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_VALUE_SEL_CREATING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_VALUE_SEL_CREATED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_VALUE_SEL_CREATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_VALUE_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_VALUE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_VALUE_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_VALUE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_AREA_SEL_CREATING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_AREA_SEL_CREATING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_AREA_SEL_CREATED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_AREA_SEL_CREATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_AREA_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_AREA_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_AREA_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_AREA_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_BEGIN_X_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_BEGIN_X_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_END_X_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_END_X_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_BEGIN_Y_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_BEGIN_Y_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_END_Y_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_END_Y_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_BEGIN_TITLE_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_BEGIN_TITLE_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_END_TITLE_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_END_TITLE_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_DOUBLECLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_SEL_CHANGING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_SEL_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_CLICKED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_CLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_DOUBLECLICKED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_DOUBLECLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_ZOOM_IN(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_ZOOM_IN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_ZOOM_OUT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_ZOOM_OUT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_VALUE_SEL_CREATING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_VALUE_SEL_CREATING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_VALUE_SEL_CREATED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_VALUE_SEL_CREATED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_VALUE_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_VALUE_SEL_CHANGING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_VALUE_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_VALUE_SEL_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_AREA_SEL_CREATING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_AREA_SEL_CREATING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_AREA_SEL_CREATED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_AREA_SEL_CREATED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_AREA_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_AREA_SEL_CHANGING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_AREA_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_AREA_SEL_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_BEGIN_X_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_BEGIN_X_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_END_X_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_END_X_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_BEGIN_Y_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_BEGIN_Y_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_END_Y_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_END_Y_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_BEGIN_TITLE_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_BEGIN_TITLE_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
#define EVT_PLOT_END_TITLE_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_PLOT_END_TITLE_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) wxStaticCastEvent( wxPlotEventFunction, & fn ), (wxObject *) NULL ),
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -1,11 +1,13 @@
|
||||
/*
|
||||
* Program: wxPlotWindow
|
||||
*
|
||||
* Author: Robert Roebling
|
||||
*
|
||||
* Copyright: (C) 1999, Robert Roebling
|
||||
*
|
||||
*/
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: plot.cpp
|
||||
// Purpose: wxPlotWindow sample
|
||||
// Author: Robert Roebling
|
||||
// Modified by:
|
||||
// Created:
|
||||
// Copyright: (C) 1999, Robert Roebling
|
||||
// RCS-ID: $Id$
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
@@ -25,8 +27,7 @@
|
||||
#include "wx/sizer.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/intl.h"
|
||||
|
||||
#include <math.h>
|
||||
#include "wx/math.h"
|
||||
|
||||
// derived classes
|
||||
|
||||
@@ -68,12 +69,13 @@ public:
|
||||
void OnPlotClick( wxPlotEvent &event );
|
||||
void OnPlotDClick( wxPlotEvent &event );
|
||||
|
||||
private:
|
||||
|
||||
wxPlotWindow *m_plot;
|
||||
#if wxUSE_LOG
|
||||
wxTextCtrl *m_log;
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(MyFrame)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
@@ -92,30 +94,30 @@ IMPLEMENT_APP(MyApp)
|
||||
|
||||
// MyFrame
|
||||
|
||||
const int ID_QUIT = 108;
|
||||
const int ID_ABOUT = 109;
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame )
|
||||
|
||||
BEGIN_EVENT_TABLE(MyFrame,wxFrame)
|
||||
EVT_MENU (ID_ABOUT, MyFrame::OnAbout)
|
||||
EVT_MENU (ID_QUIT, MyFrame::OnQuit)
|
||||
EVT_PLOT_CLICKED ( -1, MyFrame::OnPlotClick)
|
||||
EVT_PLOT_DOUBLECLICKED ( -1, MyFrame::OnPlotDClick)
|
||||
EVT_MENU (wxID_ABOUT, MyFrame::OnAbout)
|
||||
EVT_MENU (wxID_EXIT, MyFrame::OnQuit)
|
||||
EVT_PLOT_CLICKED (wxID_ANY, MyFrame::OnPlotClick)
|
||||
EVT_PLOT_DOUBLECLICKED (wxID_ANY, MyFrame::OnPlotDClick)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
MyFrame::MyFrame()
|
||||
: wxFrame( (wxFrame *)NULL, -1, _T("wxPlotWindow sample"),
|
||||
: wxFrame( (wxFrame *)NULL, wxID_ANY, _T("wxPlotWindow sample"),
|
||||
wxPoint(20,20), wxSize(470,500) )
|
||||
{
|
||||
wxMenu *file_menu = new wxMenu();
|
||||
file_menu->Append( ID_ABOUT, _T("&About.."));
|
||||
file_menu->Append( ID_QUIT, _T("E&xit\tAlt-X"));
|
||||
wxMenu *fileMenu = new wxMenu();
|
||||
fileMenu->Append( wxID_EXIT, _T("E&xit\tAlt-X"), _T("Quit this program"));
|
||||
|
||||
wxMenuBar *menu_bar = new wxMenuBar();
|
||||
menu_bar->Append(file_menu, _T("&File"));
|
||||
wxMenu *helpMenu = new wxMenu;
|
||||
helpMenu->Append(wxID_ABOUT, _T("&About...\tF1"), _T("Show about dialog"));
|
||||
|
||||
SetMenuBar( menu_bar );
|
||||
wxMenuBar *menuBar = new wxMenuBar();
|
||||
menuBar->Append(fileMenu, _T("&File"));
|
||||
menuBar->Append(helpMenu, _T("&Help"));
|
||||
|
||||
SetMenuBar( menuBar );
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
CreateStatusBar(2);
|
||||
@@ -123,9 +125,9 @@ MyFrame::MyFrame()
|
||||
SetStatusWidths( 2, widths );
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
m_plot = new wxPlotWindow( this, -1, wxPoint(0,0), wxSize(100,100), wxSUNKEN_BORDER | wxPLOT_DEFAULT );
|
||||
m_plot = new wxPlotWindow( this, wxID_ANY, wxPoint(0,0), wxSize(100,100), wxSUNKEN_BORDER | wxPLOT_DEFAULT );
|
||||
m_plot->SetUnitsPerValue( 0.01 );
|
||||
// m_plot->SetScrollOnThumbRelease( TRUE );
|
||||
// m_plot->SetScrollOnThumbRelease( true );
|
||||
|
||||
m_plot->Add( new MyPlotCurve( 0, -1.5, 1.5 ) );
|
||||
m_plot->Add( new MyPlotCurve( 50, -1.5, 1.5 ) );
|
||||
@@ -137,7 +139,7 @@ MyFrame::MyFrame()
|
||||
m_plot->Add( oo );
|
||||
|
||||
#if wxUSE_LOG
|
||||
m_log = new wxTextCtrl( this, -1, _T("This is the log window.\n"), wxPoint(0,0), wxSize(100,100), wxTE_MULTILINE );
|
||||
m_log = new wxTextCtrl( this, wxID_ANY, _T("This is the log window.\n"), wxPoint(0,0), wxSize(100,100), wxTE_MULTILINE );
|
||||
wxLog *old_log = wxLog::SetActiveTarget( new wxLogTextCtrl( m_log ) );
|
||||
delete old_log;
|
||||
#endif // wxUSE_LOG
|
||||
@@ -151,18 +153,20 @@ MyFrame::MyFrame()
|
||||
|
||||
SetAutoLayout( true );
|
||||
SetSizer( topsizer );
|
||||
topsizer->Fit(this);
|
||||
topsizer->SetSizeHints(this);
|
||||
}
|
||||
|
||||
void MyFrame::OnQuit( wxCommandEvent &WXUNUSED(event) )
|
||||
{
|
||||
Close( true );
|
||||
Close( true );
|
||||
}
|
||||
|
||||
void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) )
|
||||
{
|
||||
(void)wxMessageBox( _T("wxPlotWindow Demo\n")
|
||||
_T("Robert Roebling (c) 1999,2000"),
|
||||
_T("About wxPlotWindow Demo"), wxICON_INFORMATION | wxOK );
|
||||
(void)wxMessageBox( _T("wxPlotWindow Demo\n")
|
||||
_T("Robert Roebling (c) 1999,2000"),
|
||||
_T("About wxPlotWindow Demo"), wxICON_INFORMATION | wxOK );
|
||||
}
|
||||
|
||||
void MyFrame::OnPlotClick( wxPlotEvent &event )
|
||||
@@ -186,8 +190,8 @@ void MyFrame::OnPlotDClick( wxPlotEvent &event )
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
wxFrame *frame = new MyFrame();
|
||||
frame->Show( TRUE );
|
||||
frame->Show( true );
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -198,17 +198,17 @@ void wxPlotOnOffCurve::DrawOffLine( wxDC &dc, wxCoord y, wxCoord start, wxCoord
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPlotArea, wxWindow)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxPlotArea, wxWindow)
|
||||
EVT_PAINT( wxPlotArea::OnPaint)
|
||||
EVT_LEFT_DOWN( wxPlotArea::OnMouse)
|
||||
EVT_LEFT_DCLICK( wxPlotArea::OnMouse)
|
||||
EVT_PAINT( wxPlotArea::OnPaint)
|
||||
EVT_LEFT_DOWN( wxPlotArea::OnMouse)
|
||||
EVT_LEFT_DCLICK( wxPlotArea::OnMouse)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxPlotArea::wxPlotArea( wxPlotWindow *parent )
|
||||
: wxWindow( parent, -1, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER, _T("plotarea") )
|
||||
: wxWindow( parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER, _T("plotarea") )
|
||||
{
|
||||
m_owner = parent;
|
||||
|
||||
m_zooming = FALSE;
|
||||
m_zooming = false;
|
||||
|
||||
SetBackgroundColour( *wxWHITE );
|
||||
}
|
||||
@@ -398,10 +398,6 @@ void wxPlotArea::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
while (upd)
|
||||
{
|
||||
int update_x = upd.GetX() + view_x;
|
||||
#if 0
|
||||
// unused var
|
||||
int update_y = upd.GetY() + view_y;
|
||||
#endif
|
||||
int update_width = upd.GetWidth();
|
||||
|
||||
/*
|
||||
@@ -462,7 +458,7 @@ BEGIN_EVENT_TABLE(wxPlotXAxisArea, wxWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxPlotXAxisArea::wxPlotXAxisArea( wxPlotWindow *parent )
|
||||
: wxWindow( parent, -1, wxDefaultPosition, wxSize(-1,40), 0, _T("plotxaxisarea") )
|
||||
: wxWindow( parent, wxID_ANY, wxDefaultPosition, wxSize(wxDefaultCoord,40), 0, _T("plotxaxisarea") )
|
||||
{
|
||||
m_owner = parent;
|
||||
|
||||
@@ -589,7 +585,7 @@ BEGIN_EVENT_TABLE(wxPlotYAxisArea, wxWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxPlotYAxisArea::wxPlotYAxisArea( wxPlotWindow *parent )
|
||||
: wxWindow( parent, -1, wxDefaultPosition, wxSize(60,-1), 0, _T("plotyaxisarea") )
|
||||
: wxWindow( parent, wxID_ANY, wxDefaultPosition, wxSize(60,wxDefaultCoord), 0, _T("plotyaxisarea") )
|
||||
{
|
||||
m_owner = parent;
|
||||
|
||||
@@ -700,16 +696,16 @@ void wxPlotYAxisArea::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPlotWindow, wxScrolledWindow)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxPlotWindow, wxScrolledWindow)
|
||||
EVT_BUTTON( ID_MOVE_UP, wxPlotWindow::OnMoveUp)
|
||||
EVT_BUTTON( ID_MOVE_DOWN, wxPlotWindow::OnMoveDown)
|
||||
EVT_BUTTON( ID_MOVE_UP, wxPlotWindow::OnMoveUp)
|
||||
EVT_BUTTON( ID_MOVE_DOWN, wxPlotWindow::OnMoveDown)
|
||||
|
||||
EVT_BUTTON( ID_ENLARGE, wxPlotWindow::OnEnlarge)
|
||||
EVT_BUTTON( ID_SHRINK, wxPlotWindow::OnShrink)
|
||||
EVT_BUTTON( ID_ENLARGE, wxPlotWindow::OnEnlarge)
|
||||
EVT_BUTTON( ID_SHRINK, wxPlotWindow::OnShrink)
|
||||
|
||||
EVT_BUTTON( ID_ZOOM_IN, wxPlotWindow::OnZoomIn)
|
||||
EVT_BUTTON( ID_ZOOM_OUT, wxPlotWindow::OnZoomOut)
|
||||
EVT_BUTTON( ID_ZOOM_IN, wxPlotWindow::OnZoomIn)
|
||||
EVT_BUTTON( ID_ZOOM_OUT, wxPlotWindow::OnZoomOut)
|
||||
|
||||
EVT_SCROLLWIN( wxPlotWindow::OnScroll2)
|
||||
EVT_SCROLLWIN( wxPlotWindow::OnScroll2)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxPlotWindow::wxPlotWindow( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flag )
|
||||
@@ -718,8 +714,8 @@ wxPlotWindow::wxPlotWindow( wxWindow *parent, wxWindowID id, const wxPoint &pos,
|
||||
m_xUnitsPerValue = 1.0;
|
||||
m_xZoom = 1.0;
|
||||
|
||||
m_enlargeAroundWindowCentre = FALSE;
|
||||
m_scrollOnThumbRelease = FALSE;
|
||||
m_enlargeAroundWindowCentre = false;
|
||||
m_scrollOnThumbRelease = false;
|
||||
|
||||
m_area = new wxPlotArea( this );
|
||||
wxBoxSizer *mainsizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
@@ -754,7 +750,7 @@ wxPlotWindow::wxPlotWindow( wxWindow *parent, wxWindowID id, const wxPoint &pos,
|
||||
m_yaxis = new wxPlotYAxisArea( this );
|
||||
|
||||
wxBoxSizer *vert1 = new wxBoxSizer( wxVERTICAL );
|
||||
plotsizer->Add( vert1, 0, wxEXPAND );
|
||||
plotsizer->Add( vert1, 1, wxEXPAND|wxTOP,10 );
|
||||
vert1->Add( m_yaxis, 1 );
|
||||
if ((GetWindowStyleFlag() & wxPLOT_X_AXIS) != 0)
|
||||
vert1->Add( 60, 40 );
|
||||
@@ -769,8 +765,8 @@ wxPlotWindow::wxPlotWindow( wxWindow *parent, wxWindowID id, const wxPoint &pos,
|
||||
m_xaxis = new wxPlotXAxisArea( this );
|
||||
|
||||
wxBoxSizer *vert2 = new wxBoxSizer( wxVERTICAL );
|
||||
plotsizer->Add( vert2, 1, wxEXPAND );
|
||||
vert2->Add( m_area, 1, wxEXPAND );
|
||||
plotsizer->Add( vert2, 5, wxEXPAND);
|
||||
vert2->Add( m_area, 1, wxEXPAND|wxTOP,10 );
|
||||
vert2->Add( m_xaxis, 0, wxEXPAND );
|
||||
}
|
||||
else
|
||||
@@ -781,8 +777,10 @@ wxPlotWindow::wxPlotWindow( wxWindow *parent, wxWindowID id, const wxPoint &pos,
|
||||
|
||||
mainsizer->Add( plotsizer, 1, wxEXPAND );
|
||||
|
||||
SetAutoLayout( TRUE );
|
||||
SetAutoLayout( true );
|
||||
SetSizer( mainsizer );
|
||||
mainsizer->Fit(this);
|
||||
mainsizer->SetSizeHints(this);
|
||||
|
||||
SetTargetWindow( m_area );
|
||||
|
||||
@@ -820,7 +818,7 @@ wxPlotCurve *wxPlotWindow::GetAt( size_t n )
|
||||
void wxPlotWindow::SetCurrentCurve( wxPlotCurve* current )
|
||||
{
|
||||
m_current = current;
|
||||
m_area->Refresh( FALSE );
|
||||
m_area->Refresh( false );
|
||||
|
||||
RedrawYAxis();
|
||||
|
||||
@@ -839,7 +837,7 @@ void wxPlotWindow::Delete( wxPlotCurve* curve )
|
||||
m_curves.DeleteObject( curve );
|
||||
|
||||
m_area->DeleteCurve( curve );
|
||||
m_area->Refresh( FALSE );
|
||||
m_area->Refresh( false );
|
||||
|
||||
if (curve == m_current) m_current = (wxPlotCurve *) NULL;
|
||||
}
|
||||
@@ -882,7 +880,7 @@ void wxPlotWindow::Move( wxPlotCurve* curve, int pixels_up )
|
||||
|
||||
curve->SetOffsetY( curve->GetOffsetY() + pixels_up );
|
||||
|
||||
m_area->Refresh( FALSE );
|
||||
m_area->Refresh( false );
|
||||
|
||||
RedrawYAxis();
|
||||
}
|
||||
@@ -929,7 +927,7 @@ void wxPlotWindow::Enlarge( wxPlotCurve *curve, double factor )
|
||||
curve->SetEndY( (curve->GetEndY() - offset)/factor + new_offset );
|
||||
}
|
||||
|
||||
m_area->Refresh( FALSE );
|
||||
m_area->Refresh( false );
|
||||
RedrawYAxis();
|
||||
}
|
||||
|
||||
@@ -961,10 +959,10 @@ void wxPlotWindow::SetZoom( double zoom )
|
||||
SetScrollbars( wxPLOT_SCROLL_STEP, wxPLOT_SCROLL_STEP,
|
||||
(int)((max*m_xZoom)/wxPLOT_SCROLL_STEP)+1, 0,
|
||||
(int)(view_x*zoom/old_zoom), 0,
|
||||
TRUE );
|
||||
true );
|
||||
|
||||
RedrawXAxis();
|
||||
m_area->Refresh( TRUE );
|
||||
m_area->Refresh( true );
|
||||
}
|
||||
|
||||
void wxPlotWindow::ResetScrollbar()
|
||||
@@ -986,22 +984,22 @@ void wxPlotWindow::ResetScrollbar()
|
||||
void wxPlotWindow::RedrawXAxis()
|
||||
{
|
||||
if (m_xaxis)
|
||||
m_xaxis->Refresh( FALSE );
|
||||
m_xaxis->Refresh( false );
|
||||
}
|
||||
|
||||
void wxPlotWindow::RedrawYAxis()
|
||||
{
|
||||
if (m_yaxis)
|
||||
m_yaxis->Refresh( TRUE );
|
||||
m_yaxis->Refresh( true );
|
||||
}
|
||||
|
||||
void wxPlotWindow::RedrawEverything()
|
||||
{
|
||||
if (m_xaxis)
|
||||
m_xaxis->Refresh( TRUE );
|
||||
m_xaxis->Refresh( true );
|
||||
if (m_yaxis)
|
||||
m_yaxis->Refresh( TRUE );
|
||||
m_area->Refresh( TRUE );
|
||||
m_yaxis->Refresh( true );
|
||||
m_area->Refresh( true );
|
||||
}
|
||||
|
||||
void wxPlotWindow::OnZoomIn( wxCommandEvent& WXUNUSED(event) )
|
||||
@@ -1045,11 +1043,11 @@ void wxPlotWindow::OnScroll2( wxScrollWinEvent& event )
|
||||
static wxBitmap *GetEnlargeBitmap()
|
||||
{
|
||||
static wxBitmap* s_bitmap = (wxBitmap *) NULL;
|
||||
static bool s_loaded = FALSE;
|
||||
static bool s_loaded = false;
|
||||
|
||||
if ( !s_loaded )
|
||||
{
|
||||
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
||||
s_loaded = true; // set it to true anyhow, we won't try again
|
||||
|
||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||
s_bitmap = new wxBitmap(_T("plot_enl_bmp"), wxBITMAP_TYPE_RESOURCE);
|
||||
@@ -1064,11 +1062,11 @@ static wxBitmap *GetEnlargeBitmap()
|
||||
static wxBitmap *GetShrinkBitmap()
|
||||
{
|
||||
static wxBitmap* s_bitmap = (wxBitmap *) NULL;
|
||||
static bool s_loaded = FALSE;
|
||||
static bool s_loaded = false;
|
||||
|
||||
if ( !s_loaded )
|
||||
{
|
||||
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
||||
s_loaded = true; // set it to true anyhow, we won't try again
|
||||
|
||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||
s_bitmap = new wxBitmap(_T("plot_shr_bmp"), wxBITMAP_TYPE_RESOURCE);
|
||||
@@ -1083,11 +1081,11 @@ static wxBitmap *GetShrinkBitmap()
|
||||
static wxBitmap *GetZoomInBitmap()
|
||||
{
|
||||
static wxBitmap* s_bitmap = (wxBitmap *) NULL;
|
||||
static bool s_loaded = FALSE;
|
||||
static bool s_loaded = false;
|
||||
|
||||
if ( !s_loaded )
|
||||
{
|
||||
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
||||
s_loaded = true; // set it to true anyhow, we won't try again
|
||||
|
||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||
s_bitmap = new wxBitmap(_T("plot_zin_bmp"), wxBITMAP_TYPE_RESOURCE);
|
||||
@@ -1102,11 +1100,11 @@ static wxBitmap *GetZoomInBitmap()
|
||||
static wxBitmap *GetZoomOutBitmap()
|
||||
{
|
||||
static wxBitmap* s_bitmap = (wxBitmap *) NULL;
|
||||
static bool s_loaded = FALSE;
|
||||
static bool s_loaded = false;
|
||||
|
||||
if ( !s_loaded )
|
||||
{
|
||||
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
||||
s_loaded = true; // set it to true anyhow, we won't try again
|
||||
|
||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||
s_bitmap = new wxBitmap(_T("plot_zot_bmp"), wxBITMAP_TYPE_RESOURCE);
|
||||
@@ -1121,11 +1119,11 @@ static wxBitmap *GetZoomOutBitmap()
|
||||
static wxBitmap *GetUpBitmap()
|
||||
{
|
||||
static wxBitmap* s_bitmap = (wxBitmap *) NULL;
|
||||
static bool s_loaded = FALSE;
|
||||
static bool s_loaded = false;
|
||||
|
||||
if ( !s_loaded )
|
||||
{
|
||||
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
||||
s_loaded = true; // set it to true anyhow, we won't try again
|
||||
|
||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||
s_bitmap = new wxBitmap(_T("plot_up_bmp"), wxBITMAP_TYPE_RESOURCE);
|
||||
@@ -1140,11 +1138,11 @@ static wxBitmap *GetUpBitmap()
|
||||
static wxBitmap *GetDownBitmap()
|
||||
{
|
||||
static wxBitmap* s_bitmap = (wxBitmap *) NULL;
|
||||
static bool s_loaded = FALSE;
|
||||
static bool s_loaded = false;
|
||||
|
||||
if ( !s_loaded )
|
||||
{
|
||||
s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
|
||||
s_loaded = true; // set it to true anyhow, we won't try again
|
||||
|
||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||
s_bitmap = new wxBitmap(_T("plot_dwn_bmp"), wxBITMAP_TYPE_RESOURCE);
|
||||
|
Reference in New Issue
Block a user