Changed event type ids to constants instead of enum, for extensibility.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -25,168 +25,166 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum wxEventType {
|
typedef int wxEventType;
|
||||||
wxEVT_NULL = 0,
|
|
||||||
wxEVT_FIRST = 10000,
|
|
||||||
|
|
||||||
// New names
|
const wxEventType wxEVT_NULL = 0;
|
||||||
wxEVT_COMMAND_BUTTON_CLICKED,
|
const wxEventType wxEVT_FIRST = 10000;
|
||||||
wxEVT_COMMAND_CHECKBOX_CLICKED,
|
|
||||||
wxEVT_COMMAND_CHOICE_SELECTED,
|
const wxEventType wxEVT_COMMAND_BUTTON_CLICKED = wxEVT_FIRST + 1;
|
||||||
wxEVT_COMMAND_LISTBOX_SELECTED,
|
const wxEventType wxEVT_COMMAND_CHECKBOX_CLICKED = wxEVT_FIRST + 2;
|
||||||
wxEVT_COMMAND_LISTBOX_DOUBLECLICKED,
|
const wxEventType wxEVT_COMMAND_CHOICE_SELECTED = wxEVT_FIRST + 3;
|
||||||
wxEVT_COMMAND_CHECKLISTBOX_TOGGLED,
|
const wxEventType wxEVT_COMMAND_LISTBOX_SELECTED = wxEVT_FIRST + 4;
|
||||||
wxEVT_COMMAND_TEXT_UPDATED,
|
const wxEventType wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = wxEVT_FIRST + 5;
|
||||||
wxEVT_COMMAND_TEXT_ENTER,
|
const wxEventType wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = wxEVT_FIRST + 6;
|
||||||
wxEVT_COMMAND_MENU_SELECTED,
|
const wxEventType wxEVT_COMMAND_TEXT_UPDATED = wxEVT_FIRST + 7;
|
||||||
wxEVT_COMMAND_TOOL_CLICKED = wxEVT_COMMAND_MENU_SELECTED,
|
const wxEventType wxEVT_COMMAND_TEXT_ENTER = wxEVT_FIRST + 8;
|
||||||
wxEVT_COMMAND_SLIDER_UPDATED,
|
const wxEventType wxEVT_COMMAND_MENU_SELECTED = wxEVT_FIRST + 9;
|
||||||
wxEVT_COMMAND_RADIOBOX_SELECTED,
|
const wxEventType wxEVT_COMMAND_TOOL_CLICKED = wxEVT_COMMAND_MENU_SELECTED;
|
||||||
wxEVT_COMMAND_RADIOBUTTON_SELECTED,
|
const wxEventType wxEVT_COMMAND_SLIDER_UPDATED = wxEVT_FIRST + 10;
|
||||||
// wxEVT_COMMAND_SCROLLBAR_UPDATED is now obsolete since we use wxEVT_SCROLL... events
|
const wxEventType wxEVT_COMMAND_RADIOBOX_SELECTED = wxEVT_FIRST + 11;
|
||||||
wxEVT_COMMAND_SCROLLBAR_UPDATED,
|
const wxEventType wxEVT_COMMAND_RADIOBUTTON_SELECTED = wxEVT_FIRST + 12;
|
||||||
wxEVT_COMMAND_VLBOX_SELECTED,
|
//const wxEventType wxEVT_COMMAND_SCROLLBAR_UPDATED is now obsolete since we use wxEVT_SCROLL... events
|
||||||
wxEVT_COMMAND_COMBOBOX_SELECTED,
|
const wxEventType wxEVT_COMMAND_SCROLLBAR_UPDATED = wxEVT_FIRST + 13;
|
||||||
wxEVT_COMMAND_TOOL_RCLICKED,
|
const wxEventType wxEVT_COMMAND_VLBOX_SELECTED = wxEVT_FIRST + 14;
|
||||||
wxEVT_COMMAND_TOOL_ENTER,
|
const wxEventType wxEVT_COMMAND_COMBOBOX_SELECTED = wxEVT_FIRST + 15;
|
||||||
wxEVT_SET_FOCUS,
|
const wxEventType wxEVT_COMMAND_TOOL_RCLICKED = wxEVT_FIRST + 16;
|
||||||
wxEVT_KILL_FOCUS,
|
const wxEventType wxEVT_COMMAND_TOOL_ENTER = wxEVT_FIRST + 17;
|
||||||
|
|
||||||
/* Mouse event types */
|
/* Mouse event types */
|
||||||
wxEVT_LEFT_DOWN,
|
const wxEventType wxEVT_LEFT_DOWN = wxEVT_FIRST + 100;
|
||||||
wxEVT_LEFT_UP,
|
const wxEventType wxEVT_LEFT_UP = wxEVT_FIRST + 101;
|
||||||
wxEVT_MIDDLE_DOWN,
|
const wxEventType wxEVT_MIDDLE_DOWN = wxEVT_FIRST + 102;
|
||||||
wxEVT_MIDDLE_UP,
|
const wxEventType wxEVT_MIDDLE_UP = wxEVT_FIRST + 103;
|
||||||
wxEVT_RIGHT_DOWN,
|
const wxEventType wxEVT_RIGHT_DOWN = wxEVT_FIRST + 104;
|
||||||
wxEVT_RIGHT_UP,
|
const wxEventType wxEVT_RIGHT_UP = wxEVT_FIRST + 105;
|
||||||
wxEVT_MOTION,
|
const wxEventType wxEVT_MOTION = wxEVT_FIRST + 106;
|
||||||
wxEVT_ENTER_WINDOW,
|
const wxEventType wxEVT_ENTER_WINDOW = wxEVT_FIRST + 107;
|
||||||
wxEVT_LEAVE_WINDOW,
|
const wxEventType wxEVT_LEAVE_WINDOW = wxEVT_FIRST + 108;
|
||||||
wxEVT_LEFT_DCLICK,
|
const wxEventType wxEVT_LEFT_DCLICK = wxEVT_FIRST + 109;
|
||||||
wxEVT_MIDDLE_DCLICK,
|
const wxEventType wxEVT_MIDDLE_DCLICK = wxEVT_FIRST + 110;
|
||||||
wxEVT_RIGHT_DCLICK,
|
const wxEventType wxEVT_RIGHT_DCLICK = wxEVT_FIRST + 111;
|
||||||
|
const wxEventType wxEVT_SET_FOCUS = wxEVT_FIRST + 112;
|
||||||
|
const wxEventType wxEVT_KILL_FOCUS = wxEVT_FIRST + 113;
|
||||||
|
|
||||||
// Non-client mouse events
|
// Non-client mouse events
|
||||||
wxEVT_NC_LEFT_DOWN = wxEVT_FIRST + 100,
|
const wxEventType wxEVT_NC_LEFT_DOWN = wxEVT_FIRST + 200;
|
||||||
wxEVT_NC_LEFT_UP,
|
const wxEventType wxEVT_NC_LEFT_UP = wxEVT_FIRST + 201;
|
||||||
wxEVT_NC_MIDDLE_DOWN,
|
const wxEventType wxEVT_NC_MIDDLE_DOWN = wxEVT_FIRST + 202;
|
||||||
wxEVT_NC_MIDDLE_UP,
|
const wxEventType wxEVT_NC_MIDDLE_UP = wxEVT_FIRST + 203;
|
||||||
wxEVT_NC_RIGHT_DOWN,
|
const wxEventType wxEVT_NC_RIGHT_DOWN = wxEVT_FIRST + 204;
|
||||||
wxEVT_NC_RIGHT_UP,
|
const wxEventType wxEVT_NC_RIGHT_UP = wxEVT_FIRST + 205;
|
||||||
wxEVT_NC_MOTION,
|
const wxEventType wxEVT_NC_MOTION = wxEVT_FIRST + 206;
|
||||||
wxEVT_NC_ENTER_WINDOW,
|
const wxEventType wxEVT_NC_ENTER_WINDOW = wxEVT_FIRST + 207;
|
||||||
wxEVT_NC_LEAVE_WINDOW,
|
const wxEventType wxEVT_NC_LEAVE_WINDOW = wxEVT_FIRST + 208;
|
||||||
wxEVT_NC_LEFT_DCLICK,
|
const wxEventType wxEVT_NC_LEFT_DCLICK = wxEVT_FIRST + 209;
|
||||||
wxEVT_NC_MIDDLE_DCLICK,
|
const wxEventType wxEVT_NC_MIDDLE_DCLICK = wxEVT_FIRST + 210;
|
||||||
wxEVT_NC_RIGHT_DCLICK,
|
const wxEventType wxEVT_NC_RIGHT_DCLICK = wxEVT_FIRST + 211;
|
||||||
|
|
||||||
/* Character input event type */
|
/* Character input event type */
|
||||||
wxEVT_CHAR,
|
const wxEventType wxEVT_CHAR = wxEVT_FIRST + 212;
|
||||||
wxEVT_NAVIGATION_KEY,
|
const wxEventType wxEVT_NAVIGATION_KEY = wxEVT_FIRST + 213;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Scrollbar event identifiers
|
* Scrollbar event identifiers
|
||||||
*/
|
*/
|
||||||
wxEVT_SCROLL_TOP,
|
const wxEventType wxEVT_SCROLL_TOP = wxEVT_FIRST + 300;
|
||||||
wxEVT_SCROLL_BOTTOM,
|
const wxEventType wxEVT_SCROLL_BOTTOM = wxEVT_FIRST + 301;
|
||||||
wxEVT_SCROLL_LINEUP,
|
const wxEventType wxEVT_SCROLL_LINEUP = wxEVT_FIRST + 302;
|
||||||
wxEVT_SCROLL_LINEDOWN,
|
const wxEventType wxEVT_SCROLL_LINEDOWN = wxEVT_FIRST + 303;
|
||||||
wxEVT_SCROLL_PAGEUP,
|
const wxEventType wxEVT_SCROLL_PAGEUP = wxEVT_FIRST + 304;
|
||||||
wxEVT_SCROLL_PAGEDOWN,
|
const wxEventType wxEVT_SCROLL_PAGEDOWN = wxEVT_FIRST + 305;
|
||||||
wxEVT_SCROLL_THUMBTRACK,
|
const wxEventType wxEVT_SCROLL_THUMBTRACK = wxEVT_FIRST + 306;
|
||||||
|
|
||||||
wxEVT_SIZE = wxEVT_FIRST + 200,
|
const wxEventType wxEVT_SIZE = wxEVT_FIRST + 400;
|
||||||
wxEVT_MOVE,
|
const wxEventType wxEVT_MOVE = wxEVT_FIRST + 401;
|
||||||
wxEVT_CLOSE_WINDOW,
|
const wxEventType wxEVT_CLOSE_WINDOW = wxEVT_FIRST + 402;
|
||||||
wxEVT_END_SESSION,
|
const wxEventType wxEVT_END_SESSION = wxEVT_FIRST + 403;
|
||||||
wxEVT_QUERY_END_SESSION,
|
const wxEventType wxEVT_QUERY_END_SESSION = wxEVT_FIRST + 404;
|
||||||
wxEVT_ACTIVATE_APP,
|
const wxEventType wxEVT_ACTIVATE_APP = wxEVT_FIRST + 405;
|
||||||
wxEVT_POWER,
|
const wxEventType wxEVT_POWER = wxEVT_FIRST + 406;
|
||||||
wxEVT_CHAR_HOOK,
|
const wxEventType wxEVT_CHAR_HOOK = wxEVT_FIRST + 407;
|
||||||
wxEVT_KEY_UP,
|
const wxEventType wxEVT_KEY_UP = wxEVT_FIRST + 408;
|
||||||
wxEVT_ACTIVATE,
|
const wxEventType wxEVT_ACTIVATE = wxEVT_FIRST + 409;
|
||||||
wxEVT_CREATE,
|
const wxEventType wxEVT_CREATE = wxEVT_FIRST + 410;
|
||||||
wxEVT_DESTROY,
|
const wxEventType wxEVT_DESTROY = wxEVT_FIRST + 411;
|
||||||
wxEVT_SHOW,
|
const wxEventType wxEVT_SHOW = wxEVT_FIRST + 412;
|
||||||
wxEVT_ICONIZE,
|
const wxEventType wxEVT_ICONIZE = wxEVT_FIRST + 413;
|
||||||
wxEVT_MAXIMIZE,
|
const wxEventType wxEVT_MAXIMIZE = wxEVT_FIRST + 414;
|
||||||
wxEVT_MOUSE_CAPTURE_CHANGED,
|
const wxEventType wxEVT_MOUSE_CAPTURE_CHANGED = wxEVT_FIRST + 415;
|
||||||
wxEVT_PAINT,
|
const wxEventType wxEVT_PAINT = wxEVT_FIRST + 416;
|
||||||
wxEVT_ERASE_BACKGROUND,
|
const wxEventType wxEVT_ERASE_BACKGROUND = wxEVT_FIRST + 417;
|
||||||
wxEVT_NC_PAINT,
|
const wxEventType wxEVT_NC_PAINT = wxEVT_FIRST + 418;
|
||||||
wxEVT_PAINT_ICON,
|
const wxEventType wxEVT_PAINT_ICON = wxEVT_FIRST + 419;
|
||||||
wxEVT_MENU_CHAR,
|
const wxEventType wxEVT_MENU_CHAR = wxEVT_FIRST + 420;
|
||||||
wxEVT_MENU_INIT,
|
const wxEventType wxEVT_MENU_INIT = wxEVT_FIRST + 421;
|
||||||
wxEVT_MENU_HIGHLIGHT,
|
const wxEventType wxEVT_MENU_HIGHLIGHT = wxEVT_FIRST + 422;
|
||||||
wxEVT_POPUP_MENU_INIT,
|
const wxEventType wxEVT_POPUP_MENU_INIT = wxEVT_FIRST + 423;
|
||||||
wxEVT_CONTEXT_MENU,
|
const wxEventType wxEVT_CONTEXT_MENU = wxEVT_FIRST + 424;
|
||||||
wxEVT_SYS_COLOUR_CHANGED,
|
const wxEventType wxEVT_SYS_COLOUR_CHANGED = wxEVT_FIRST + 425;
|
||||||
wxEVT_SETTING_CHANGED,
|
const wxEventType wxEVT_SETTING_CHANGED = wxEVT_FIRST + 426;
|
||||||
wxEVT_QUERY_NEW_PALETTE,
|
const wxEventType wxEVT_QUERY_NEW_PALETTE = wxEVT_FIRST + 427;
|
||||||
wxEVT_PALETTE_CHANGED,
|
const wxEventType wxEVT_PALETTE_CHANGED = wxEVT_FIRST + 428;
|
||||||
wxEVT_JOY_BUTTON_DOWN,
|
const wxEventType wxEVT_JOY_BUTTON_DOWN = wxEVT_FIRST + 429;
|
||||||
wxEVT_JOY_BUTTON_UP,
|
const wxEventType wxEVT_JOY_BUTTON_UP = wxEVT_FIRST + 430;
|
||||||
wxEVT_JOY_MOVE,
|
const wxEventType wxEVT_JOY_MOVE = wxEVT_FIRST + 431;
|
||||||
wxEVT_JOY_ZMOVE,
|
const wxEventType wxEVT_JOY_ZMOVE = wxEVT_FIRST + 432;
|
||||||
wxEVT_DROP_FILES,
|
const wxEventType wxEVT_DROP_FILES = wxEVT_FIRST + 433;
|
||||||
wxEVT_DRAW_ITEM,
|
const wxEventType wxEVT_DRAW_ITEM = wxEVT_FIRST + 434;
|
||||||
wxEVT_MEASURE_ITEM,
|
const wxEventType wxEVT_MEASURE_ITEM = wxEVT_FIRST + 435;
|
||||||
wxEVT_COMPARE_ITEM,
|
const wxEventType wxEVT_COMPARE_ITEM = wxEVT_FIRST + 436;
|
||||||
wxEVT_INIT_DIALOG,
|
const wxEventType wxEVT_INIT_DIALOG = wxEVT_FIRST + 437;
|
||||||
wxEVT_IDLE,
|
const wxEventType wxEVT_IDLE = wxEVT_FIRST + 438;
|
||||||
wxEVT_UPDATE_UI,
|
const wxEventType wxEVT_UPDATE_UI = wxEVT_FIRST + 439;
|
||||||
|
/* System misc. */
|
||||||
|
const wxEventType wxEVT_END_PROCESS = wxEVT_FIRST + 440;
|
||||||
|
|
||||||
/* Generic command events */
|
/* Generic command events */
|
||||||
// Note: a click is a higher-level event
|
// Note: a click is a higher-level event
|
||||||
// than button down/up
|
// than button down/up
|
||||||
wxEVT_COMMAND_LEFT_CLICK,
|
const wxEventType wxEVT_COMMAND_LEFT_CLICK = wxEVT_FIRST + 500;
|
||||||
wxEVT_COMMAND_LEFT_DCLICK,
|
const wxEventType wxEVT_COMMAND_LEFT_DCLICK = wxEVT_FIRST + 501;
|
||||||
wxEVT_COMMAND_RIGHT_CLICK,
|
const wxEventType wxEVT_COMMAND_RIGHT_CLICK = wxEVT_FIRST + 502;
|
||||||
wxEVT_COMMAND_RIGHT_DCLICK,
|
const wxEventType wxEVT_COMMAND_RIGHT_DCLICK = wxEVT_FIRST + 503;
|
||||||
wxEVT_COMMAND_SET_FOCUS,
|
const wxEventType wxEVT_COMMAND_SET_FOCUS = wxEVT_FIRST + 504;
|
||||||
wxEVT_COMMAND_KILL_FOCUS,
|
const wxEventType wxEVT_COMMAND_KILL_FOCUS = wxEVT_FIRST + 505;
|
||||||
wxEVT_COMMAND_ENTER,
|
const wxEventType wxEVT_COMMAND_ENTER = wxEVT_FIRST + 506;
|
||||||
|
|
||||||
/* Tree control event types */
|
/* Tree control event types */
|
||||||
wxEVT_COMMAND_TREE_BEGIN_DRAG,
|
const wxEventType wxEVT_COMMAND_TREE_BEGIN_DRAG = wxEVT_FIRST + 600;
|
||||||
wxEVT_COMMAND_TREE_BEGIN_RDRAG,
|
const wxEventType wxEVT_COMMAND_TREE_BEGIN_RDRAG = wxEVT_FIRST + 601;
|
||||||
wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT,
|
const wxEventType wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT = wxEVT_FIRST + 602;
|
||||||
wxEVT_COMMAND_TREE_END_LABEL_EDIT,
|
const wxEventType wxEVT_COMMAND_TREE_END_LABEL_EDIT = wxEVT_FIRST + 603;
|
||||||
wxEVT_COMMAND_TREE_DELETE_ITEM,
|
const wxEventType wxEVT_COMMAND_TREE_DELETE_ITEM = wxEVT_FIRST + 604;
|
||||||
wxEVT_COMMAND_TREE_GET_INFO,
|
const wxEventType wxEVT_COMMAND_TREE_GET_INFO = wxEVT_FIRST + 605;
|
||||||
wxEVT_COMMAND_TREE_SET_INFO,
|
const wxEventType wxEVT_COMMAND_TREE_SET_INFO = wxEVT_FIRST + 606;
|
||||||
wxEVT_COMMAND_TREE_ITEM_EXPANDED,
|
const wxEventType wxEVT_COMMAND_TREE_ITEM_EXPANDED = wxEVT_FIRST + 607;
|
||||||
wxEVT_COMMAND_TREE_ITEM_EXPANDING,
|
const wxEventType wxEVT_COMMAND_TREE_ITEM_EXPANDING = wxEVT_FIRST + 608;
|
||||||
wxEVT_COMMAND_TREE_ITEM_COLLAPSED,
|
const wxEventType wxEVT_COMMAND_TREE_ITEM_COLLAPSED = wxEVT_FIRST + 609;
|
||||||
wxEVT_COMMAND_TREE_ITEM_COLLAPSING,
|
const wxEventType wxEVT_COMMAND_TREE_ITEM_COLLAPSING = wxEVT_FIRST + 610;
|
||||||
wxEVT_COMMAND_TREE_SEL_CHANGED,
|
const wxEventType wxEVT_COMMAND_TREE_SEL_CHANGED = wxEVT_FIRST + 611;
|
||||||
wxEVT_COMMAND_TREE_SEL_CHANGING,
|
const wxEventType wxEVT_COMMAND_TREE_SEL_CHANGING = wxEVT_FIRST + 612;
|
||||||
wxEVT_COMMAND_TREE_KEY_DOWN,
|
const wxEventType wxEVT_COMMAND_TREE_KEY_DOWN = wxEVT_FIRST + 613;
|
||||||
|
|
||||||
/* List control event types */
|
/* List control event types */
|
||||||
wxEVT_COMMAND_LIST_BEGIN_DRAG,
|
const wxEventType wxEVT_COMMAND_LIST_BEGIN_DRAG = wxEVT_FIRST + 700;
|
||||||
wxEVT_COMMAND_LIST_BEGIN_RDRAG,
|
const wxEventType wxEVT_COMMAND_LIST_BEGIN_RDRAG = wxEVT_FIRST + 701;
|
||||||
wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT,
|
const wxEventType wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = wxEVT_FIRST + 702;
|
||||||
wxEVT_COMMAND_LIST_END_LABEL_EDIT,
|
const wxEventType wxEVT_COMMAND_LIST_END_LABEL_EDIT = wxEVT_FIRST + 703;
|
||||||
wxEVT_COMMAND_LIST_DELETE_ITEM,
|
const wxEventType wxEVT_COMMAND_LIST_DELETE_ITEM = wxEVT_FIRST + 704;
|
||||||
wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS,
|
const wxEventType wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = wxEVT_FIRST + 705;
|
||||||
wxEVT_COMMAND_LIST_GET_INFO,
|
const wxEventType wxEVT_COMMAND_LIST_GET_INFO = wxEVT_FIRST + 706;
|
||||||
wxEVT_COMMAND_LIST_SET_INFO,
|
const wxEventType wxEVT_COMMAND_LIST_SET_INFO = wxEVT_FIRST + 707;
|
||||||
wxEVT_COMMAND_LIST_ITEM_SELECTED,
|
const wxEventType wxEVT_COMMAND_LIST_ITEM_SELECTED = wxEVT_FIRST + 708;
|
||||||
wxEVT_COMMAND_LIST_ITEM_DESELECTED,
|
const wxEventType wxEVT_COMMAND_LIST_ITEM_DESELECTED = wxEVT_FIRST + 709;
|
||||||
wxEVT_COMMAND_LIST_KEY_DOWN,
|
const wxEventType wxEVT_COMMAND_LIST_KEY_DOWN = wxEVT_FIRST + 710;
|
||||||
wxEVT_COMMAND_LIST_INSERT_ITEM,
|
const wxEventType wxEVT_COMMAND_LIST_INSERT_ITEM = wxEVT_FIRST + 711;
|
||||||
wxEVT_COMMAND_LIST_COL_CLICK,
|
const wxEventType wxEVT_COMMAND_LIST_COL_CLICK = wxEVT_FIRST + 712;
|
||||||
|
|
||||||
/* Tab and notebook control event types */
|
/* Tab and notebook control event types */
|
||||||
wxEVT_COMMAND_TAB_SEL_CHANGED,
|
const wxEventType wxEVT_COMMAND_TAB_SEL_CHANGED = wxEVT_FIRST + 800;
|
||||||
wxEVT_COMMAND_TAB_SEL_CHANGING,
|
const wxEventType wxEVT_COMMAND_TAB_SEL_CHANGING = wxEVT_FIRST + 801;
|
||||||
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
|
const wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED = wxEVT_FIRST + 802;
|
||||||
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING,
|
const wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING = wxEVT_FIRST + 803;
|
||||||
|
|
||||||
/* System misc. */
|
|
||||||
wxEVT_END_PROCESS = wxEVT_FIRST + 300
|
|
||||||
};
|
|
||||||
|
|
||||||
// Compatibility
|
// Compatibility
|
||||||
|
|
||||||
|
@@ -222,8 +222,8 @@ bool wxMouseEvent::ButtonIsDown(int but) const
|
|||||||
// Find the logical position of the event given the DC
|
// Find the logical position of the event given the DC
|
||||||
wxPoint wxMouseEvent::GetLogicalPosition(const wxDC& dc) const
|
wxPoint wxMouseEvent::GetLogicalPosition(const wxDC& dc) const
|
||||||
{
|
{
|
||||||
wxPoint pt(dc.DeviceToLogicalX(m_x), dc.DeviceToLogicalY(m_y));
|
wxPoint pt(dc.DeviceToLogicalX(m_x), dc.DeviceToLogicalY(m_y));
|
||||||
return pt;
|
return pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -305,14 +305,14 @@ bool wxEvtHandler::ProcessEvent(wxEvent& event)
|
|||||||
// chain of event handlers.
|
// chain of event handlers.
|
||||||
if (IsKindOf(CLASSINFO(wxWindow)))
|
if (IsKindOf(CLASSINFO(wxWindow)))
|
||||||
{
|
{
|
||||||
wxWindow *win = (wxWindow *)this;
|
wxWindow *win = (wxWindow *)this;
|
||||||
|
|
||||||
// Can only use the validator of the window which
|
// Can only use the validator of the window which
|
||||||
// is receiving the event
|
// is receiving the event
|
||||||
if ( (win == event.GetEventObject()) &&
|
if ( (win == event.GetEventObject()) &&
|
||||||
win->GetValidator() &&
|
win->GetValidator() &&
|
||||||
win->GetValidator()->ProcessEvent(event))
|
win->GetValidator()->ProcessEvent(event))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search upwards through the inheritance hierarchy
|
// Search upwards through the inheritance hierarchy
|
||||||
@@ -327,8 +327,8 @@ bool wxEvtHandler::ProcessEvent(wxEvent& event)
|
|||||||
// Try going down the event handler chain
|
// Try going down the event handler chain
|
||||||
if ( GetNextHandler() )
|
if ( GetNextHandler() )
|
||||||
{
|
{
|
||||||
if ( GetNextHandler()->ProcessEvent(event) )
|
if ( GetNextHandler()->ProcessEvent(event) )
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Carry on up the parent-child hierarchy,
|
// Carry on up the parent-child hierarchy,
|
||||||
@@ -337,7 +337,7 @@ bool wxEvtHandler::ProcessEvent(wxEvent& event)
|
|||||||
if (IsKindOf(CLASSINFO(wxWindow)) && event.IsKindOf(CLASSINFO(wxCommandEvent)))
|
if (IsKindOf(CLASSINFO(wxWindow)) && event.IsKindOf(CLASSINFO(wxCommandEvent)))
|
||||||
{
|
{
|
||||||
wxWindow *win = (wxWindow *)this;
|
wxWindow *win = (wxWindow *)this;
|
||||||
wxWindow *parent = win->GetParent();
|
wxWindow *parent = win->GetParent();
|
||||||
if (parent && !parent->IsBeingDeleted())
|
if (parent && !parent->IsBeingDeleted())
|
||||||
return win->GetParent()->GetEventHandler()->ProcessEvent(event);
|
return win->GetParent()->GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
@@ -364,14 +364,14 @@ bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event)
|
|||||||
(table.entries[i].m_lastId != -1 &&
|
(table.entries[i].m_lastId != -1 &&
|
||||||
(commandId >= table.entries[i].m_id && commandId <= table.entries[i].m_lastId))))
|
(commandId >= table.entries[i].m_id && commandId <= table.entries[i].m_lastId))))
|
||||||
{
|
{
|
||||||
event.Skip(FALSE);
|
event.Skip(FALSE);
|
||||||
event.m_callbackUserData = table.entries[i].m_callbackUserData;
|
event.m_callbackUserData = table.entries[i].m_callbackUserData;
|
||||||
|
|
||||||
(this->*((wxEventFunction) (table.entries[i].m_fn)))(event);
|
(this->*((wxEventFunction) (table.entries[i].m_fn)))(event);
|
||||||
|
|
||||||
if ( event.GetSkipped() )
|
if ( event.GetSkipped() )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
else
|
else
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
i ++;
|
i ++;
|
||||||
@@ -381,8 +381,8 @@ bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event)
|
|||||||
|
|
||||||
void wxEvtHandler::Connect( int id, int lastId,
|
void wxEvtHandler::Connect( int id, int lastId,
|
||||||
int eventType,
|
int eventType,
|
||||||
wxObjectEventFunction func,
|
wxObjectEventFunction func,
|
||||||
wxObject *userData )
|
wxObject *userData )
|
||||||
{
|
{
|
||||||
wxEventTableEntry *entry = new wxEventTableEntry;
|
wxEventTableEntry *entry = new wxEventTableEntry;
|
||||||
entry->m_id = id;
|
entry->m_id = id;
|
||||||
@@ -418,14 +418,14 @@ bool wxEvtHandler::SearchDynamicEventTable( wxEvent& event )
|
|||||||
(entry->m_lastId != -1 &&
|
(entry->m_lastId != -1 &&
|
||||||
(commandId >= entry->m_id && commandId <= entry->m_lastId))))
|
(commandId >= entry->m_id && commandId <= entry->m_lastId))))
|
||||||
{
|
{
|
||||||
event.Skip(FALSE);
|
event.Skip(FALSE);
|
||||||
event.m_callbackUserData = entry->m_callbackUserData;
|
event.m_callbackUserData = entry->m_callbackUserData;
|
||||||
|
|
||||||
(this->*((wxEventFunction) (entry->m_fn)))(event);
|
(this->*((wxEventFunction) (entry->m_fn)))(event);
|
||||||
|
|
||||||
if (event.GetSkipped())
|
if (event.GetSkipped())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
else
|
else
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -476,7 +476,7 @@ int wxToolBarBase::CalcScrollInc(wxScrollEvent& event)
|
|||||||
int nScrollInc = 0;
|
int nScrollInc = 0;
|
||||||
switch (event.GetEventType())
|
switch (event.GetEventType())
|
||||||
{
|
{
|
||||||
case wxEVENT_TYPE_SCROLL_TOP:
|
case wxEVT_SCROLL_TOP:
|
||||||
{
|
{
|
||||||
if (orient == wxHORIZONTAL)
|
if (orient == wxHORIZONTAL)
|
||||||
nScrollInc = - m_xScrollPosition;
|
nScrollInc = - m_xScrollPosition;
|
||||||
@@ -484,7 +484,7 @@ int wxToolBarBase::CalcScrollInc(wxScrollEvent& event)
|
|||||||
nScrollInc = - m_yScrollPosition;
|
nScrollInc = - m_yScrollPosition;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case wxEVENT_TYPE_SCROLL_BOTTOM:
|
case wxEVT_SCROLL_BOTTOM:
|
||||||
{
|
{
|
||||||
if (orient == wxHORIZONTAL)
|
if (orient == wxHORIZONTAL)
|
||||||
nScrollInc = m_xScrollLines - m_xScrollPosition;
|
nScrollInc = m_xScrollLines - m_xScrollPosition;
|
||||||
@@ -492,17 +492,17 @@ int wxToolBarBase::CalcScrollInc(wxScrollEvent& event)
|
|||||||
nScrollInc = m_yScrollLines - m_yScrollPosition;
|
nScrollInc = m_yScrollLines - m_yScrollPosition;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case wxEVENT_TYPE_SCROLL_LINEUP:
|
case wxEVT_SCROLL_LINEUP:
|
||||||
{
|
{
|
||||||
nScrollInc = -1;
|
nScrollInc = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case wxEVENT_TYPE_SCROLL_LINEDOWN:
|
case wxEVT_SCROLL_LINEDOWN:
|
||||||
{
|
{
|
||||||
nScrollInc = 1;
|
nScrollInc = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case wxEVENT_TYPE_SCROLL_PAGEUP:
|
case wxEVT_SCROLL_PAGEUP:
|
||||||
{
|
{
|
||||||
if (orient == wxHORIZONTAL)
|
if (orient == wxHORIZONTAL)
|
||||||
nScrollInc = -GetScrollPageSize(wxHORIZONTAL);
|
nScrollInc = -GetScrollPageSize(wxHORIZONTAL);
|
||||||
@@ -510,7 +510,7 @@ int wxToolBarBase::CalcScrollInc(wxScrollEvent& event)
|
|||||||
nScrollInc = -GetScrollPageSize(wxVERTICAL);
|
nScrollInc = -GetScrollPageSize(wxVERTICAL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case wxEVENT_TYPE_SCROLL_PAGEDOWN:
|
case wxEVT_SCROLL_PAGEDOWN:
|
||||||
{
|
{
|
||||||
if (orient == wxHORIZONTAL)
|
if (orient == wxHORIZONTAL)
|
||||||
nScrollInc = GetScrollPageSize(wxHORIZONTAL);
|
nScrollInc = GetScrollPageSize(wxHORIZONTAL);
|
||||||
@@ -518,7 +518,7 @@ int wxToolBarBase::CalcScrollInc(wxScrollEvent& event)
|
|||||||
nScrollInc = GetScrollPageSize(wxVERTICAL);
|
nScrollInc = GetScrollPageSize(wxVERTICAL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case wxEVENT_TYPE_SCROLL_THUMBTRACK:
|
case wxEVT_SCROLL_THUMBTRACK:
|
||||||
{
|
{
|
||||||
if (orient == wxHORIZONTAL)
|
if (orient == wxHORIZONTAL)
|
||||||
nScrollInc = pos - m_xScrollPosition;
|
nScrollInc = pos - m_xScrollPosition;
|
||||||
|
@@ -643,6 +643,7 @@ void wxWindow::ScreenToClient(int *x, int *y) const
|
|||||||
pt.y = *y;
|
pt.y = *y;
|
||||||
::ScreenToClient(hWnd, &pt);
|
::ScreenToClient(hWnd, &pt);
|
||||||
|
|
||||||
|
/*
|
||||||
// We may be faking the client origin.
|
// We may be faking the client origin.
|
||||||
// So a window that's really at (0, 30) may appear
|
// So a window that's really at (0, 30) may appear
|
||||||
// (to wxWin apps) to be at (0, 0).
|
// (to wxWin apps) to be at (0, 0).
|
||||||
@@ -652,6 +653,8 @@ void wxWindow::ScreenToClient(int *x, int *y) const
|
|||||||
pt.x -= pt1.x;
|
pt.x -= pt1.x;
|
||||||
pt.y -= pt1.y;
|
pt.y -= pt1.y;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
*x = pt.x;
|
*x = pt.x;
|
||||||
*y = pt.y;
|
*y = pt.y;
|
||||||
}
|
}
|
||||||
@@ -663,6 +666,7 @@ void wxWindow::ClientToScreen(int *x, int *y) const
|
|||||||
pt.x = *x;
|
pt.x = *x;
|
||||||
pt.y = *y;
|
pt.y = *y;
|
||||||
|
|
||||||
|
/*
|
||||||
// We may be faking the client origin.
|
// We may be faking the client origin.
|
||||||
// So a window that's really at (0, 30) may appear
|
// So a window that's really at (0, 30) may appear
|
||||||
// (to wxWin apps) to be at (0, 0).
|
// (to wxWin apps) to be at (0, 0).
|
||||||
@@ -672,6 +676,7 @@ void wxWindow::ClientToScreen(int *x, int *y) const
|
|||||||
pt.x += pt1.x;
|
pt.x += pt1.x;
|
||||||
pt.y += pt1.y;
|
pt.y += pt1.y;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
::ClientToScreen(hWnd, &pt);
|
::ClientToScreen(hWnd, &pt);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user