]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/event.h
1. Initialized m_displayed to TRUE to solve a cell highlight problem
[wxWidgets.git] / include / wx / event.h
index e72c49617100d3c2502bb15725976408a15f5a0d..63f6fe7e7305a074d52e196e4b8ab0129ac8757c 100644 (file)
@@ -45,7 +45,7 @@ class WXDLLEXPORT wxList;
 typedef int wxEventType;
 
 #if defined(__VISAGECPP__) && __IBMCPP__ >= 400
-// must define these in the .cpp for VA or else you get multiply defined symbols everywhere
+// must define these static for VA or else you get multiply defined symbols everywhere
 extern const wxEventType wxEVT_NULL;
 extern const wxEventType wxEVT_FIRST;
 
@@ -69,8 +69,9 @@ extern const wxEventType wxEVT_COMMAND_TOOL_RCLICKED;
 extern const wxEventType wxEVT_COMMAND_TOOL_ENTER;
 extern const wxEventType wxEVT_COMMAND_SPINCTRL_UPDATED;
 
-/* Sockets send events, too */
+/* Sockets and timers send events, too */
 extern const wxEventType wxEVT_SOCKET;
+extern const wxEventType wxEVT_TIMER;
 
 /* Mouse event types */
 extern const wxEventType wxEVT_LEFT_DOWN;
@@ -119,6 +120,7 @@ extern const wxEventType wxEVT_SCROLL_LINEDOWN;
 extern const wxEventType wxEVT_SCROLL_PAGEUP;
 extern const wxEventType wxEVT_SCROLL_PAGEDOWN;
 extern const wxEventType wxEVT_SCROLL_THUMBTRACK;
+extern const wxEventType wxEVT_SCROLL_THUMBRELEASE;
 
  /*
   * Scroll events from wxWindow
@@ -130,6 +132,7 @@ extern const wxEventType wxEVT_SCROLLWIN_LINEDOWN;
 extern const wxEventType wxEVT_SCROLLWIN_PAGEUP;
 extern const wxEventType wxEVT_SCROLLWIN_PAGEDOWN;
 extern const wxEventType wxEVT_SCROLLWIN_THUMBTRACK;
+extern const wxEventType wxEVT_SCROLLWIN_THUMBRELEASE;
 
  /*
   * System events
@@ -230,7 +233,6 @@ extern const wxEventType wxEVT_COMMAND_LIST_ITEM_ACTIVATED;
  /* Tab and notebook control event types */
 extern const wxEventType wxEVT_COMMAND_TAB_SEL_CHANGED;
 extern const wxEventType wxEVT_COMMAND_TAB_SEL_CHANGING;
-
 extern const wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED;
 extern const wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING;
 
@@ -253,6 +255,28 @@ extern const wxEventType wxEVT_CALENDAR_YEAR_CHANGED;
 extern const wxEventType wxEVT_CALENDAR_DOUBLECLICKED;
 extern const wxEventType wxEVT_CALENDAR_WEEKDAY_CLICKED;
 
+/* Plot events */
+extern const wxEventType wxEVT_PLOT_SEL_CHANGING;
+extern const wxEventType wxEVT_PLOT_SEL_CHANGED;
+extern const wxEventType wxEVT_PLOT_CLICKED;
+extern const wxEventType wxEVT_PLOT_DOUBLECLICKED;
+extern const wxEventType wxEVT_PLOT_ZOOM_IN;
+extern const wxEventType wxEVT_PLOT_ZOOM_OUT;
+extern const wxEventType wxEVT_PLOT_VALUE_SEL_CREATING;
+extern const wxEventType wxEVT_PLOT_VALUE_SEL_CREATED;
+extern const wxEventType wxEVT_PLOT_VALUE_SEL_CHANGING;
+extern const wxEventType wxEVT_PLOT_VALUE_SEL_CHANGED;
+extern const wxEventType wxEVT_PLOT_AREA_SEL_CREATING;
+extern const wxEventType wxEVT_PLOT_AREA_SEL_CREATED;
+extern const wxEventType wxEVT_PLOT_AREA_SEL_CHANGING;
+extern const wxEventType wxEVT_PLOT_AREA_SEL_CHANGED;
+extern const wxEventType wxEVT_PLOT_BEGIN_X_LABEL_EDIT;
+extern const wxEventType wxEVT_PLOT_END_X_LABEL_EDIT;
+extern const wxEventType wxEVT_PLOT_BEGIN_Y_LABEL_EDIT;
+extern const wxEventType wxEVT_PLOT_END_Y_LABEL_EDIT;
+extern const wxEventType wxEVT_PLOT_BEGIN_TITLE_EDIT;
+extern const wxEventType wxEVT_PLOT_END_TITLE_EDIT;
+
 extern const wxEventType wxEVT_USER_FIRST;
 
 #else // everybody else
@@ -284,6 +308,9 @@ const wxEventType wxEVT_COMMAND_SPINCTRL_UPDATED =          wxEVT_FIRST + 18;
 /* Sockets send events, too */
 const wxEventType wxEVT_SOCKET =                            wxEVT_FIRST + 50;
 
+/* And timers do as well */
+const wxEventType wxEVT_TIMER =                             wxEVT_FIRST + 80;
+
 /* Mouse event types */
 const wxEventType wxEVT_LEFT_DOWN =                         wxEVT_FIRST + 100;
 const wxEventType wxEVT_LEFT_UP =                           wxEVT_FIRST + 101;
@@ -331,6 +358,7 @@ const wxEventType wxEVT_SCROLL_LINEDOWN =                   wxEVT_FIRST + 303;
 const wxEventType wxEVT_SCROLL_PAGEUP =                     wxEVT_FIRST + 304;
 const wxEventType wxEVT_SCROLL_PAGEDOWN =                   wxEVT_FIRST + 305;
 const wxEventType wxEVT_SCROLL_THUMBTRACK =                 wxEVT_FIRST + 306;
+const wxEventType wxEVT_SCROLL_THUMBRELEASE =               wxEVT_FIRST + 307;
 
  /*
   * Scroll events from wxWindow
@@ -342,6 +370,7 @@ const wxEventType wxEVT_SCROLLWIN_LINEDOWN =                wxEVT_FIRST + 323;
 const wxEventType wxEVT_SCROLLWIN_PAGEUP =                  wxEVT_FIRST + 324;
 const wxEventType wxEVT_SCROLLWIN_PAGEDOWN =                wxEVT_FIRST + 325;
 const wxEventType wxEVT_SCROLLWIN_THUMBTRACK =              wxEVT_FIRST + 326;
+const wxEventType wxEVT_SCROLLWIN_THUMBRELEASE =            wxEVT_FIRST + 327;
 
  /*
   * System events
@@ -471,6 +500,28 @@ const wxEventType wxEVT_CALENDAR_YEAR_CHANGED = wxEVT_FIRST + 953;
 const wxEventType wxEVT_CALENDAR_DOUBLECLICKED = wxEVT_FIRST + 954;
 const wxEventType wxEVT_CALENDAR_WEEKDAY_CLICKED = wxEVT_FIRST + 955;
 
+/* Plot events */
+const wxEventType wxEVT_PLOT_SEL_CHANGING = wxEVT_FIRST + 1000;
+const wxEventType wxEVT_PLOT_SEL_CHANGED = wxEVT_FIRST + 1001;
+const wxEventType wxEVT_PLOT_CLICKED = wxEVT_FIRST + 1002;
+const wxEventType wxEVT_PLOT_DOUBLECLICKED = wxEVT_FIRST + 1003;
+const wxEventType wxEVT_PLOT_ZOOM_IN = wxEVT_FIRST + 1004;
+const wxEventType wxEVT_PLOT_ZOOM_OUT = wxEVT_FIRST + 1005;
+const wxEventType wxEVT_PLOT_VALUE_SEL_CREATING = wxEVT_FIRST + 1010;
+const wxEventType wxEVT_PLOT_VALUE_SEL_CREATED = wxEVT_FIRST + 1011;
+const wxEventType wxEVT_PLOT_VALUE_SEL_CHANGING = wxEVT_FIRST + 1012;
+const wxEventType wxEVT_PLOT_VALUE_SEL_CHANGED = wxEVT_FIRST + 1013;
+const wxEventType wxEVT_PLOT_AREA_SEL_CREATING = wxEVT_FIRST + 1014;
+const wxEventType wxEVT_PLOT_AREA_SEL_CREATED = wxEVT_FIRST + 1015;
+const wxEventType wxEVT_PLOT_AREA_SEL_CHANGING = wxEVT_FIRST + 1016;
+const wxEventType wxEVT_PLOT_AREA_SEL_CHANGED = wxEVT_FIRST + 1017;
+const wxEventType wxEVT_PLOT_BEGIN_X_LABEL_EDIT = wxEVT_FIRST + 1020;
+const wxEventType wxEVT_PLOT_END_X_LABEL_EDIT = wxEVT_FIRST + 1021;
+const wxEventType wxEVT_PLOT_BEGIN_Y_LABEL_EDIT = wxEVT_FIRST + 1022;
+const wxEventType wxEVT_PLOT_END_Y_LABEL_EDIT = wxEVT_FIRST + 1023;
+const wxEventType wxEVT_PLOT_BEGIN_TITLE_EDIT = wxEVT_FIRST + 1024;
+const wxEventType wxEVT_PLOT_END_TITLE_EDIT = wxEVT_FIRST + 1025;
+
 const wxEventType wxEVT_USER_FIRST = wxEVT_FIRST + 2000;
 
 #endif // for VisualAge C++ V4.0
@@ -679,6 +730,7 @@ private:
  wxEVT_SCROLL_PAGEUP
  wxEVT_SCROLL_PAGEDOWN
  wxEVT_SCROLL_THUMBTRACK
+ wxEVT_SCROLL_THUMBRELEASE
 */
 
 class WXDLLEXPORT wxScrollEvent : public wxCommandEvent
@@ -697,14 +749,8 @@ public:
 
     int GetOrientation() const { return (int) m_extraLong ; }
     int GetPosition() const { return m_commandInt ; }
-    bool IsScrolling() const { return m_isScrolling; }
     void SetOrientation(int orient) { m_extraLong = (long) orient; }
     void SetPosition(int pos) { m_commandInt = pos; }
-    void SetScrolling(bool isScrolling) { m_isScrolling = isScrolling; }
-
-    void CopyObject(wxObject& obj) const;
-public:
-    bool m_isScrolling;
 };
 
 // ScrollWin event class, derived fom wxEvent. wxScrollWinEvents
@@ -717,6 +763,7 @@ public:
  wxEVT_SCROLLWIN_PAGEUP
  wxEVT_SCROLLWIN_PAGEDOWN
  wxEVT_SCROLLWIN_THUMBTRACK
+ wxEVT_SCROLLWIN_THUMBRELEASE
 */
 
 class WXDLLEXPORT wxScrollWinEvent : public wxEvent
@@ -734,16 +781,13 @@ public:
 
     int GetOrientation() const { return (int) m_extraLong ; }
     int GetPosition() const { return m_commandInt ; }
-    bool IsScrolling() const { return m_isScrolling; }
     void SetOrientation(int orient) { m_extraLong = (long) orient; }
     void SetPosition(int pos) { m_commandInt = pos; }
-    void SetScrolling(bool isScrolling) { m_isScrolling = isScrolling; }
 
     void CopyObject(wxObject& object_dest) const;
 public:
     int               m_commandInt;    // Additional information
     long              m_extraLong;
-    bool              m_isScrolling;
 };
 
 // Mouse event class
@@ -1846,7 +1890,8 @@ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
   { wxEVT_SCROLLWIN_LINEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL },\
   { wxEVT_SCROLLWIN_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL },\
   { wxEVT_SCROLLWIN_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL },\
-  { wxEVT_SCROLLWIN_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL },
+  { wxEVT_SCROLLWIN_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL },\
+  { wxEVT_SCROLLWIN_THUMBRELEASE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL },
 
 #define EVT_SCROLLWIN_TOP(func) { wxEVT_SCROLLWIN_TOP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL },
 #define EVT_SCROLLWIN_BOTTOM(func) { wxEVT_SCROLLWIN_BOTTOM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL },
@@ -1855,6 +1900,7 @@ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
 #define EVT_SCROLLWIN_PAGEUP(func) { wxEVT_SCROLLWIN_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL },
 #define EVT_SCROLLWIN_PAGEDOWN(func) { wxEVT_SCROLLWIN_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL },
 #define EVT_SCROLLWIN_THUMBTRACK(func) { wxEVT_SCROLLWIN_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL },
+#define EVT_SCROLLWIN_THUMBRELEASE(func) { wxEVT_SCROLLWIN_THUMBRELEASE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollWinEventFunction) & func, (wxObject *) NULL },
 
 // Scrolling from wxSlider and wxScrollBar
 #define EVT_SCROLL(func) \
@@ -1864,7 +1910,8 @@ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
   { wxEVT_SCROLL_LINEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\
   { wxEVT_SCROLL_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\
   { wxEVT_SCROLL_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\
-  { wxEVT_SCROLL_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },
+  { wxEVT_SCROLL_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\
+  { wxEVT_SCROLL_THUMBRELEASE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },
 
 #define EVT_SCROLL_TOP(func) { wxEVT_SCROLL_TOP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },
 #define EVT_SCROLL_BOTTOM(func) { wxEVT_SCROLL_BOTTOM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },
@@ -1873,6 +1920,7 @@ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
 #define EVT_SCROLL_PAGEUP(func) { wxEVT_SCROLL_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },
 #define EVT_SCROLL_PAGEDOWN(func) { wxEVT_SCROLL_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },
 #define EVT_SCROLL_THUMBTRACK(func) { wxEVT_SCROLL_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },
+#define EVT_SCROLL_THUMBRELEASE(func) { wxEVT_SCROLL_THUMBRELEASE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },
 
 // Scrolling from wxSlider and wxScrollBar, with an id
 #define EVT_COMMAND_SCROLL(id, func) \
@@ -1882,7 +1930,8 @@ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
   { wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\
   { wxEVT_SCROLL_PAGEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\
   { wxEVT_SCROLL_PAGEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\
-  { wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },
+  { wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\
+  { wxEVT_SCROLL_THUMBRELEASE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },
 
 #define EVT_COMMAND_SCROLL_TOP(id, func) { wxEVT_SCROLL_TOP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },
 #define EVT_COMMAND_SCROLL_BOTTOM(id, func) { wxEVT_SCROLL_BOTTOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },
@@ -1891,6 +1940,7 @@ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
 #define EVT_COMMAND_SCROLL_PAGEUP(id, func) { wxEVT_SCROLL_PAGEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },
 #define EVT_COMMAND_SCROLL_PAGEDOWN(id, func) { wxEVT_SCROLL_PAGEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },
 #define EVT_COMMAND_SCROLL_THUMBTRACK(id, func) { wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },
+#define EVT_COMMAND_SCROLL_THUMBRELEASE(id, func) { wxEVT_SCROLL_THUMBRELEASE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },
 
 // Convenience macros for commonly-used commands
 #define EVT_BUTTON(id, fn) { wxEVT_COMMAND_BUTTON_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },