+ void OnDClick(wxMouseEvent& event)
+ {
+ wxLogMessage(_T("MyButton::OnDClick"));
+
+ event.Skip();
+ }
+
+private:
+ DECLARE_EVENT_TABLE()
+};
+
+// a combo which intercepts chars (to test Windows behaviour)
+class MyComboBox : public wxComboBox
+{
+public:
+ MyComboBox(wxWindow *parent, wxWindowID id,
+ const wxString& value = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ int n = 0, const wxString choices[] = NULL,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxComboBoxNameStr)
+ : wxComboBox(parent, id, value, pos, size, n, choices, style,
+ validator, name) { }
+
+protected:
+ void OnChar(wxKeyEvent& event);
+ void OnKeyDown(wxKeyEvent& event);
+ void OnKeyUp(wxKeyEvent& event);
+ void OnFocusGot(wxFocusEvent& event)
+ {
+ wxLogMessage(_T("MyComboBox::OnFocusGot"));
+
+ event.Skip();
+ }
+
+private:
+ DECLARE_EVENT_TABLE()
+};
+
+// a radiobox which handles focus set/kill (for testing)
+class MyRadioBox : public wxRadioBox
+{
+public:
+ MyRadioBox(wxWindow *parent,
+ wxWindowID id,
+ const wxString& title = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ int n = 0, const wxString choices[] = NULL,
+ int majorDim = 1,
+ long style = wxRA_HORIZONTAL,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxRadioBoxNameStr)
+ : wxRadioBox(parent, id, title, pos, size, n, choices, majorDim,
+ style, validator, name) { }
+
+protected:
+ void OnFocusGot(wxFocusEvent& event)
+ {
+ wxLogMessage(_T("MyRadioBox::OnFocusGot"));
+
+ event.Skip();
+ }
+
+ void OnFocusLost(wxFocusEvent& event)
+ {
+ wxLogMessage(_T("MyRadioBox::OnFocusLost"));
+
+ event.Skip();
+ }
+
+private: