X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/371a5b4e62eb415107e045588f614fa49e866e78..49a63afbad7646668df343d29edd88458bc7e0a9:/include/wx/univ/inphand.h diff --git a/include/wx/univ/inphand.h b/include/wx/univ/inphand.h index fa95bb9243..5e09bebf1f 100644 --- a/include/wx/univ/inphand.h +++ b/include/wx/univ/inphand.h @@ -13,10 +13,6 @@ #ifndef _WX_UNIV_INPHAND_H_ #define _WX_UNIV_INPHAND_H_ -#ifdef __GNUG__ - #pragma interface "inphand.h" -#endif - #include "wx/univ/inpcons.h" // for wxControlAction(s) // ---------------------------------------------------------------------------- @@ -24,31 +20,31 @@ // wxTheme::GetInputHandler() // ---------------------------------------------------------------------------- -#define wxINP_HANDLER_DEFAULT _T("") -#define wxINP_HANDLER_BUTTON _T("button") -#define wxINP_HANDLER_CHECKBOX _T("checkbox") -#define wxINP_HANDLER_CHECKLISTBOX _T("checklistbox") -#define wxINP_HANDLER_COMBOBOX _T("combobox") -#define wxINP_HANDLER_LISTBOX _T("listbox") -#define wxINP_HANDLER_NOTEBOOK _T("notebook") -#define wxINP_HANDLER_RADIOBTN _T("radiobtn") -#define wxINP_HANDLER_SCROLLBAR _T("scrollbar") -#define wxINP_HANDLER_SLIDER _T("slider") -#define wxINP_HANDLER_SPINBTN _T("spinbtn") -#define wxINP_HANDLER_STATUSBAR _T("statusbar") -#define wxINP_HANDLER_TEXTCTRL _T("textctrl") -#define wxINP_HANDLER_TOOLBAR _T("toolbar") -#define wxINP_HANDLER_TOPLEVEL _T("toplevel") +#define wxINP_HANDLER_DEFAULT wxT("") +#define wxINP_HANDLER_BUTTON wxT("button") +#define wxINP_HANDLER_CHECKBOX wxT("checkbox") +#define wxINP_HANDLER_CHECKLISTBOX wxT("checklistbox") +#define wxINP_HANDLER_COMBOBOX wxT("combobox") +#define wxINP_HANDLER_LISTBOX wxT("listbox") +#define wxINP_HANDLER_NOTEBOOK wxT("notebook") +#define wxINP_HANDLER_RADIOBTN wxT("radiobtn") +#define wxINP_HANDLER_SCROLLBAR wxT("scrollbar") +#define wxINP_HANDLER_SLIDER wxT("slider") +#define wxINP_HANDLER_SPINBTN wxT("spinbtn") +#define wxINP_HANDLER_STATUSBAR wxT("statusbar") +#define wxINP_HANDLER_TEXTCTRL wxT("textctrl") +#define wxINP_HANDLER_TOOLBAR wxT("toolbar") +#define wxINP_HANDLER_TOPLEVEL wxT("toplevel") // ---------------------------------------------------------------------------- // wxInputHandler: maps the events to the actions // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxInputHandler : public wxObject +class WXDLLIMPEXP_CORE wxInputHandler : public wxObject { public: - // map a keyboard event to one or more actions (pressed == TRUE if the key - // was pressed, FALSE if released), returns TRUE if something was done + // map a keyboard event to one or more actions (pressed == true if the key + // was pressed, false if released), returns true if something was done virtual bool HandleKey(wxInputConsumer *consumer, const wxKeyEvent& event, bool pressed) = 0; @@ -67,12 +63,12 @@ public: // HandleMouseMove() as the mouse maybe over the control without it having // focus // - // return TRUE to refresh the control, FALSE otherwise + // return true to refresh the control, false otherwise virtual bool HandleFocus(wxInputConsumer *consumer, const wxFocusEvent& event); // react to the app getting/losing activation // - // return TRUE to refresh the control, FALSE otherwise + // return true to refresh the control, false otherwise virtual bool HandleActivation(wxInputConsumer *consumer, bool activated); // virtual dtor for any base class @@ -84,7 +80,7 @@ public: // and also provides the way to chain input handlers together // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxStdInputHandler : public wxInputHandler +class WXDLLIMPEXP_CORE wxStdInputHandler : public wxInputHandler { public: wxStdInputHandler(wxInputHandler *handler) : m_handler(handler) { } @@ -94,23 +90,23 @@ public: bool pressed) { return m_handler ? m_handler->HandleKey(consumer, event, pressed) - : FALSE; + : false; } virtual bool HandleMouse(wxInputConsumer *consumer, const wxMouseEvent& event) { - return m_handler ? m_handler->HandleMouse(consumer, event) : FALSE; + return m_handler ? m_handler->HandleMouse(consumer, event) : false; } virtual bool HandleMouseMove(wxInputConsumer *consumer, const wxMouseEvent& event) { - return m_handler ? m_handler->HandleMouseMove(consumer, event) : FALSE; + return m_handler ? m_handler->HandleMouseMove(consumer, event) : false; } virtual bool HandleFocus(wxInputConsumer *consumer, const wxFocusEvent& event) { - return m_handler ? m_handler->HandleFocus(consumer, event) : FALSE; + return m_handler ? m_handler->HandleFocus(consumer, event) : false; } private: