wxEVT_COMMAND_TEXT_UPDATED,
wxEVT_COMMAND_TEXT_ENTER,
wxEVT_COMMAND_MENU_SELECTED,
+ wxEVT_COMMAND_TOOL_CLICKED = wxEVT_COMMAND_MENU_SELECTED,
wxEVT_COMMAND_SLIDER_UPDATED,
wxEVT_COMMAND_RADIOBOX_SELECTED,
wxEVT_COMMAND_RADIOBUTTON_SELECTED,
wxEVT_COMMAND_SCROLLBAR_UPDATED,
wxEVT_COMMAND_VLBOX_SELECTED,
wxEVT_COMMAND_COMBOBOX_SELECTED,
- wxEVT_COMMAND_TOOL_CLICKED,
wxEVT_COMMAND_TOOL_RCLICKED,
wxEVT_COMMAND_TOOL_ENTER,
wxEVT_SET_FOCUS,
/* Character input event type */
wxEVT_CHAR,
+ wxEVT_NAVIGATION_KEY,
/*
* Scrollbar event identifiers
wxEVT_COMMAND_TREE_SET_INFO,
wxEVT_COMMAND_TREE_ITEM_EXPANDED,
wxEVT_COMMAND_TREE_ITEM_EXPANDING,
+ wxEVT_COMMAND_TREE_ITEM_COLLAPSED,
+ wxEVT_COMMAND_TREE_ITEM_COLLAPSING,
wxEVT_COMMAND_TREE_SEL_CHANGED,
wxEVT_COMMAND_TREE_SEL_CHANGING,
wxEVT_COMMAND_TREE_KEY_DOWN,
{ m_eventType = wxEVT_SYS_COLOUR_CHANGED; }
};
+/*
+ Event generated by dialog navigation keys
+ wxEVT_NAVIGATION_KEY
+ */
+// must derive from command event to be propagated to the parent
+class WXDLLEXPORT wxNavigationKeyEvent : public wxCommandEvent
+{
+ DECLARE_DYNAMIC_CLASS(wxNavigationKeyEvent)
+
+public:
+ wxNavigationKeyEvent() : wxCommandEvent(wxEVT_NAVIGATION_KEY) { }
+
+ // direction: forward (true) or backward (false)
+ bool GetDirection() const { return m_commandInt == 1; }
+ void SetDirection(bool bForward) { m_commandInt = bForward; }
+
+ // it may be a window change event (MDI, notebook pages...) or a control
+ // change event
+ bool IsWindowChange() const { return m_extraLong == 1; }
+ void SetWindowChange(bool bIs) { m_extraLong = bIs; }
+
+ // the child which has the focus currently (may be NULL - use
+ // wxWindow::FindFocus then)
+ wxWindow* GetCurrentFocus() const { return (wxWindow *)m_clientData; }
+ void SetCurrentFocus(wxWindow *win) { m_clientData = (char *)win; }
+};
+
/* TODO
wxEVT_POWER,
wxEVT_CREATE,
#define EVT_SHOW(func) { wxEVT_SHOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxShowEventFunction) & func, NULL },
#define EVT_MAXIMIZE(func) { wxEVT_MAXIMIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMaximizeEventFunction) & func, NULL },
#define EVT_ICONIZE(func) { wxEVT_ICONIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxIconizeEventFunction) & func, NULL },
+#define EVT_NAVIGATION_KEY(func) { wxEVT_NAVIGATION_KEY, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & func, NULL },
// Mouse events
#define EVT_LEFT_DOWN(func) { wxEVT_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL },
#define EVT_VLBOX(id, fn) { wxEVT_COMMAND_VLBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL },
#define EVT_COMBOBOX(id, fn) { wxEVT_COMMAND_COMBOBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL },
#define EVT_TOOL(id, fn) { wxEVT_COMMAND_TOOL_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL },
+#define EVT_TOOL_RANGE(id1, id2, fn) { wxEVT_COMMAND_TOOL_CLICKED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL },
#define EVT_TOOL_RCLICKED(id, fn) { wxEVT_COMMAND_TOOL_RCLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL },
+#define EVT_TOOL_RCLICKED_RANGE(id1, id2, fn) { wxEVT_COMMAND_TOOL_RCLICKED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL },
#define EVT_TOOL_ENTER(id, fn) { wxEVT_COMMAND_TOOL_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL },
+#define EVT_TOOL_ENTER_RANGE(id1, id2, fn) { wxEVT_COMMAND_TOOL_ENTER, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL },
#define EVT_CHECKLISTBOX(id, fn) { wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL },
// Generic command events