X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8556b795c369382a1f5f2ed9405138a450ecc4a6..d699f48ba33c96c24f7ab3764ad98ded0633c1c5:/contrib/src/plot/plot.cpp diff --git a/contrib/src/plot/plot.cpp b/contrib/src/plot/plot.cpp index af509c3440..1ed90f76ac 100644 --- a/contrib/src/plot/plot.cpp +++ b/contrib/src/plot/plot.cpp @@ -33,6 +33,7 @@ #include "wx/plot/plot.h" #include "wx/bmpbuttn.h" +#include "wx/module.h" #include @@ -49,6 +50,32 @@ #include "wx/plot/plot_dwn.xpm" #endif +//---------------------------------------------------------------------------- +// event types +//---------------------------------------------------------------------------- + +const int wxEVT_PLOT_SEL_CHANGING = wxNewEventType(); +const int wxEVT_PLOT_SEL_CHANGED = wxNewEventType(); +const int wxEVT_PLOT_CLICKED = wxNewEventType(); +const int wxEVT_PLOT_DOUBLECLICKED = wxNewEventType(); +const int wxEVT_PLOT_ZOOM_IN = wxNewEventType(); +const int wxEVT_PLOT_ZOOM_OUT = wxNewEventType(); +const int wxEVT_PLOT_VALUE_SEL_CREATING = wxNewEventType(); +const int wxEVT_PLOT_VALUE_SEL_CREATED = wxNewEventType(); +const int wxEVT_PLOT_VALUE_SEL_CHANGING = wxNewEventType(); +const int wxEVT_PLOT_VALUE_SEL_CHANGED = wxNewEventType(); +const int wxEVT_PLOT_AREA_SEL_CREATING = wxNewEventType(); +const int wxEVT_PLOT_AREA_SEL_CREATED = wxNewEventType(); +const int wxEVT_PLOT_AREA_SEL_CHANGING = wxNewEventType(); +const int wxEVT_PLOT_AREA_SEL_CHANGED = wxNewEventType(); +const int wxEVT_PLOT_BEGIN_X_LABEL_EDIT = wxNewEventType(); +const int wxEVT_PLOT_END_X_LABEL_EDIT = wxNewEventType(); +const int wxEVT_PLOT_BEGIN_Y_LABEL_EDIT = wxNewEventType(); +const int wxEVT_PLOT_END_Y_LABEL_EDIT = wxNewEventType(); +const int wxEVT_PLOT_BEGIN_TITLE_EDIT = wxNewEventType(); +const int wxEVT_PLOT_END_TITLE_EDIT = wxNewEventType(); +const int wxEVT_PLOT_AREA_CREATE = wxNewEventType(); + //---------------------------------------------------------------------------- // accessor functions for the bitmaps (may return NULL, check for it!) //---------------------------------------------------------------------------- @@ -60,32 +87,6 @@ static wxBitmap *GetZoomOutBitmap(); static wxBitmap *GetUpBitmap(); static wxBitmap *GetDownBitmap(); -//---------------------------------------------------------------------------- -// event types -//---------------------------------------------------------------------------- - -int wxEVT_PLOT_SEL_CHANGING; -int wxEVT_PLOT_SEL_CHANGED; -int wxEVT_PLOT_CLICKED; -int wxEVT_PLOT_DOUBLECLICKED; -int wxEVT_PLOT_ZOOM_IN; -int wxEVT_PLOT_ZOOM_OUT; -int wxEVT_PLOT_VALUE_SEL_CREATING; -int wxEVT_PLOT_VALUE_SEL_CREATED; -int wxEVT_PLOT_VALUE_SEL_CHANGING; -int wxEVT_PLOT_VALUE_SEL_CHANGED; -int wxEVT_PLOT_AREA_SEL_CREATING; -int wxEVT_PLOT_AREA_SEL_CREATED; -int wxEVT_PLOT_AREA_SEL_CHANGING; -int wxEVT_PLOT_AREA_SEL_CHANGED; -int wxEVT_PLOT_BEGIN_X_LABEL_EDIT; -int wxEVT_PLOT_END_X_LABEL_EDIT; -int wxEVT_PLOT_BEGIN_Y_LABEL_EDIT; -int wxEVT_PLOT_END_Y_LABEL_EDIT; -int wxEVT_PLOT_BEGIN_TITLE_EDIT; -int wxEVT_PLOT_END_TITLE_EDIT; -int wxEVT_PLOT_AREA_CREATE; - //----------------------------------------------------------------------------- // consts //----------------------------------------------------------------------------- @@ -1153,52 +1154,3 @@ static wxBitmap *GetDownBitmap() return s_bitmap; } - -//---------------------------------------------------------------------------- -// wxPlotModule -//---------------------------------------------------------------------------- - -class wxPlotModule : public wxModule -{ -public: - bool OnInit(); - void OnExit(); - -private: - DECLARE_CLASS(wxPlotModule) -}; - -IMPLEMENT_DYNAMIC_CLASS(wxPlotModule, wxModule) - -bool wxPlotModule::OnInit() -{ - wxEVT_PLOT_SEL_CHANGING = wxNewId(); - wxEVT_PLOT_SEL_CHANGED = wxNewId(); - wxEVT_PLOT_CLICKED = wxNewId(); - wxEVT_PLOT_DOUBLECLICKED = wxNewId(); - wxEVT_PLOT_ZOOM_IN = wxNewId(); - wxEVT_PLOT_ZOOM_OUT = wxNewId(); - wxEVT_PLOT_VALUE_SEL_CREATING = wxNewId(); - wxEVT_PLOT_VALUE_SEL_CREATED = wxNewId(); - wxEVT_PLOT_VALUE_SEL_CHANGING = wxNewId(); - wxEVT_PLOT_VALUE_SEL_CHANGED = wxNewId(); - wxEVT_PLOT_AREA_SEL_CREATING = wxNewId(); - wxEVT_PLOT_AREA_SEL_CREATED = wxNewId(); - wxEVT_PLOT_AREA_SEL_CHANGING = wxNewId(); - wxEVT_PLOT_AREA_SEL_CHANGED = wxNewId(); - wxEVT_PLOT_BEGIN_X_LABEL_EDIT = wxNewId(); - wxEVT_PLOT_END_X_LABEL_EDIT = wxNewId(); - wxEVT_PLOT_BEGIN_Y_LABEL_EDIT = wxNewId(); - wxEVT_PLOT_END_Y_LABEL_EDIT = wxNewId(); - wxEVT_PLOT_BEGIN_TITLE_EDIT = wxNewId(); - wxEVT_PLOT_END_TITLE_EDIT = wxNewId(); - wxEVT_PLOT_AREA_CREATE = wxNewId(); - - return TRUE; -} - -void wxPlotModule::OnExit() -{ -} - -