Many changes for wxInputHandler creation mainly related to:
1. Allow the theme to create only the input handlers it customizes instead of forcing it to always create a handler even if the standard one is used: wxTheme::GetInputHandler() now takes wxInputConsumer to make this possible 2. Prefer delegation to inheritance when creating customized input handlers, almost all (except for wxStdScrollbarInputHandler) standard handler classes are now private, use wxClassName::GetStdInputHandler() to retrieve the standard handler for any class or polymorphic DoGetStdInputHandler() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -111,6 +111,12 @@ public:
|
||||
long numArg = 0l,
|
||||
const wxString& strArg = wxEmptyString);
|
||||
|
||||
static wxInputHandler *GetStdInputHandler(wxInputHandler *handlerDef);
|
||||
virtual wxInputHandler *DoGetStdInputHandler(wxInputHandler *handlerDef)
|
||||
{
|
||||
return GetStdInputHandler(handlerDef);
|
||||
}
|
||||
|
||||
// refresh the currently selected tab
|
||||
void RefreshCurrent();
|
||||
|
||||
@@ -242,28 +248,5 @@ protected:
|
||||
DECLARE_DYNAMIC_CLASS(wxNotebook)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxStdNotebookInputHandler: translates SPACE and ENTER keys and the left mouse
|
||||
// click into button press/release actions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxStdNotebookInputHandler : public wxStdInputHandler
|
||||
{
|
||||
public:
|
||||
wxStdNotebookInputHandler(wxInputHandler *inphand);
|
||||
|
||||
virtual bool HandleKey(wxInputConsumer *consumer,
|
||||
const wxKeyEvent& event,
|
||||
bool pressed);
|
||||
virtual bool HandleMouse(wxInputConsumer *consumer,
|
||||
const wxMouseEvent& event);
|
||||
virtual bool HandleMouseMove(wxInputConsumer *consumer, const wxMouseEvent& event);
|
||||
virtual bool HandleFocus(wxInputConsumer *consumer, const wxFocusEvent& event);
|
||||
virtual bool HandleActivation(wxInputConsumer *consumer, bool activated);
|
||||
|
||||
protected:
|
||||
void HandleFocusChange(wxInputConsumer *consumer);
|
||||
};
|
||||
|
||||
#endif // _WX_UNIV_NOTEBOOK_H_
|
||||
|
||||
|
Reference in New Issue
Block a user