use "new" wx-prefixed macros in samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -107,7 +107,7 @@ private:
|
|||||||
wxTextCtrl* m_textCtrl;
|
wxTextCtrl* m_textCtrl;
|
||||||
|
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -136,11 +136,11 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(AccessTest_Quit, MyFrame::OnQuit)
|
EVT_MENU(AccessTest_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(AccessTest_Query, MyFrame::OnQuery)
|
EVT_MENU(AccessTest_Query, MyFrame::OnQuery)
|
||||||
EVT_MENU(AccessTest_About, MyFrame::OnAbout)
|
EVT_MENU(AccessTest_About, MyFrame::OnAbout)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
#endif // wxUSE_ACCESSIBILITY
|
#endif // wxUSE_ACCESSIBILITY
|
||||||
|
|
||||||
|
@@ -62,7 +62,7 @@ enum
|
|||||||
ID_SET_BGCOLOR
|
ID_SET_BGCOLOR
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(ID_PLAY, MyFrame::OnPlay)
|
EVT_MENU(ID_PLAY, MyFrame::OnPlay)
|
||||||
EVT_MENU(ID_SET_NULL_ANIMATION, MyFrame::OnSetNullAnimation)
|
EVT_MENU(ID_SET_NULL_ANIMATION, MyFrame::OnSetNullAnimation)
|
||||||
EVT_MENU(ID_SET_INACTIVE_BITMAP, MyFrame::OnSetInactiveBitmap)
|
EVT_MENU(ID_SET_INACTIVE_BITMAP, MyFrame::OnSetInactiveBitmap)
|
||||||
@@ -78,7 +78,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
|
|
||||||
EVT_SIZE(MyFrame::OnSize)
|
EVT_SIZE(MyFrame::OnSize)
|
||||||
EVT_UPDATE_UI(wxID_ANY, MyFrame::OnUpdateUI)
|
EVT_UPDATE_UI(wxID_ANY, MyFrame::OnUpdateUI)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
// implementation
|
// implementation
|
||||||
|
@@ -48,5 +48,5 @@ protected:
|
|||||||
wxAnimationCtrl* m_animationCtrl;
|
wxAnimationCtrl* m_animationCtrl;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
@@ -123,10 +123,10 @@ static void FillBitmaps(wxImageList *images, wxListCtrl *list,
|
|||||||
|
|
||||||
#include "null.xpm"
|
#include "null.xpm"
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxArtBrowserDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(wxArtBrowserDialog, wxDialog)
|
||||||
EVT_LIST_ITEM_SELECTED(wxID_ANY, wxArtBrowserDialog::OnSelectItem)
|
EVT_LIST_ITEM_SELECTED(wxID_ANY, wxArtBrowserDialog::OnSelectItem)
|
||||||
EVT_CHOICE(wxID_ANY, wxArtBrowserDialog::OnChooseClient)
|
EVT_CHOICE(wxID_ANY, wxArtBrowserDialog::OnChooseClient)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent)
|
wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent)
|
||||||
: wxDialog(parent, wxID_ANY, wxT("Art resources browser"),
|
: wxDialog(parent, wxID_ANY, wxT("Art resources browser"),
|
||||||
|
@@ -35,7 +35,7 @@ private:
|
|||||||
wxStaticText *m_text;
|
wxStaticText *m_text;
|
||||||
wxString m_client;
|
wxString m_client;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __ARTBROWS_H__
|
#endif // __ARTBROWS_H__
|
||||||
|
@@ -52,7 +52,7 @@ private:
|
|||||||
void OnBrowser(wxCommandEvent& event);
|
void OnBrowser(wxCommandEvent& event);
|
||||||
void OnPlugProvider(wxCommandEvent& event);
|
void OnPlugProvider(wxCommandEvent& event);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -72,7 +72,7 @@ enum
|
|||||||
// event tables and other macros for wxWidgets
|
// event tables and other macros for wxWidgets
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(ID_Quit, MyFrame::OnQuit)
|
EVT_MENU(ID_Quit, MyFrame::OnQuit)
|
||||||
#if wxUSE_LOG
|
#if wxUSE_LOG
|
||||||
EVT_MENU(ID_Logs, MyFrame::OnLogs)
|
EVT_MENU(ID_Logs, MyFrame::OnLogs)
|
||||||
@@ -80,7 +80,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
|
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
|
||||||
EVT_MENU(ID_Browser, MyFrame::OnBrowser)
|
EVT_MENU(ID_Browser, MyFrame::OnBrowser)
|
||||||
EVT_MENU(ID_PlugProvider, MyFrame::OnPlugProvider)
|
EVT_MENU(ID_PlugProvider, MyFrame::OnPlugProvider)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
IMPLEMENT_APP(MyApp)
|
IMPLEMENT_APP(MyApp)
|
||||||
|
|
||||||
|
@@ -173,7 +173,7 @@ private:
|
|||||||
long m_notebook_style;
|
long m_notebook_style;
|
||||||
long m_notebook_theme;
|
long m_notebook_theme;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -250,14 +250,14 @@ private:
|
|||||||
|
|
||||||
wxAuiManager* m_mgr;
|
wxAuiManager* m_mgr;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxSizeReportCtrl, wxControl)
|
wxBEGIN_EVENT_TABLE(wxSizeReportCtrl, wxControl)
|
||||||
EVT_PAINT(wxSizeReportCtrl::OnPaint)
|
EVT_PAINT(wxSizeReportCtrl::OnPaint)
|
||||||
EVT_SIZE(wxSizeReportCtrl::OnSize)
|
EVT_SIZE(wxSizeReportCtrl::OnSize)
|
||||||
EVT_ERASE_BACKGROUND(wxSizeReportCtrl::OnEraseBackground)
|
EVT_ERASE_BACKGROUND(wxSizeReportCtrl::OnEraseBackground)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
class SettingsPanel : public wxPanel
|
class SettingsPanel : public wxPanel
|
||||||
@@ -539,10 +539,10 @@ private:
|
|||||||
wxBitmapButton* m_border_color;
|
wxBitmapButton* m_border_color;
|
||||||
wxBitmapButton* m_gripper_color;
|
wxBitmapButton* m_gripper_color;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(SettingsPanel, wxPanel)
|
wxBEGIN_EVENT_TABLE(SettingsPanel, wxPanel)
|
||||||
EVT_SPINCTRL(ID_PaneBorderSize, SettingsPanel::OnPaneBorderSize)
|
EVT_SPINCTRL(ID_PaneBorderSize, SettingsPanel::OnPaneBorderSize)
|
||||||
EVT_SPINCTRL(ID_SashSize, SettingsPanel::OnSashSize)
|
EVT_SPINCTRL(ID_SashSize, SettingsPanel::OnSashSize)
|
||||||
EVT_SPINCTRL(ID_CaptionSize, SettingsPanel::OnCaptionSize)
|
EVT_SPINCTRL(ID_CaptionSize, SettingsPanel::OnCaptionSize)
|
||||||
@@ -556,7 +556,7 @@ BEGIN_EVENT_TABLE(SettingsPanel, wxPanel)
|
|||||||
EVT_BUTTON(ID_ActiveCaptionTextColor, SettingsPanel::OnSetColor)
|
EVT_BUTTON(ID_ActiveCaptionTextColor, SettingsPanel::OnSetColor)
|
||||||
EVT_BUTTON(ID_BorderColor, SettingsPanel::OnSetColor)
|
EVT_BUTTON(ID_BorderColor, SettingsPanel::OnSetColor)
|
||||||
EVT_BUTTON(ID_GripperColor, SettingsPanel::OnSetColor)
|
EVT_BUTTON(ID_GripperColor, SettingsPanel::OnSetColor)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
bool MyApp::OnInit()
|
bool MyApp::OnInit()
|
||||||
@@ -574,7 +574,7 @@ bool MyApp::OnInit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_ERASE_BACKGROUND(MyFrame::OnEraseBackground)
|
EVT_ERASE_BACKGROUND(MyFrame::OnEraseBackground)
|
||||||
EVT_SIZE(MyFrame::OnSize)
|
EVT_SIZE(MyFrame::OnSize)
|
||||||
EVT_MENU(MyFrame::ID_CreateTree, MyFrame::OnCreateTree)
|
EVT_MENU(MyFrame::ID_CreateTree, MyFrame::OnCreateTree)
|
||||||
@@ -653,7 +653,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_AUINOTEBOOK_ALLOW_DND(wxID_ANY, MyFrame::OnAllowNotebookDnD)
|
EVT_AUINOTEBOOK_ALLOW_DND(wxID_ANY, MyFrame::OnAllowNotebookDnD)
|
||||||
EVT_AUINOTEBOOK_PAGE_CLOSE(wxID_ANY, MyFrame::OnNotebookPageClose)
|
EVT_AUINOTEBOOK_PAGE_CLOSE(wxID_ANY, MyFrame::OnNotebookPageClose)
|
||||||
EVT_AUINOTEBOOK_PAGE_CLOSED(wxID_ANY, MyFrame::OnNotebookPageClosed)
|
EVT_AUINOTEBOOK_PAGE_CLOSED(wxID_ANY, MyFrame::OnNotebookPageClosed)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
MyFrame::MyFrame(wxWindow* parent,
|
MyFrame::MyFrame(wxWindow* parent,
|
||||||
|
@@ -121,7 +121,7 @@ private:
|
|||||||
bool m_usingGeneric;
|
bool m_usingGeneric;
|
||||||
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Define a new frame type: this is going to be our main frame
|
// Define a new frame type: this is going to be our main frame
|
||||||
@@ -181,7 +181,7 @@ private:
|
|||||||
wxTextCtrl *m_logWindow;
|
wxTextCtrl *m_logWindow;
|
||||||
|
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
#if wxUSE_DATEPICKCTRL
|
#if wxUSE_DATEPICKCTRL
|
||||||
@@ -202,7 +202,7 @@ private:
|
|||||||
wxStaticText *m_dateText;
|
wxStaticText *m_dateText;
|
||||||
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // wxUSE_DATEPICKCTRL
|
#endif // wxUSE_DATEPICKCTRL
|
||||||
@@ -278,7 +278,7 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Calendar_File_About, MyFrame::OnAbout)
|
EVT_MENU(Calendar_File_About, MyFrame::OnAbout)
|
||||||
EVT_MENU(Calendar_File_ClearLog, MyFrame::OnClearLog)
|
EVT_MENU(Calendar_File_ClearLog, MyFrame::OnClearLog)
|
||||||
EVT_MENU(Calendar_File_Quit, MyFrame::OnQuit)
|
EVT_MENU(Calendar_File_Quit, MyFrame::OnQuit)
|
||||||
@@ -324,15 +324,15 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
#endif
|
#endif
|
||||||
EVT_UPDATE_UI(Calendar_Cal_Special, MyFrame::OnUpdateUIGenericOnly)
|
EVT_UPDATE_UI(Calendar_Cal_Special, MyFrame::OnUpdateUIGenericOnly)
|
||||||
EVT_UPDATE_UI(Calendar_Cal_SurroundWeeks, MyFrame::OnUpdateUIGenericOnly)
|
EVT_UPDATE_UI(Calendar_Cal_SurroundWeeks, MyFrame::OnUpdateUIGenericOnly)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyPanel, wxPanel)
|
wxBEGIN_EVENT_TABLE(MyPanel, wxPanel)
|
||||||
EVT_CALENDAR(Calendar_CalCtrl, MyPanel::OnCalendar)
|
EVT_CALENDAR(Calendar_CalCtrl, MyPanel::OnCalendar)
|
||||||
EVT_CALENDAR_PAGE_CHANGED(Calendar_CalCtrl, MyPanel::OnCalMonthChange)
|
EVT_CALENDAR_PAGE_CHANGED(Calendar_CalCtrl, MyPanel::OnCalMonthChange)
|
||||||
EVT_CALENDAR_SEL_CHANGED(Calendar_CalCtrl, MyPanel::OnCalendarChange)
|
EVT_CALENDAR_SEL_CHANGED(Calendar_CalCtrl, MyPanel::OnCalendarChange)
|
||||||
EVT_CALENDAR_WEEKDAY_CLICKED(Calendar_CalCtrl, MyPanel::OnCalendarWeekDayClick)
|
EVT_CALENDAR_WEEKDAY_CLICKED(Calendar_CalCtrl, MyPanel::OnCalendarWeekDayClick)
|
||||||
EVT_CALENDAR_WEEK_CLICKED(Calendar_CalCtrl, MyPanel::OnCalendarWeekClick)
|
EVT_CALENDAR_WEEK_CLICKED(Calendar_CalCtrl, MyPanel::OnCalendarWeekClick)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
@@ -892,9 +892,9 @@ void MyPanel::LimitDateRange(bool on)
|
|||||||
|
|
||||||
#if wxUSE_DATEPICKCTRL
|
#if wxUSE_DATEPICKCTRL
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyDateDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(MyDateDialog, wxDialog)
|
||||||
EVT_DATE_CHANGED(wxID_ANY, MyDateDialog::OnDateChange)
|
EVT_DATE_CHANGED(wxID_ANY, MyDateDialog::OnDateChange)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyDateDialog::MyDateDialog(wxWindow *parent, const wxDateTime& dt, int dtpStyle)
|
MyDateDialog::MyDateDialog(wxWindow *parent, const wxDateTime& dt, int dtpStyle)
|
||||||
: wxDialog(parent, wxID_ANY, wxString(wxT("Calendar: Choose a date")))
|
: wxDialog(parent, wxID_ANY, wxString(wxT("Calendar: Choose a date")))
|
||||||
@@ -950,9 +950,9 @@ void MyDateDialog::OnDateChange(wxDateEvent& event)
|
|||||||
|
|
||||||
#if wxUSE_TIMEPICKCTRL
|
#if wxUSE_TIMEPICKCTRL
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyTimeDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(MyTimeDialog, wxDialog)
|
||||||
EVT_TIME_CHANGED(wxID_ANY, MyTimeDialog::OnTimeChange)
|
EVT_TIME_CHANGED(wxID_ANY, MyTimeDialog::OnTimeChange)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyTimeDialog::MyTimeDialog(wxWindow *parent)
|
MyTimeDialog::MyTimeDialog(wxWindow *parent)
|
||||||
: wxDialog(parent, wxID_ANY, wxString(wxT("Calendar: Choose time")))
|
: wxDialog(parent, wxID_ANY, wxString(wxT("Calendar: Choose time")))
|
||||||
|
@@ -105,8 +105,8 @@ private:
|
|||||||
// the text
|
// the text
|
||||||
wxChar *m_text;
|
wxChar *m_text;
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS(MyCanvas)
|
wxDECLARE_DYNAMIC_CLASS(MyCanvas);
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ private:
|
|||||||
MyCanvas *m_canvas;
|
MyCanvas *m_canvas;
|
||||||
|
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -156,13 +156,13 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Caret_Quit, MyFrame::OnQuit)
|
EVT_MENU(Caret_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(Caret_About, MyFrame::OnAbout)
|
EVT_MENU(Caret_About, MyFrame::OnAbout)
|
||||||
EVT_MENU(Caret_SetBlinkTime, MyFrame::OnSetBlinkTime)
|
EVT_MENU(Caret_SetBlinkTime, MyFrame::OnSetBlinkTime)
|
||||||
EVT_MENU(Caret_SetFontSize, MyFrame::OnSetFontSize)
|
EVT_MENU(Caret_SetFontSize, MyFrame::OnSetFontSize)
|
||||||
EVT_MENU(Caret_Move, MyFrame::OnCaretMove)
|
EVT_MENU(Caret_Move, MyFrame::OnCaretMove)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
@@ -296,11 +296,11 @@ void MyFrame::OnSetFontSize(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(MyCanvas, wxScrolledWindow)
|
IMPLEMENT_DYNAMIC_CLASS(MyCanvas, wxScrolledWindow)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
wxBEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
||||||
EVT_PAINT(MyCanvas::OnPaint)
|
EVT_PAINT(MyCanvas::OnPaint)
|
||||||
EVT_SIZE(MyCanvas::OnSize)
|
EVT_SIZE(MyCanvas::OnSize)
|
||||||
EVT_CHAR(MyCanvas::OnChar)
|
EVT_CHAR(MyCanvas::OnChar)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyCanvas::MyCanvas( wxWindow *parent )
|
MyCanvas::MyCanvas( wxWindow *parent )
|
||||||
: wxScrolledWindow( parent, wxID_ANY,
|
: wxScrolledWindow( parent, wxID_ANY,
|
||||||
|
@@ -63,7 +63,7 @@ private:
|
|||||||
bool m_clipboardSupportsText;
|
bool m_clipboardSupportsText;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@@ -74,7 +74,7 @@ enum
|
|||||||
ID_Text = 101
|
ID_Text = 101
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(ID_Quit, MyFrame::OnQuit)
|
EVT_MENU(ID_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(ID_About, MyFrame::OnAbout)
|
EVT_MENU(ID_About, MyFrame::OnAbout)
|
||||||
EVT_BUTTON(ID_Write, MyFrame::OnWriteClipboardContents)
|
EVT_BUTTON(ID_Write, MyFrame::OnWriteClipboardContents)
|
||||||
@@ -82,7 +82,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
#if USE_ASYNCHRONOUS_CLIPBOARD_REQUEST
|
#if USE_ASYNCHRONOUS_CLIPBOARD_REQUEST
|
||||||
EVT_CLIPBOARD_CHANGED(MyFrame::OnClipboardChange)
|
EVT_CLIPBOARD_CHANGED(MyFrame::OnClipboardChange)
|
||||||
#endif
|
#endif
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
IMPLEMENT_APP(MyApp)
|
IMPLEMENT_APP(MyApp)
|
||||||
|
|
||||||
|
@@ -102,7 +102,7 @@ private:
|
|||||||
wxCollapsiblePane *m_collPane;
|
wxCollapsiblePane *m_collPane;
|
||||||
wxBoxSizer *m_paneSizer;
|
wxBoxSizer *m_paneSizer;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
wxDECLARE_NO_COPY_CLASS(MyFrame);
|
wxDECLARE_NO_COPY_CLASS(MyFrame);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ private:
|
|||||||
wxCollapsiblePane *m_collPane;
|
wxCollapsiblePane *m_collPane;
|
||||||
wxGridSizer *m_paneSizer;
|
wxGridSizer *m_paneSizer;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
wxDECLARE_NO_COPY_CLASS(MyDialog);
|
wxDECLARE_NO_COPY_CLASS(MyDialog);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ bool MyApp::OnInit()
|
|||||||
// MyFrame
|
// MyFrame
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(PANE_COLLAPSE, MyFrame::OnCollapse)
|
EVT_MENU(PANE_COLLAPSE, MyFrame::OnCollapse)
|
||||||
EVT_MENU(PANE_EXPAND, MyFrame::OnExpand)
|
EVT_MENU(PANE_EXPAND, MyFrame::OnExpand)
|
||||||
EVT_MENU(PANE_SETLABEL, MyFrame::OnSetLabel)
|
EVT_MENU(PANE_SETLABEL, MyFrame::OnSetLabel)
|
||||||
@@ -161,7 +161,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
|
|
||||||
EVT_UPDATE_UI(PANE_COLLAPSE, MyFrame::OnCollapseUpdateUI)
|
EVT_UPDATE_UI(PANE_COLLAPSE, MyFrame::OnCollapseUpdateUI)
|
||||||
EVT_UPDATE_UI(PANE_EXPAND, MyFrame::OnExpandUpdateUI)
|
EVT_UPDATE_UI(PANE_EXPAND, MyFrame::OnExpandUpdateUI)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// My frame constructor
|
// My frame constructor
|
||||||
MyFrame::MyFrame()
|
MyFrame::MyFrame()
|
||||||
@@ -278,11 +278,11 @@ enum
|
|||||||
PANEDLG_TOGGLESTATUS_BTN = wxID_HIGHEST
|
PANEDLG_TOGGLESTATUS_BTN = wxID_HIGHEST
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(MyDialog, wxDialog)
|
||||||
EVT_BUTTON(PANEDLG_TOGGLESTATUS_BTN, MyDialog::OnToggleStatus)
|
EVT_BUTTON(PANEDLG_TOGGLESTATUS_BTN, MyDialog::OnToggleStatus)
|
||||||
EVT_COLLAPSIBLEPANE_CHANGED(wxID_ANY, MyDialog::OnPaneChanged)
|
EVT_COLLAPSIBLEPANE_CHANGED(wxID_ANY, MyDialog::OnPaneChanged)
|
||||||
EVT_BUTTON(PANE_BUTTON, MyDialog::OnAlignButton)
|
EVT_BUTTON(PANE_BUTTON, MyDialog::OnAlignButton)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyDialog::MyDialog(wxFrame *parent)
|
MyDialog::MyDialog(wxFrame *parent)
|
||||||
: wxDialog(parent, wxID_ANY, wxT("Test dialog"),
|
: wxDialog(parent, wxID_ANY, wxT("Test dialog"),
|
||||||
|
@@ -94,7 +94,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -122,7 +122,7 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_TEXT(wxID_ANY,MyFrame::OnComboBoxUpdate)
|
EVT_TEXT(wxID_ANY,MyFrame::OnComboBoxUpdate)
|
||||||
EVT_TEXT_ENTER(wxID_ANY,MyFrame::OnComboBoxUpdate)
|
EVT_TEXT_ENTER(wxID_ANY,MyFrame::OnComboBoxUpdate)
|
||||||
EVT_COMBOBOX(wxID_ANY,MyFrame::OnComboBoxUpdate)
|
EVT_COMBOBOX(wxID_ANY,MyFrame::OnComboBoxUpdate)
|
||||||
@@ -132,7 +132,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MENU(ComboCtrl_About, MyFrame::OnAbout)
|
EVT_MENU(ComboCtrl_About, MyFrame::OnAbout)
|
||||||
|
|
||||||
EVT_IDLE(MyFrame::OnIdle)
|
EVT_IDLE(MyFrame::OnIdle)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
@@ -351,16 +351,16 @@ protected:
|
|||||||
int m_itemHere; // hot item in popup
|
int m_itemHere; // hot item in popup
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(ListViewComboPopup, wxListView)
|
wxBEGIN_EVENT_TABLE(ListViewComboPopup, wxListView)
|
||||||
EVT_MOTION(ListViewComboPopup::OnMouseMove)
|
EVT_MOTION(ListViewComboPopup::OnMouseMove)
|
||||||
// NOTE: Left down event is used instead of left up right now
|
// NOTE: Left down event is used instead of left up right now
|
||||||
// since MSW wxListCtrl doesn't seem to emit left ups
|
// since MSW wxListCtrl doesn't seem to emit left ups
|
||||||
// consistently.
|
// consistently.
|
||||||
EVT_LEFT_DOWN(ListViewComboPopup::OnMouseClick)
|
EVT_LEFT_DOWN(ListViewComboPopup::OnMouseClick)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -489,16 +489,16 @@ protected:
|
|||||||
wxTreeItemId m_itemHere; // hot item in popup
|
wxTreeItemId m_itemHere; // hot item in popup
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(TreeCtrlComboPopup, wxTreeCtrl)
|
wxBEGIN_EVENT_TABLE(TreeCtrlComboPopup, wxTreeCtrl)
|
||||||
EVT_MOTION(TreeCtrlComboPopup::OnMouseMove)
|
EVT_MOTION(TreeCtrlComboPopup::OnMouseMove)
|
||||||
// NOTE: Left down event is used instead of left up right now
|
// NOTE: Left down event is used instead of left up right now
|
||||||
// since MSW wxTreeCtrl doesn't seem to emit left ups
|
// since MSW wxTreeCtrl doesn't seem to emit left ups
|
||||||
// consistently.
|
// consistently.
|
||||||
EVT_LEFT_DOWN(TreeCtrlComboPopup::OnMouseClick)
|
EVT_LEFT_DOWN(TreeCtrlComboPopup::OnMouseClick)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxComboCtrl with custom popup animation, using wxWindow::ShowWithEffect().
|
// wxComboCtrl with custom popup animation, using wxWindow::ShowWithEffect().
|
||||||
|
@@ -59,18 +59,18 @@ private:
|
|||||||
wxTextCtrl *m_text;
|
wxTextCtrl *m_text;
|
||||||
wxCheckBox *m_check;
|
wxCheckBox *m_check;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// event tables
|
// event tables
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
|
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
|
||||||
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
|
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
|
||||||
EVT_MENU(wxID_DELETE, MyFrame::OnDelete)
|
EVT_MENU(wxID_DELETE, MyFrame::OnDelete)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// implementation
|
// implementation
|
||||||
|
@@ -178,7 +178,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
wxLog *m_logTargetOld;
|
wxLog *m_logTargetOld;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyFrame: public wxFrame
|
class MyFrame: public wxFrame
|
||||||
@@ -232,7 +232,7 @@ private:
|
|||||||
|
|
||||||
MyPanel *m_panel;
|
MyPanel *m_panel;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// a button which intercepts double clicks (for testing...)
|
// a button which intercepts double clicks (for testing...)
|
||||||
@@ -256,7 +256,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// a combo which intercepts chars (to test Windows behaviour)
|
// a combo which intercepts chars (to test Windows behaviour)
|
||||||
@@ -286,7 +286,7 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// a radiobox which handles focus set/kill (for testing)
|
// a radiobox which handles focus set/kill (for testing)
|
||||||
@@ -324,7 +324,7 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// a choice which handles focus set/kill (for testing)
|
// a choice which handles focus set/kill (for testing)
|
||||||
@@ -358,7 +358,7 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -503,7 +503,7 @@ const int ID_SIZER_CHECKBIG = 206;
|
|||||||
|
|
||||||
const int ID_HYPERLINK = 300;
|
const int ID_HYPERLINK = 300;
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyPanel, wxPanel)
|
wxBEGIN_EVENT_TABLE(MyPanel, wxPanel)
|
||||||
EVT_IDLE ( MyPanel::OnIdle)
|
EVT_IDLE ( MyPanel::OnIdle)
|
||||||
EVT_BOOKCTRL_PAGE_CHANGING(ID_BOOK, MyPanel::OnPageChanging)
|
EVT_BOOKCTRL_PAGE_CHANGING(ID_BOOK, MyPanel::OnPageChanging)
|
||||||
EVT_BOOKCTRL_PAGE_CHANGED(ID_BOOK, MyPanel::OnPageChanged)
|
EVT_BOOKCTRL_PAGE_CHANGED(ID_BOOK, MyPanel::OnPageChanged)
|
||||||
@@ -581,29 +581,29 @@ EVT_CHECKBOX (ID_SIZER_CHECK4, MyPanel::OnSizerCheck)
|
|||||||
EVT_CHECKBOX (ID_SIZER_CHECK14, MyPanel::OnSizerCheck)
|
EVT_CHECKBOX (ID_SIZER_CHECK14, MyPanel::OnSizerCheck)
|
||||||
EVT_CHECKBOX (ID_SIZER_CHECKBIG, MyPanel::OnSizerCheck)
|
EVT_CHECKBOX (ID_SIZER_CHECKBIG, MyPanel::OnSizerCheck)
|
||||||
|
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyButton, wxButton)
|
wxBEGIN_EVENT_TABLE(MyButton, wxButton)
|
||||||
EVT_LEFT_DCLICK(MyButton::OnDClick)
|
EVT_LEFT_DCLICK(MyButton::OnDClick)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyComboBox, wxComboBox)
|
wxBEGIN_EVENT_TABLE(MyComboBox, wxComboBox)
|
||||||
EVT_CHAR(MyComboBox::OnChar)
|
EVT_CHAR(MyComboBox::OnChar)
|
||||||
EVT_KEY_DOWN(MyComboBox::OnKeyDown)
|
EVT_KEY_DOWN(MyComboBox::OnKeyDown)
|
||||||
EVT_KEY_UP(MyComboBox::OnKeyUp)
|
EVT_KEY_UP(MyComboBox::OnKeyUp)
|
||||||
|
|
||||||
EVT_SET_FOCUS(MyComboBox::OnFocusGot)
|
EVT_SET_FOCUS(MyComboBox::OnFocusGot)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyRadioBox, wxRadioBox)
|
wxBEGIN_EVENT_TABLE(MyRadioBox, wxRadioBox)
|
||||||
EVT_SET_FOCUS(MyRadioBox::OnFocusGot)
|
EVT_SET_FOCUS(MyRadioBox::OnFocusGot)
|
||||||
EVT_KILL_FOCUS(MyRadioBox::OnFocusLost)
|
EVT_KILL_FOCUS(MyRadioBox::OnFocusLost)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyChoice, wxChoice)
|
wxBEGIN_EVENT_TABLE(MyChoice, wxChoice)
|
||||||
EVT_SET_FOCUS(MyChoice::OnFocusGot)
|
EVT_SET_FOCUS(MyChoice::OnFocusGot)
|
||||||
EVT_KILL_FOCUS(MyChoice::OnFocusLost)
|
EVT_KILL_FOCUS(MyChoice::OnFocusLost)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// implementation
|
// implementation
|
||||||
@@ -1809,7 +1809,7 @@ MyPanel::~MyPanel()
|
|||||||
// MyFrame
|
// MyFrame
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(CONTROLS_QUIT, MyFrame::OnQuit)
|
EVT_MENU(CONTROLS_QUIT, MyFrame::OnQuit)
|
||||||
EVT_MENU(CONTROLS_ABOUT, MyFrame::OnAbout)
|
EVT_MENU(CONTROLS_ABOUT, MyFrame::OnAbout)
|
||||||
EVT_MENU(CONTROLS_CLEAR_LOG, MyFrame::OnClearLog)
|
EVT_MENU(CONTROLS_CLEAR_LOG, MyFrame::OnClearLog)
|
||||||
@@ -1832,7 +1832,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MOVE(MyFrame::OnMove)
|
EVT_MOVE(MyFrame::OnMove)
|
||||||
|
|
||||||
EVT_IDLE(MyFrame::OnIdle)
|
EVT_IDLE(MyFrame::OnIdle)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyFrame::MyFrame(const wxChar *title, int x, int y)
|
MyFrame::MyFrame(const wxChar *title, int x, int y)
|
||||||
: wxFrame(NULL, wxID_ANY, title, wxPoint(x, y), wxSize(700, 450))
|
: wxFrame(NULL, wxID_ANY, title, wxPoint(x, y), wxSize(700, 450))
|
||||||
|
@@ -159,7 +159,7 @@ private:
|
|||||||
wxLog *m_logOld;
|
wxLog *m_logOld;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -301,7 +301,7 @@ enum
|
|||||||
ID_ADD_TREE_CONTAINER_ITEM = 403
|
ID_ADD_TREE_CONTAINER_ITEM = 403
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU_RANGE( ID_MULTIPLE, ID_VERT_RULES, MyFrame::OnStyleChange )
|
EVT_MENU_RANGE( ID_MULTIPLE, ID_VERT_RULES, MyFrame::OnStyleChange )
|
||||||
EVT_MENU( ID_EXIT, MyFrame::OnQuit )
|
EVT_MENU( ID_EXIT, MyFrame::OnQuit )
|
||||||
EVT_MENU( ID_ABOUT, MyFrame::OnAbout )
|
EVT_MENU( ID_ABOUT, MyFrame::OnAbout )
|
||||||
@@ -364,7 +364,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
|
|
||||||
EVT_DATAVIEW_COLUMN_HEADER_CLICK(ID_ATTR_CTRL, MyFrame::OnAttrHeaderClick)
|
EVT_DATAVIEW_COLUMN_HEADER_CLICK(ID_ATTR_CTRL, MyFrame::OnAttrHeaderClick)
|
||||||
|
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyFrame::MyFrame(wxFrame *frame, const wxString &title, int x, int y, int w, int h):
|
MyFrame::MyFrame(wxFrame *frame, const wxString &title, int x, int y, int w, int h):
|
||||||
wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h))
|
wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h))
|
||||||
|
@@ -169,7 +169,7 @@ private:
|
|||||||
int m_numLines;
|
int m_numLines;
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(MyFrame);
|
wxDECLARE_NO_COPY_CLASS(MyFrame);
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -216,7 +216,7 @@ IMPLEMENT_APP(MyApp)
|
|||||||
// MyFrame
|
// MyFrame
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(DebugRpt_Quit, MyFrame::OnQuit)
|
EVT_MENU(DebugRpt_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(DebugRpt_Crash, MyFrame::OnReportForCrash)
|
EVT_MENU(DebugRpt_Crash, MyFrame::OnReportForCrash)
|
||||||
EVT_MENU(DebugRpt_Current, MyFrame::OnReportForCurrent)
|
EVT_MENU(DebugRpt_Current, MyFrame::OnReportForCurrent)
|
||||||
@@ -225,7 +225,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MENU(DebugRpt_About, MyFrame::OnAbout)
|
EVT_MENU(DebugRpt_About, MyFrame::OnAbout)
|
||||||
|
|
||||||
EVT_PAINT(MyFrame::OnPaint)
|
EVT_PAINT(MyFrame::OnPaint)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyFrame::MyFrame()
|
MyFrame::MyFrame()
|
||||||
: wxFrame(NULL, wxID_ANY, wxT("wxWidgets Debug Report Sample"),
|
: wxFrame(NULL, wxID_ANY, wxT("wxWidgets Debug Report Sample"),
|
||||||
|
@@ -119,13 +119,13 @@
|
|||||||
|
|
||||||
IMPLEMENT_APP(MyApp)
|
IMPLEMENT_APP(MyApp)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
wxBEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
||||||
EVT_PAINT(MyCanvas::OnPaint)
|
EVT_PAINT(MyCanvas::OnPaint)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
#if wxUSE_MSGDLG
|
#if wxUSE_MSGDLG
|
||||||
EVT_MENU(DIALOGS_MESSAGE_BOX, MyFrame::MessageBox)
|
EVT_MENU(DIALOGS_MESSAGE_BOX, MyFrame::MessageBox)
|
||||||
EVT_MENU(DIALOGS_MESSAGE_BOX_WINDOW_MODAL, MyFrame::MessageBoxWindowModal)
|
EVT_MENU(DIALOGS_MESSAGE_BOX_WINDOW_MODAL, MyFrame::MessageBoxWindowModal)
|
||||||
@@ -264,25 +264,25 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
#endif // wxUSE_RICHTOOLTIP
|
#endif // wxUSE_RICHTOOLTIP
|
||||||
|
|
||||||
EVT_MENU(wxID_EXIT, MyFrame::OnExit)
|
EVT_MENU(wxID_EXIT, MyFrame::OnExit)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
#if USE_MODAL_PRESENTATION
|
#if USE_MODAL_PRESENTATION
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyModalDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(MyModalDialog, wxDialog)
|
||||||
EVT_BUTTON(wxID_ANY, MyModalDialog::OnButton)
|
EVT_BUTTON(wxID_ANY, MyModalDialog::OnButton)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyModelessDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(MyModelessDialog, wxDialog)
|
||||||
EVT_BUTTON(DIALOGS_MODELESS_BTN, MyModelessDialog::OnButton)
|
EVT_BUTTON(DIALOGS_MODELESS_BTN, MyModelessDialog::OnButton)
|
||||||
EVT_CLOSE(MyModelessDialog::OnClose)
|
EVT_CLOSE(MyModelessDialog::OnClose)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
#endif // USE_MODAL_PRESENTATION
|
#endif // USE_MODAL_PRESENTATION
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(StdButtonSizerDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(StdButtonSizerDialog, wxDialog)
|
||||||
EVT_CHECKBOX(wxID_ANY, StdButtonSizerDialog::OnEvent)
|
EVT_CHECKBOX(wxID_ANY, StdButtonSizerDialog::OnEvent)
|
||||||
EVT_RADIOBUTTON(wxID_ANY, StdButtonSizerDialog::OnEvent)
|
EVT_RADIOBUTTON(wxID_ANY, StdButtonSizerDialog::OnEvent)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
#if wxUSE_CMDLINE_PARSER
|
#if wxUSE_CMDLINE_PARSER
|
||||||
|
|
||||||
@@ -1246,11 +1246,11 @@ private:
|
|||||||
wxStaticText *m_labelOrig;
|
wxStaticText *m_labelOrig;
|
||||||
wxTextCtrl *m_text;
|
wxTextCtrl *m_text;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
wxDECLARE_NO_COPY_CLASS(MyRearrangeDialog);
|
wxDECLARE_NO_COPY_CLASS(MyRearrangeDialog);
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyRearrangeDialog, wxRearrangeDialog)
|
wxBEGIN_EVENT_TABLE(MyRearrangeDialog, wxRearrangeDialog)
|
||||||
EVT_LISTBOX(wxID_ANY, MyRearrangeDialog::OnSelChange)
|
EVT_LISTBOX(wxID_ANY, MyRearrangeDialog::OnSelChange)
|
||||||
|
|
||||||
EVT_UPDATE_UI(wxID_APPLY, MyRearrangeDialog::OnUpdateUIRename)
|
EVT_UPDATE_UI(wxID_APPLY, MyRearrangeDialog::OnUpdateUIRename)
|
||||||
@@ -1258,7 +1258,7 @@ BEGIN_EVENT_TABLE(MyRearrangeDialog, wxRearrangeDialog)
|
|||||||
EVT_TEXT_ENTER(wxID_ANY, MyRearrangeDialog::OnRename)
|
EVT_TEXT_ENTER(wxID_ANY, MyRearrangeDialog::OnRename)
|
||||||
EVT_BUTTON(wxID_APPLY, MyRearrangeDialog::OnRename)
|
EVT_BUTTON(wxID_APPLY, MyRearrangeDialog::OnRename)
|
||||||
EVT_BUTTON(wxID_RESET, MyRearrangeDialog::OnReset)
|
EVT_BUTTON(wxID_RESET, MyRearrangeDialog::OnReset)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
void MyFrame::Rearrange(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::Rearrange(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
@@ -2059,13 +2059,13 @@ void MyFrame::OnStandardButtonsSizerDialog(wxCommandEvent& WXUNUSED(event))
|
|||||||
#define ID_DISABLE_OK 102
|
#define ID_DISABLE_OK 102
|
||||||
#define ID_DISABLE_CANCEL 103
|
#define ID_DISABLE_CANCEL 103
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(TestDefaultActionDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(TestDefaultActionDialog, wxDialog)
|
||||||
EVT_CHECKBOX(ID_CATCH_LISTBOX_DCLICK, TestDefaultActionDialog::OnCatchListBoxDClick)
|
EVT_CHECKBOX(ID_CATCH_LISTBOX_DCLICK, TestDefaultActionDialog::OnCatchListBoxDClick)
|
||||||
EVT_CHECKBOX(ID_DISABLE_OK, TestDefaultActionDialog::OnDisableOK)
|
EVT_CHECKBOX(ID_DISABLE_OK, TestDefaultActionDialog::OnDisableOK)
|
||||||
EVT_CHECKBOX(ID_DISABLE_CANCEL, TestDefaultActionDialog::OnDisableCancel)
|
EVT_CHECKBOX(ID_DISABLE_CANCEL, TestDefaultActionDialog::OnDisableCancel)
|
||||||
EVT_LISTBOX_DCLICK(ID_LISTBOX, TestDefaultActionDialog::OnListBoxDClick)
|
EVT_LISTBOX_DCLICK(ID_LISTBOX, TestDefaultActionDialog::OnListBoxDClick)
|
||||||
EVT_TEXT_ENTER(wxID_ANY, TestDefaultActionDialog::OnTextEnter)
|
EVT_TEXT_ENTER(wxID_ANY, TestDefaultActionDialog::OnTextEnter)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
TestDefaultActionDialog::TestDefaultActionDialog( wxWindow *parent ) :
|
TestDefaultActionDialog::TestDefaultActionDialog( wxWindow *parent ) :
|
||||||
wxDialog( parent, -1, "Test default action" )
|
wxDialog( parent, -1, "Test default action" )
|
||||||
@@ -2790,8 +2790,8 @@ void StdButtonSizerDialog::EnableDisableControls()
|
|||||||
|
|
||||||
IMPLEMENT_CLASS(SettingsDialog, wxPropertySheetDialog)
|
IMPLEMENT_CLASS(SettingsDialog, wxPropertySheetDialog)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(SettingsDialog, wxPropertySheetDialog)
|
wxBEGIN_EVENT_TABLE(SettingsDialog, wxPropertySheetDialog)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
SettingsDialog::SettingsDialog(wxWindow* win, int dialogType)
|
SettingsDialog::SettingsDialog(wxWindow* win, int dialogType)
|
||||||
{
|
{
|
||||||
@@ -2985,10 +2985,10 @@ const TestMessageBoxDialog::BtnInfo TestMessageBoxDialog::ms_btnInfo[] =
|
|||||||
{ wxHELP, "&Help" },
|
{ wxHELP, "&Help" },
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(TestMessageBoxDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(TestMessageBoxDialog, wxDialog)
|
||||||
EVT_BUTTON(wxID_APPLY, TestMessageBoxDialog::OnApply)
|
EVT_BUTTON(wxID_APPLY, TestMessageBoxDialog::OnApply)
|
||||||
EVT_BUTTON(wxID_CLOSE, TestMessageBoxDialog::OnClose)
|
EVT_BUTTON(wxID_CLOSE, TestMessageBoxDialog::OnClose)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
TestMessageBoxDialog::TestMessageBoxDialog(wxWindow *parent)
|
TestMessageBoxDialog::TestMessageBoxDialog(wxWindow *parent)
|
||||||
: wxDialog(parent, wxID_ANY, "Message Box Test Dialog",
|
: wxDialog(parent, wxID_ANY, "Message Box Test Dialog",
|
||||||
@@ -3265,9 +3265,9 @@ void TestMessageBoxDialog::OnClose(wxCommandEvent& WXUNUSED(event))
|
|||||||
// TestRichMessageDialog
|
// TestRichMessageDialog
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(TestRichMessageDialog, TestMessageBoxDialog)
|
wxBEGIN_EVENT_TABLE(TestRichMessageDialog, TestMessageBoxDialog)
|
||||||
EVT_BUTTON(wxID_APPLY, TestRichMessageDialog::OnApply)
|
EVT_BUTTON(wxID_APPLY, TestRichMessageDialog::OnApply)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
TestRichMessageDialog::TestRichMessageDialog(wxWindow *parent)
|
TestRichMessageDialog::TestRichMessageDialog(wxWindow *parent)
|
||||||
: TestMessageBoxDialog(parent)
|
: TestMessageBoxDialog(parent)
|
||||||
|
@@ -148,7 +148,7 @@ public:
|
|||||||
void OnClose(wxCloseEvent& event);
|
void OnClose(wxCloseEvent& event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// A custom modal dialog
|
// A custom modal dialog
|
||||||
@@ -164,7 +164,7 @@ private:
|
|||||||
*m_btnModeless,
|
*m_btnModeless,
|
||||||
*m_btnDelete;
|
*m_btnDelete;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // USE_MODAL_PRESENTATION
|
#endif // USE_MODAL_PRESENTATION
|
||||||
@@ -195,7 +195,7 @@ private:
|
|||||||
|
|
||||||
wxSizer *m_buttonsSizer;
|
wxSizer *m_buttonsSizer;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Test harness for wxMessageDialog.
|
// Test harness for wxMessageDialog.
|
||||||
@@ -264,7 +264,7 @@ private:
|
|||||||
wxCheckBox *m_chkNoDefault,
|
wxCheckBox *m_chkNoDefault,
|
||||||
*m_chkCentre;
|
*m_chkCentre;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
wxDECLARE_NO_COPY_CLASS(TestMessageBoxDialog);
|
wxDECLARE_NO_COPY_CLASS(TestMessageBoxDialog);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -286,7 +286,7 @@ private:
|
|||||||
wxCheckBox *m_initialValueCheckBox;
|
wxCheckBox *m_initialValueCheckBox;
|
||||||
wxTextCtrl *m_textDetailed;
|
wxTextCtrl *m_textDetailed;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
#endif // wxUSE_RICHMSGDLG
|
#endif // wxUSE_RICHMSGDLG
|
||||||
|
|
||||||
@@ -305,7 +305,7 @@ private:
|
|||||||
bool m_catchListBoxDClick;
|
bool m_catchListBoxDClick;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -510,7 +510,7 @@ private:
|
|||||||
*m_infoBarAdvanced;
|
*m_infoBarAdvanced;
|
||||||
#endif // wxUSE_INFOBAR
|
#endif // wxUSE_INFOBAR
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyCanvas: public wxScrolledWindow
|
class MyCanvas: public wxScrolledWindow
|
||||||
@@ -526,7 +526,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
void OnPaint(wxPaintEvent& event);
|
void OnPaint(wxPaintEvent& event);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
wxDialUpManager *m_dial;
|
wxDialUpManager *m_dial;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Define a new frame type: this is going to be our main frame
|
// Define a new frame type: this is going to be our main frame
|
||||||
@@ -90,7 +90,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -114,15 +114,15 @@ enum
|
|||||||
// event tables and other macros for wxWidgets
|
// event tables and other macros for wxWidgets
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyApp, wxApp)
|
wxBEGIN_EVENT_TABLE(MyApp, wxApp)
|
||||||
EVT_DIALUP_CONNECTED(MyApp::OnConnected)
|
EVT_DIALUP_CONNECTED(MyApp::OnConnected)
|
||||||
EVT_DIALUP_DISCONNECTED(MyApp::OnConnected)
|
EVT_DIALUP_DISCONNECTED(MyApp::OnConnected)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(NetTest_Quit, MyFrame::OnQuit)
|
EVT_MENU(NetTest_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(NetTest_About, MyFrame::OnAbout)
|
EVT_MENU(NetTest_About, MyFrame::OnAbout)
|
||||||
EVT_MENU(NetTest_HangUp, MyFrame::OnHangUp)
|
EVT_MENU(NetTest_HangUp, MyFrame::OnHangUp)
|
||||||
@@ -133,7 +133,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_UPDATE_UI(NetTest_Dial, MyFrame::OnUpdateUI)
|
EVT_UPDATE_UI(NetTest_Dial, MyFrame::OnUpdateUI)
|
||||||
|
|
||||||
EVT_IDLE(MyFrame::OnIdle)
|
EVT_IDLE(MyFrame::OnIdle)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
|
@@ -89,7 +89,7 @@ private:
|
|||||||
wxBookCtrl *m_book;
|
wxBookCtrl *m_book;
|
||||||
|
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Client data class for the choice control containing the video modes
|
// Client data class for the choice control containing the video modes
|
||||||
@@ -132,7 +132,7 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Display_Quit, MyFrame::OnQuit)
|
EVT_MENU(Display_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(Display_FromPoint, MyFrame::OnFromPoint)
|
EVT_MENU(Display_FromPoint, MyFrame::OnFromPoint)
|
||||||
EVT_MENU(Display_FullScreen, MyFrame::OnFullScreen)
|
EVT_MENU(Display_FullScreen, MyFrame::OnFullScreen)
|
||||||
@@ -146,7 +146,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
#endif // wxUSE_DISPLAY
|
#endif // wxUSE_DISPLAY
|
||||||
|
|
||||||
EVT_LEFT_UP(MyFrame::OnLeftClick)
|
EVT_LEFT_UP(MyFrame::OnLeftClick)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
|
@@ -51,7 +51,7 @@ public:
|
|||||||
|
|
||||||
void OnAbout(wxCommandEvent& event);
|
void OnAbout(wxCommandEvent& event);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -77,9 +77,9 @@ private:
|
|||||||
// MyDllFrame
|
// MyDllFrame
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyDllFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyDllFrame, wxFrame)
|
||||||
EVT_BUTTON(wxID_ABOUT, MyDllFrame::OnAbout)
|
EVT_BUTTON(wxID_ABOUT, MyDllFrame::OnAbout)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyDllFrame::MyDllFrame(wxWindow *parent, const wxString& label)
|
MyDllFrame::MyDllFrame(wxWindow *parent, const wxString& label)
|
||||||
: wxFrame(parent, wxID_ANY, label)
|
: wxFrame(parent, wxID_ANY, label)
|
||||||
|
@@ -51,7 +51,7 @@ public:
|
|||||||
|
|
||||||
void OnRunDLL(wxCommandEvent& event);
|
void OnRunDLL(wxCommandEvent& event);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -71,9 +71,9 @@ public:
|
|||||||
// MainFrame
|
// MainFrame
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MainFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MainFrame, wxFrame)
|
||||||
EVT_BUTTON(ID_RUN_DLL, MainFrame::OnRunDLL)
|
EVT_BUTTON(ID_RUN_DLL, MainFrame::OnRunDLL)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MainFrame::MainFrame()
|
MainFrame::MainFrame()
|
||||||
: wxFrame(NULL, wxID_ANY, "Main wx app",
|
: wxFrame(NULL, wxID_ANY, "Main wx app",
|
||||||
|
@@ -151,7 +151,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
wxBitmap m_bitmap;
|
wxBitmap m_bitmap;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
#if wxUSE_METAFILE
|
#if wxUSE_METAFILE
|
||||||
@@ -187,7 +187,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
wxMetafile m_metafile;
|
wxMetafile m_metafile;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // wxUSE_METAFILE
|
#endif // wxUSE_METAFILE
|
||||||
@@ -271,7 +271,7 @@ private:
|
|||||||
wxString m_strText;
|
wxString m_strText;
|
||||||
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -696,7 +696,7 @@ private:
|
|||||||
*m_textW,
|
*m_textW,
|
||||||
*m_textH;
|
*m_textH;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -735,7 +735,7 @@ private:
|
|||||||
|
|
||||||
static DnDShapeFrame *ms_lastDropTarget;
|
static DnDShapeFrame *ms_lastDropTarget;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -826,7 +826,7 @@ enum
|
|||||||
Button_Colour = 1001
|
Button_Colour = 1001
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(DnDFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(DnDFrame, wxFrame)
|
||||||
EVT_MENU(Menu_Quit, DnDFrame::OnQuit)
|
EVT_MENU(Menu_Quit, DnDFrame::OnQuit)
|
||||||
EVT_MENU(Menu_About, DnDFrame::OnAbout)
|
EVT_MENU(Menu_About, DnDFrame::OnAbout)
|
||||||
EVT_MENU(Menu_Drag, DnDFrame::OnDrag)
|
EVT_MENU(Menu_Drag, DnDFrame::OnDrag)
|
||||||
@@ -857,11 +857,11 @@ BEGIN_EVENT_TABLE(DnDFrame, wxFrame)
|
|||||||
EVT_RIGHT_DOWN( DnDFrame::OnRightDown)
|
EVT_RIGHT_DOWN( DnDFrame::OnRightDown)
|
||||||
EVT_PAINT( DnDFrame::OnPaint)
|
EVT_PAINT( DnDFrame::OnPaint)
|
||||||
EVT_SIZE( DnDFrame::OnSize)
|
EVT_SIZE( DnDFrame::OnSize)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(DnDShapeFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(DnDShapeFrame, wxFrame)
|
||||||
EVT_MENU(Menu_Shape_New, DnDShapeFrame::OnNewShape)
|
EVT_MENU(Menu_Shape_New, DnDShapeFrame::OnNewShape)
|
||||||
EVT_MENU(Menu_Shape_Edit, DnDShapeFrame::OnEditShape)
|
EVT_MENU(Menu_Shape_Edit, DnDShapeFrame::OnEditShape)
|
||||||
EVT_MENU(Menu_Shape_Clear, DnDShapeFrame::OnClearShape)
|
EVT_MENU(Menu_Shape_Clear, DnDShapeFrame::OnClearShape)
|
||||||
@@ -875,22 +875,22 @@ BEGIN_EVENT_TABLE(DnDShapeFrame, wxFrame)
|
|||||||
EVT_LEFT_DOWN(DnDShapeFrame::OnDrag)
|
EVT_LEFT_DOWN(DnDShapeFrame::OnDrag)
|
||||||
|
|
||||||
EVT_PAINT(DnDShapeFrame::OnPaint)
|
EVT_PAINT(DnDShapeFrame::OnPaint)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(DnDShapeDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(DnDShapeDialog, wxDialog)
|
||||||
EVT_BUTTON(Button_Colour, DnDShapeDialog::OnColour)
|
EVT_BUTTON(Button_Colour, DnDShapeDialog::OnColour)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
#endif // wxUSE_DRAG_AND_DROP
|
#endif // wxUSE_DRAG_AND_DROP
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(DnDCanvasBitmap, wxScrolledWindow)
|
wxBEGIN_EVENT_TABLE(DnDCanvasBitmap, wxScrolledWindow)
|
||||||
EVT_PAINT(DnDCanvasBitmap::OnPaint)
|
EVT_PAINT(DnDCanvasBitmap::OnPaint)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
#if wxUSE_METAFILE
|
#if wxUSE_METAFILE
|
||||||
BEGIN_EVENT_TABLE(DnDCanvasMetafile, wxScrolledWindow)
|
wxBEGIN_EVENT_TABLE(DnDCanvasMetafile, wxScrolledWindow)
|
||||||
EVT_PAINT(DnDCanvasMetafile::OnPaint)
|
EVT_PAINT(DnDCanvasMetafile::OnPaint)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
#endif // wxUSE_METAFILE
|
#endif // wxUSE_METAFILE
|
||||||
|
|
||||||
#endif // wxUSE_DRAG_AND_DROP
|
#endif // wxUSE_DRAG_AND_DROP
|
||||||
|
@@ -99,7 +99,7 @@ private:
|
|||||||
|
|
||||||
DoodleSegments m_doodleSegments;
|
DoodleSegments m_doodleSegments;
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS(DrawingDocument)
|
wxDECLARE_DYNAMIC_CLASS(DrawingDocument);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ protected:
|
|||||||
void OnTextChange(wxCommandEvent& event);
|
void OnTextChange(wxCommandEvent& event);
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(wxTextDocument);
|
wxDECLARE_NO_COPY_CLASS(wxTextDocument);
|
||||||
DECLARE_CLASS(wxTextDocument)
|
wxDECLARE_ABSTRACT_CLASS(wxTextDocument);
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -193,7 +193,7 @@ public:
|
|||||||
virtual wxTextCtrl* GetTextCtrl() const wxOVERRIDE;
|
virtual wxTextCtrl* GetTextCtrl() const wxOVERRIDE;
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(TextEditDocument);
|
wxDECLARE_NO_COPY_CLASS(TextEditDocument);
|
||||||
DECLARE_DYNAMIC_CLASS(TextEditDocument)
|
wxDECLARE_DYNAMIC_CLASS(TextEditDocument);
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -219,7 +219,7 @@ private:
|
|||||||
wxImage m_image;
|
wxImage m_image;
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(ImageDocument);
|
wxDECLARE_NO_COPY_CLASS(ImageDocument);
|
||||||
DECLARE_DYNAMIC_CLASS(ImageDocument)
|
wxDECLARE_DYNAMIC_CLASS(ImageDocument);
|
||||||
};
|
};
|
||||||
|
|
||||||
// This is a child document of ImageDocument: this document doesn't
|
// This is a child document of ImageDocument: this document doesn't
|
||||||
|
@@ -72,9 +72,9 @@
|
|||||||
|
|
||||||
IMPLEMENT_APP(MyApp)
|
IMPLEMENT_APP(MyApp)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyApp, wxApp)
|
wxBEGIN_EVENT_TABLE(MyApp, wxApp)
|
||||||
EVT_MENU(wxID_ABOUT, MyApp::OnAbout)
|
EVT_MENU(wxID_ABOUT, MyApp::OnAbout)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyApp::MyApp()
|
MyApp::MyApp()
|
||||||
{
|
{
|
||||||
|
@@ -76,7 +76,7 @@ private:
|
|||||||
MyCanvas *m_canvas;
|
MyCanvas *m_canvas;
|
||||||
wxMenu *m_menuEdit;
|
wxMenu *m_menuEdit;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
wxDECLARE_NO_COPY_CLASS(MyApp);
|
wxDECLARE_NO_COPY_CLASS(MyApp);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -34,9 +34,9 @@
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(DrawingView, wxView)
|
IMPLEMENT_DYNAMIC_CLASS(DrawingView, wxView)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(DrawingView, wxView)
|
wxBEGIN_EVENT_TABLE(DrawingView, wxView)
|
||||||
EVT_MENU(wxID_CUT, DrawingView::OnCut)
|
EVT_MENU(wxID_CUT, DrawingView::OnCut)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// What to do when a view is created. Creates actual
|
// What to do when a view is created. Creates actual
|
||||||
// windows for displaying the view.
|
// windows for displaying the view.
|
||||||
@@ -146,11 +146,11 @@ void DrawingView::OnCut(wxCommandEvent& WXUNUSED(event) )
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(TextEditView, wxView)
|
IMPLEMENT_DYNAMIC_CLASS(TextEditView, wxView)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(TextEditView, wxView)
|
wxBEGIN_EVENT_TABLE(TextEditView, wxView)
|
||||||
EVT_MENU(wxID_COPY, TextEditView::OnCopy)
|
EVT_MENU(wxID_COPY, TextEditView::OnCopy)
|
||||||
EVT_MENU(wxID_PASTE, TextEditView::OnPaste)
|
EVT_MENU(wxID_PASTE, TextEditView::OnPaste)
|
||||||
EVT_MENU(wxID_SELECTALL, TextEditView::OnSelectAll)
|
EVT_MENU(wxID_SELECTALL, TextEditView::OnSelectAll)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
bool TextEditView::OnCreate(wxDocument *doc, long flags)
|
bool TextEditView::OnCreate(wxDocument *doc, long flags)
|
||||||
{
|
{
|
||||||
@@ -198,9 +198,9 @@ bool TextEditView::OnClose(bool deleteWindow)
|
|||||||
// MyCanvas implementation
|
// MyCanvas implementation
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
wxBEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
||||||
EVT_MOUSE_EVENTS(MyCanvas::OnMouseEvent)
|
EVT_MOUSE_EVENTS(MyCanvas::OnMouseEvent)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Define a constructor for my canvas
|
// Define a constructor for my canvas
|
||||||
MyCanvas::MyCanvas(wxView *view, wxWindow *parent)
|
MyCanvas::MyCanvas(wxView *view, wxWindow *parent)
|
||||||
|
@@ -59,7 +59,7 @@ private:
|
|||||||
// the last mouse press position
|
// the last mouse press position
|
||||||
wxPoint m_lastMousePos;
|
wxPoint m_lastMousePos;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// The view using MyCanvas to show its contents
|
// The view using MyCanvas to show its contents
|
||||||
@@ -80,8 +80,8 @@ private:
|
|||||||
|
|
||||||
MyCanvas *m_canvas;
|
MyCanvas *m_canvas;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
DECLARE_DYNAMIC_CLASS(DrawingView)
|
wxDECLARE_DYNAMIC_CLASS(DrawingView);
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -107,8 +107,8 @@ private:
|
|||||||
|
|
||||||
wxTextCtrl *m_text;
|
wxTextCtrl *m_text;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
DECLARE_DYNAMIC_CLASS(TextEditView)
|
wxDECLARE_DYNAMIC_CLASS(TextEditView);
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -144,7 +144,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
ImageCanvas* m_canvas;
|
ImageCanvas* m_canvas;
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS(ImageView)
|
wxDECLARE_DYNAMIC_CLASS(ImageView);
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -48,11 +48,11 @@ IMPLEMENT_APP(MyApp)
|
|||||||
|
|
||||||
IMPLEMENT_CLASS(MyCanvas, wxScrolledWindow)
|
IMPLEMENT_CLASS(MyCanvas, wxScrolledWindow)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
wxBEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
||||||
EVT_PAINT(MyCanvas::OnPaint)
|
EVT_PAINT(MyCanvas::OnPaint)
|
||||||
EVT_ERASE_BACKGROUND(MyCanvas::OnEraseBackground)
|
EVT_ERASE_BACKGROUND(MyCanvas::OnEraseBackground)
|
||||||
EVT_MOUSE_EVENTS(MyCanvas::OnMouseEvent)
|
EVT_MOUSE_EVENTS(MyCanvas::OnMouseEvent)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
|
MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint &pos, const wxSize &size )
|
const wxPoint &pos, const wxSize &size )
|
||||||
@@ -307,10 +307,10 @@ DragShape* MyCanvas::FindShape(const wxPoint& pt) const
|
|||||||
// MyFrame
|
// MyFrame
|
||||||
IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame )
|
IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame )
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame,wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame,wxFrame)
|
||||||
EVT_MENU (wxID_ABOUT, MyFrame::OnAbout)
|
EVT_MENU (wxID_ABOUT, MyFrame::OnAbout)
|
||||||
EVT_MENU (wxID_EXIT, MyFrame::OnQuit)
|
EVT_MENU (wxID_EXIT, MyFrame::OnQuit)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyFrame::MyFrame()
|
MyFrame::MyFrame()
|
||||||
: wxFrame( (wxFrame *)NULL, wxID_ANY, wxT("wxDragImage sample"),
|
: wxFrame( (wxFrame *)NULL, wxID_ANY, wxT("wxDragImage sample"),
|
||||||
@@ -353,9 +353,9 @@ void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) )
|
|||||||
// MyApp
|
// MyApp
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyApp, wxApp)
|
wxBEGIN_EVENT_TABLE(MyApp, wxApp)
|
||||||
EVT_MENU(TEST_USE_SCREEN, MyApp::OnUseScreen)
|
EVT_MENU(TEST_USE_SCREEN, MyApp::OnUseScreen)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyApp::MyApp()
|
MyApp::MyApp()
|
||||||
{
|
{
|
||||||
|
@@ -34,8 +34,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
MyCanvas* m_canvas;
|
MyCanvas* m_canvas;
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS(MyFrame)
|
wxDECLARE_DYNAMIC_CLASS(MyFrame);
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// MyApp
|
// MyApp
|
||||||
@@ -105,8 +105,8 @@ private:
|
|||||||
wxPoint m_dragStartPos;
|
wxPoint m_dragStartPos;
|
||||||
wxDragImage* m_dragImage;
|
wxDragImage* m_dragImage;
|
||||||
|
|
||||||
DECLARE_CLASS(MyCanvas)
|
wxDECLARE_ABSTRACT_CLASS(MyCanvas);
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -129,7 +129,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// define a scrollable canvas for drawing onto
|
// define a scrollable canvas for drawing onto
|
||||||
@@ -195,7 +195,7 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
bool m_useBuffer;
|
bool m_useBuffer;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -394,12 +394,12 @@ void MyApp::DeleteBitmaps()
|
|||||||
|
|
||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them.
|
// handlers) which process them.
|
||||||
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
wxBEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
||||||
EVT_PAINT (MyCanvas::OnPaint)
|
EVT_PAINT (MyCanvas::OnPaint)
|
||||||
EVT_MOTION (MyCanvas::OnMouseMove)
|
EVT_MOTION (MyCanvas::OnMouseMove)
|
||||||
EVT_LEFT_DOWN (MyCanvas::OnMouseDown)
|
EVT_LEFT_DOWN (MyCanvas::OnMouseDown)
|
||||||
EVT_LEFT_UP (MyCanvas::OnMouseUp)
|
EVT_LEFT_UP (MyCanvas::OnMouseUp)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
#include "smile.xpm"
|
#include "smile.xpm"
|
||||||
|
|
||||||
@@ -1741,7 +1741,7 @@ void MyCanvas::OnMouseUp(wxMouseEvent &event)
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU (File_Quit, MyFrame::OnQuit)
|
EVT_MENU (File_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU (File_About, MyFrame::OnAbout)
|
EVT_MENU (File_About, MyFrame::OnAbout)
|
||||||
EVT_MENU (File_Clip, MyFrame::OnClip)
|
EVT_MENU (File_Clip, MyFrame::OnClip)
|
||||||
@@ -1755,7 +1755,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MENU_RANGE(MenuShow_First, MenuShow_Last, MyFrame::OnShow)
|
EVT_MENU_RANGE(MenuShow_First, MenuShow_Last, MyFrame::OnShow)
|
||||||
|
|
||||||
EVT_MENU_RANGE(MenuOption_First, MenuOption_Last, MyFrame::OnOption)
|
EVT_MENU_RANGE(MenuOption_First, MenuOption_Last, MyFrame::OnOption)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// frame constructor
|
// frame constructor
|
||||||
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||||
|
@@ -108,7 +108,7 @@ private:
|
|||||||
bool m_eraseBgInPaint;
|
bool m_eraseBgInPaint;
|
||||||
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyFrame : public wxFrame
|
class MyFrame : public wxFrame
|
||||||
@@ -137,7 +137,7 @@ private:
|
|||||||
|
|
||||||
MyCanvas *m_canvas;
|
MyCanvas *m_canvas;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class ControlWithTransparency : public wxWindow
|
class ControlWithTransparency : public wxWindow
|
||||||
@@ -233,7 +233,7 @@ bool MyApp::OnInit()
|
|||||||
// main frame
|
// main frame
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Erase_Menu_UseBuffer, MyFrame::OnUseBuffer)
|
EVT_MENU(Erase_Menu_UseBuffer, MyFrame::OnUseBuffer)
|
||||||
EVT_MENU(Erase_Menu_UseBgBitmap, MyFrame::OnUseBgBitmap)
|
EVT_MENU(Erase_Menu_UseBgBitmap, MyFrame::OnUseBgBitmap)
|
||||||
EVT_MENU(Erase_Menu_EraseBgInPaint, MyFrame::OnEraseBgInPaint)
|
EVT_MENU(Erase_Menu_EraseBgInPaint, MyFrame::OnEraseBgInPaint)
|
||||||
@@ -246,7 +246,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_UPDATE_UI(Erase_Menu_UseBuffer, MyFrame::OnUpdateUIUseBuffer)
|
EVT_UPDATE_UI(Erase_Menu_UseBuffer, MyFrame::OnUpdateUIUseBuffer)
|
||||||
EVT_UPDATE_UI_RANGE(Erase_Menu_BgStyleErase, Erase_Menu_BgStylePaint,
|
EVT_UPDATE_UI_RANGE(Erase_Menu_BgStyleErase, Erase_Menu_BgStylePaint,
|
||||||
MyFrame::OnUpdateUIChangeBgStyle)
|
MyFrame::OnUpdateUIChangeBgStyle)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// frame constructor
|
// frame constructor
|
||||||
MyFrame::MyFrame()
|
MyFrame::MyFrame()
|
||||||
@@ -329,10 +329,10 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
wxBEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
||||||
EVT_PAINT(MyCanvas::OnPaint)
|
EVT_PAINT(MyCanvas::OnPaint)
|
||||||
EVT_ERASE_BACKGROUND(MyCanvas::OnEraseBackground)
|
EVT_ERASE_BACKGROUND(MyCanvas::OnEraseBackground)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyCanvas::MyCanvas(wxFrame *parent)
|
MyCanvas::MyCanvas(wxFrame *parent)
|
||||||
{
|
{
|
||||||
|
@@ -78,7 +78,7 @@ public:
|
|||||||
virtual int FilterEvent(wxEvent& event) wxOVERRIDE;
|
virtual int FilterEvent(wxEvent& event) wxOVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Define a custom button used to highlight the events handling order
|
// Define a custom button used to highlight the events handling order
|
||||||
@@ -112,7 +112,7 @@ private:
|
|||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
long MyEvtTestButton::BUTTON_ID = wxNewId();
|
long MyEvtTestButton::BUTTON_ID = wxNewId();
|
||||||
@@ -182,7 +182,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Define a custom event handler
|
// Define a custom event handler
|
||||||
@@ -203,7 +203,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
unsigned m_level;
|
unsigned m_level;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -231,19 +231,19 @@ enum
|
|||||||
|
|
||||||
// The event tables connect the wxWidgets events with the functions (event
|
// The event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them.
|
// handlers) which process them.
|
||||||
BEGIN_EVENT_TABLE(MyApp, wxApp)
|
wxBEGIN_EVENT_TABLE(MyApp, wxApp)
|
||||||
// Add a static handler for button Click event in the app
|
// Add a static handler for button Click event in the app
|
||||||
EVT_BUTTON(MyEvtTestButton::BUTTON_ID, MyApp::OnClickStaticHandlerApp)
|
EVT_BUTTON(MyEvtTestButton::BUTTON_ID, MyApp::OnClickStaticHandlerApp)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyEvtTestButton, wxButton)
|
wxBEGIN_EVENT_TABLE(MyEvtTestButton, wxButton)
|
||||||
// Add a static handler to this button itself for its own event
|
// Add a static handler to this button itself for its own event
|
||||||
EVT_BUTTON(BUTTON_ID, MyEvtTestButton::OnClickStaticHandler)
|
EVT_BUTTON(BUTTON_ID, MyEvtTestButton::OnClickStaticHandler)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// This can be also done at run-time, but for the
|
// This can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Event_Quit, MyFrame::OnQuit)
|
EVT_MENU(Event_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(Event_About, MyFrame::OnAbout)
|
EVT_MENU(Event_About, MyFrame::OnAbout)
|
||||||
|
|
||||||
@@ -267,11 +267,11 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
|
|
||||||
// Add a static handler in the parent frame for button event
|
// Add a static handler in the parent frame for button event
|
||||||
EVT_BUTTON(MyEvtTestButton::BUTTON_ID, MyFrame::OnClickStaticHandlerFrame)
|
EVT_BUTTON(MyEvtTestButton::BUTTON_ID, MyFrame::OnClickStaticHandlerFrame)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyEvtHandler, wxEvtHandler)
|
wxBEGIN_EVENT_TABLE(MyEvtHandler, wxEvtHandler)
|
||||||
EVT_MENU(Event_Test, MyEvtHandler::OnTest)
|
EVT_MENU(Event_Test, MyEvtHandler::OnTest)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
|
@@ -140,7 +140,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// A simple dialog which has only some buttons to throw exceptions
|
// A simple dialog which has only some buttons to throw exceptions
|
||||||
@@ -155,7 +155,7 @@ public:
|
|||||||
void OnCrash(wxCommandEvent& event);
|
void OnCrash(wxCommandEvent& event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// A trivial exception class
|
// A trivial exception class
|
||||||
@@ -209,7 +209,7 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Except_Quit, MyFrame::OnQuit)
|
EVT_MENU(Except_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(Except_About, MyFrame::OnAbout)
|
EVT_MENU(Except_About, MyFrame::OnAbout)
|
||||||
EVT_MENU(Except_Dialog, MyFrame::OnDialog)
|
EVT_MENU(Except_Dialog, MyFrame::OnDialog)
|
||||||
@@ -226,13 +226,13 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
#if wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
EVT_MENU(Except_ShowAssertInThread, MyFrame::OnShowAssertInThread)
|
EVT_MENU(Except_ShowAssertInThread, MyFrame::OnShowAssertInThread)
|
||||||
#endif // wxUSE_THREADS
|
#endif // wxUSE_THREADS
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(MyDialog, wxDialog)
|
||||||
EVT_BUTTON(Except_ThrowInt, MyDialog::OnThrowInt)
|
EVT_BUTTON(Except_ThrowInt, MyDialog::OnThrowInt)
|
||||||
EVT_BUTTON(Except_ThrowObject, MyDialog::OnThrowObject)
|
EVT_BUTTON(Except_ThrowObject, MyDialog::OnThrowObject)
|
||||||
EVT_BUTTON(Except_Crash, MyDialog::OnCrash)
|
EVT_BUTTON(Except_Crash, MyDialog::OnCrash)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
|
@@ -189,7 +189,7 @@ private:
|
|||||||
wxTimer m_timerBg;
|
wxTimer m_timerBg;
|
||||||
|
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -243,7 +243,7 @@ private:
|
|||||||
*m_textIn,
|
*m_textIn,
|
||||||
*m_textErr;
|
*m_textErr;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -351,7 +351,7 @@ static const wxChar *DIALOG_TITLE = wxT("Exec sample");
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Exec_Quit, MyFrame::OnQuit)
|
EVT_MENU(Exec_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(Exec_Kill, MyFrame::OnKill)
|
EVT_MENU(Exec_Kill, MyFrame::OnKill)
|
||||||
EVT_MENU(Exec_ClearLog, MyFrame::OnClear)
|
EVT_MENU(Exec_ClearLog, MyFrame::OnClear)
|
||||||
@@ -382,9 +382,9 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
|
|
||||||
EVT_TIMER(Exec_TimerIdle, MyFrame::OnIdleTimer)
|
EVT_TIMER(Exec_TimerIdle, MyFrame::OnIdleTimer)
|
||||||
EVT_TIMER(Exec_TimerBg, MyFrame::OnBgTimer)
|
EVT_TIMER(Exec_TimerBg, MyFrame::OnBgTimer)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyPipeFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyPipeFrame, wxFrame)
|
||||||
EVT_BUTTON(Exec_Btn_Send, MyPipeFrame::OnBtnSend)
|
EVT_BUTTON(Exec_Btn_Send, MyPipeFrame::OnBtnSend)
|
||||||
EVT_BUTTON(Exec_Btn_SendFile, MyPipeFrame::OnBtnSendFile)
|
EVT_BUTTON(Exec_Btn_SendFile, MyPipeFrame::OnBtnSendFile)
|
||||||
EVT_BUTTON(Exec_Btn_Get, MyPipeFrame::OnBtnGet)
|
EVT_BUTTON(Exec_Btn_Get, MyPipeFrame::OnBtnGet)
|
||||||
@@ -395,7 +395,7 @@ BEGIN_EVENT_TABLE(MyPipeFrame, wxFrame)
|
|||||||
EVT_CLOSE(MyPipeFrame::OnClose)
|
EVT_CLOSE(MyPipeFrame::OnClose)
|
||||||
|
|
||||||
EVT_END_PROCESS(wxID_ANY, MyPipeFrame::OnProcessTerm)
|
EVT_END_PROCESS(wxID_ANY, MyPipeFrame::OnProcessTerm)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
@@ -732,13 +732,13 @@ private:
|
|||||||
wxCheckBox* m_useCWD;
|
wxCheckBox* m_useCWD;
|
||||||
wxCheckBox* m_useEnv;
|
wxCheckBox* m_useEnv;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(ExecQueryDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(ExecQueryDialog, wxDialog)
|
||||||
EVT_UPDATE_UI(TEXT_CWD, ExecQueryDialog::OnUpdateWorkingDirectoryUI)
|
EVT_UPDATE_UI(TEXT_CWD, ExecQueryDialog::OnUpdateWorkingDirectoryUI)
|
||||||
EVT_UPDATE_UI(TEXT_ENVIRONMENT, ExecQueryDialog::OnUpdateEnvironmentUI)
|
EVT_UPDATE_UI(TEXT_ENVIRONMENT, ExecQueryDialog::OnUpdateEnvironmentUI)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
ExecQueryDialog::ExecQueryDialog(const wxString& cmd)
|
ExecQueryDialog::ExecQueryDialog(const wxString& cmd)
|
||||||
: wxDialog(NULL, wxID_ANY, DIALOG_TITLE,
|
: wxDialog(NULL, wxID_ANY, DIALOG_TITLE,
|
||||||
|
@@ -185,7 +185,7 @@ private:
|
|||||||
*m_funcname,
|
*m_funcname,
|
||||||
*m_funcarg;
|
*m_funcarg;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
wxDECLARE_NO_COPY_CLASS(FlashFrame);
|
wxDECLARE_NO_COPY_CLASS(FlashFrame);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ private:
|
|||||||
// event tables and other macros for wxWidgets
|
// event tables and other macros for wxWidgets
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(FlashFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(FlashFrame, wxFrame)
|
||||||
EVT_MENU(wxID_OPEN, FlashFrame::OnOpen)
|
EVT_MENU(wxID_OPEN, FlashFrame::OnOpen)
|
||||||
EVT_MENU(wxID_EXIT, FlashFrame::OnQuit)
|
EVT_MENU(wxID_EXIT, FlashFrame::OnQuit)
|
||||||
EVT_MENU(wxID_ABOUT, FlashFrame::OnAbout)
|
EVT_MENU(wxID_ABOUT, FlashFrame::OnAbout)
|
||||||
@@ -210,7 +210,7 @@ BEGIN_EVENT_TABLE(FlashFrame, wxFrame)
|
|||||||
EVT_BUTTON(Flash_CallWithArg, FlashFrame::OnCallWithArg)
|
EVT_BUTTON(Flash_CallWithArg, FlashFrame::OnCallWithArg)
|
||||||
|
|
||||||
EVT_ACTIVEX(wxID_ANY, FlashFrame::OnActiveXEvent)
|
EVT_ACTIVEX(wxID_ANY, FlashFrame::OnActiveXEvent)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
IMPLEMENT_APP(FlashApp)
|
IMPLEMENT_APP(FlashApp)
|
||||||
|
|
||||||
|
@@ -79,7 +79,7 @@ private:
|
|||||||
wxColour m_colour;
|
wxColour m_colour;
|
||||||
wxFont m_font;
|
wxFont m_font;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Define a new frame type: this is going to be our main frame
|
// Define a new frame type: this is going to be our main frame
|
||||||
@@ -153,7 +153,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -220,7 +220,7 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Font_Quit, MyFrame::OnQuit)
|
EVT_MENU(Font_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(Font_TestTextValue, MyFrame::OnTestTextValue)
|
EVT_MENU(Font_TestTextValue, MyFrame::OnTestTextValue)
|
||||||
EVT_MENU(Font_ViewMsg, MyFrame::OnViewMsg)
|
EVT_MENU(Font_ViewMsg, MyFrame::OnViewMsg)
|
||||||
@@ -262,7 +262,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MENU(Font_EnumFamilies, MyFrame::OnEnumerateFamilies)
|
EVT_MENU(Font_EnumFamilies, MyFrame::OnEnumerateFamilies)
|
||||||
EVT_MENU(Font_EnumFixedFamilies, MyFrame::OnEnumerateFixedFamilies)
|
EVT_MENU(Font_EnumFixedFamilies, MyFrame::OnEnumerateFixedFamilies)
|
||||||
EVT_MENU(Font_EnumEncodings, MyFrame::OnEnumerateEncodings)
|
EVT_MENU(Font_EnumEncodings, MyFrame::OnEnumerateEncodings)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
@@ -1007,9 +1007,9 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
|||||||
// MyCanvas
|
// MyCanvas
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyCanvas, wxWindow)
|
wxBEGIN_EVENT_TABLE(MyCanvas, wxWindow)
|
||||||
EVT_PAINT(MyCanvas::OnPaint)
|
EVT_PAINT(MyCanvas::OnPaint)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyCanvas::MyCanvas( wxWindow *parent )
|
MyCanvas::MyCanvas( wxWindow *parent )
|
||||||
: wxWindow( parent, wxID_ANY ),
|
: wxWindow( parent, wxID_ANY ),
|
||||||
|
@@ -147,7 +147,7 @@ bool GridApp::OnInit()
|
|||||||
// GridFrame
|
// GridFrame
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE( GridFrame, wxFrame )
|
wxBEGIN_EVENT_TABLE( GridFrame, wxFrame )
|
||||||
EVT_MENU( ID_TOGGLEROWLABELS, GridFrame::ToggleRowLabels )
|
EVT_MENU( ID_TOGGLEROWLABELS, GridFrame::ToggleRowLabels )
|
||||||
EVT_MENU( ID_TOGGLECOLLABELS, GridFrame::ToggleColLabels )
|
EVT_MENU( ID_TOGGLECOLLABELS, GridFrame::ToggleColLabels )
|
||||||
EVT_MENU( ID_TOGGLEEDIT, GridFrame::ToggleEditing )
|
EVT_MENU( ID_TOGGLEEDIT, GridFrame::ToggleEditing )
|
||||||
@@ -234,7 +234,7 @@ BEGIN_EVENT_TABLE( GridFrame, wxFrame )
|
|||||||
|
|
||||||
EVT_GRID_EDITOR_SHOWN( GridFrame::OnEditorShown )
|
EVT_GRID_EDITOR_SHOWN( GridFrame::OnEditorShown )
|
||||||
EVT_GRID_EDITOR_HIDDEN( GridFrame::OnEditorHidden )
|
EVT_GRID_EDITOR_HIDDEN( GridFrame::OnEditorHidden )
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
GridFrame::GridFrame()
|
GridFrame::GridFrame()
|
||||||
@@ -2068,10 +2068,10 @@ private:
|
|||||||
bool m_shouldUpdateOrder;
|
bool m_shouldUpdateOrder;
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(TabularGridFrame);
|
wxDECLARE_NO_COPY_CLASS(TabularGridFrame);
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(TabularGridFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(TabularGridFrame, wxFrame)
|
||||||
EVT_CHECKBOX(Id_Check_UseNativeHeader,
|
EVT_CHECKBOX(Id_Check_UseNativeHeader,
|
||||||
TabularGridFrame::OnToggleUseNativeHeader)
|
TabularGridFrame::OnToggleUseNativeHeader)
|
||||||
EVT_CHECKBOX(Id_Check_DrawNativeLabels,
|
EVT_CHECKBOX(Id_Check_DrawNativeLabels,
|
||||||
@@ -2094,7 +2094,7 @@ BEGIN_EVENT_TABLE(TabularGridFrame, wxFrame)
|
|||||||
EVT_GRID_COL_SIZE(TabularGridFrame::OnGridColSize)
|
EVT_GRID_COL_SIZE(TabularGridFrame::OnGridColSize)
|
||||||
|
|
||||||
EVT_IDLE(TabularGridFrame::OnIdle)
|
EVT_IDLE(TabularGridFrame::OnIdle)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
TabularGridFrame::TabularGridFrame()
|
TabularGridFrame::TabularGridFrame()
|
||||||
: wxFrame(NULL, wxID_ANY, "Tabular table")
|
: wxFrame(NULL, wxID_ANY, "Tabular table")
|
||||||
|
@@ -217,7 +217,7 @@ public:
|
|||||||
|
|
||||||
wxBitmap m_gridBitmap;
|
wxBitmap m_gridBitmap;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyGridCellRenderer : public wxGridCellStringRenderer
|
class MyGridCellRenderer : public wxGridCellStringRenderer
|
||||||
|
@@ -162,7 +162,7 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// A custom modal dialog
|
// A custom modal dialog
|
||||||
@@ -173,7 +173,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -232,7 +232,7 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(HelpDemo_Quit, MyFrame::OnQuit)
|
EVT_MENU(HelpDemo_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(HelpDemo_Help_Index, MyFrame::OnHelp)
|
EVT_MENU(HelpDemo_Help_Index, MyFrame::OnHelp)
|
||||||
EVT_MENU(HelpDemo_Help_Classes, MyFrame::OnHelp)
|
EVT_MENU(HelpDemo_Help_Classes, MyFrame::OnHelp)
|
||||||
@@ -266,7 +266,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MENU(HelpDemo_Help_KDE, MyFrame::OnHelp)
|
EVT_MENU(HelpDemo_Help_KDE, MyFrame::OnHelp)
|
||||||
EVT_MENU(HelpDemo_Help_GNOME, MyFrame::OnHelp)
|
EVT_MENU(HelpDemo_Help_GNOME, MyFrame::OnHelp)
|
||||||
EVT_MENU(HelpDemo_Help_Netscape, MyFrame::OnHelp)
|
EVT_MENU(HelpDemo_Help_Netscape, MyFrame::OnHelp)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
@@ -674,8 +674,8 @@ void MyFrame::ShowHelp(int commandId, wxHelpControllerBase& helpController)
|
|||||||
// Demonstrates context-sensitive help
|
// Demonstrates context-sensitive help
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyModalDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(MyModalDialog, wxDialog)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyModalDialog::MyModalDialog(wxWindow *parent)
|
MyModalDialog::MyModalDialog(wxWindow *parent)
|
||||||
: wxDialog(parent, wxID_ANY, wxString(wxT("Modal dialog")))
|
: wxDialog(parent, wxID_ANY, wxString(wxT("Modal dialog")))
|
||||||
|
@@ -95,7 +95,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(MyHtmlListBox);
|
wxDECLARE_NO_COPY_CLASS(MyHtmlListBox);
|
||||||
DECLARE_DYNAMIC_CLASS(MyHtmlListBox)
|
wxDECLARE_DYNAMIC_CLASS(MyHtmlListBox);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ private:
|
|||||||
wxHtmlListBox *m_hlbox;
|
wxHtmlListBox *m_hlbox;
|
||||||
|
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyApp : public wxApp
|
class MyApp : public wxApp
|
||||||
@@ -190,7 +190,7 @@ enum
|
|||||||
// event tables and other macros for wxWidgets
|
// event tables and other macros for wxWidgets
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(HtmlLbox_CustomBox, MyFrame::OnSimpleOrCustomBox)
|
EVT_MENU(HtmlLbox_CustomBox, MyFrame::OnSimpleOrCustomBox)
|
||||||
EVT_MENU(HtmlLbox_SimpleBox, MyFrame::OnSimpleOrCustomBox)
|
EVT_MENU(HtmlLbox_SimpleBox, MyFrame::OnSimpleOrCustomBox)
|
||||||
EVT_MENU(HtmlLbox_Quit, MyFrame::OnQuit)
|
EVT_MENU(HtmlLbox_Quit, MyFrame::OnQuit)
|
||||||
@@ -222,7 +222,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_HTML_CELL_HOVER(wxID_ANY, MyFrame::OnHtmlCellHover)
|
EVT_HTML_CELL_HOVER(wxID_ANY, MyFrame::OnHtmlCellHover)
|
||||||
EVT_HTML_CELL_CLICKED(wxID_ANY, MyFrame::OnHtmlCellClicked)
|
EVT_HTML_CELL_CLICKED(wxID_ANY, MyFrame::OnHtmlCellClicked)
|
||||||
|
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
IMPLEMENT_APP(MyApp)
|
IMPLEMENT_APP(MyApp)
|
||||||
|
|
||||||
|
@@ -62,7 +62,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -72,10 +72,10 @@ private:
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
|
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
|
||||||
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
|
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
|
@@ -67,7 +67,7 @@ private:
|
|||||||
wxHtmlHelpController help;
|
wxHtmlHelpController help;
|
||||||
|
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -89,11 +89,11 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(Minimal_Help, MyFrame::OnHelp)
|
EVT_MENU(Minimal_Help, MyFrame::OnHelp)
|
||||||
EVT_CLOSE(MyFrame::OnClose)
|
EVT_CLOSE(MyFrame::OnClose)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
|
@@ -87,7 +87,7 @@ public:
|
|||||||
wxTextCtrl* urlText;
|
wxTextCtrl* urlText;
|
||||||
private:
|
private:
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -97,7 +97,7 @@ private:
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_BUTTON(ID_BACK, MyFrame::OnBackButton)
|
EVT_BUTTON(ID_BACK, MyFrame::OnBackButton)
|
||||||
EVT_BUTTON(ID_NEXT, MyFrame::OnNextButton)
|
EVT_BUTTON(ID_NEXT, MyFrame::OnNextButton)
|
||||||
EVT_BUTTON(ID_STOP, MyFrame::OnStopButton)
|
EVT_BUTTON(ID_STOP, MyFrame::OnStopButton)
|
||||||
@@ -108,7 +108,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_WEBKIT_STATE_CHANGED(MyFrame::OnStateChanged)
|
EVT_WEBKIT_STATE_CHANGED(MyFrame::OnStateChanged)
|
||||||
//EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
//EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
||||||
//EVT_MENU(Minimal_About, MyFrame::OnAbout)
|
//EVT_MENU(Minimal_About, MyFrame::OnAbout)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
|
@@ -76,7 +76,7 @@ private:
|
|||||||
wxString m_Name;
|
wxString m_Name;
|
||||||
|
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -105,7 +105,7 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
|
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
|
||||||
EVT_MENU(Minimal_Print, MyFrame::OnPrint)
|
EVT_MENU(Minimal_Print, MyFrame::OnPrint)
|
||||||
@@ -115,7 +115,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MENU(Minimal_PrintSmall, MyFrame::OnPrintSmall)
|
EVT_MENU(Minimal_PrintSmall, MyFrame::OnPrintSmall)
|
||||||
EVT_MENU(Minimal_PrintNormal, MyFrame::OnPrintNormal)
|
EVT_MENU(Minimal_PrintNormal, MyFrame::OnPrintNormal)
|
||||||
EVT_MENU(Minimal_PrintHuge, MyFrame::OnPrintHuge)
|
EVT_MENU(Minimal_PrintHuge, MyFrame::OnPrintHuge)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
|
@@ -73,7 +73,7 @@ private:
|
|||||||
|
|
||||||
bool m_drawCustomBg;
|
bool m_drawCustomBg;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
wxDECLARE_NO_COPY_CLASS(MyHtmlWindow);
|
wxDECLARE_NO_COPY_CLASS(MyHtmlWindow);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ private:
|
|||||||
wxHtmlProcessor *m_Processor;
|
wxHtmlProcessor *m_Processor;
|
||||||
|
|
||||||
// Any class wishing to process wxWidgets events must use this macro
|
// Any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ enum
|
|||||||
// event tables and other macros for wxWidgets
|
// event tables and other macros for wxWidgets
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
|
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
|
||||||
EVT_MENU(ID_PageOpen, MyFrame::OnPageOpen)
|
EVT_MENU(ID_PageOpen, MyFrame::OnPageOpen)
|
||||||
EVT_MENU(ID_DefaultLocalBrowser, MyFrame::OnDefaultLocalBrowser)
|
EVT_MENU(ID_DefaultLocalBrowser, MyFrame::OnDefaultLocalBrowser)
|
||||||
@@ -156,7 +156,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_HTML_LINK_CLICKED(wxID_ANY, MyFrame::OnHtmlLinkClicked)
|
EVT_HTML_LINK_CLICKED(wxID_ANY, MyFrame::OnHtmlLinkClicked)
|
||||||
EVT_HTML_CELL_HOVER(wxID_ANY, MyFrame::OnHtmlCellHover)
|
EVT_HTML_CELL_HOVER(wxID_ANY, MyFrame::OnHtmlCellHover)
|
||||||
EVT_HTML_CELL_CLICKED(wxID_ANY, MyFrame::OnHtmlCellClicked)
|
EVT_HTML_CELL_CLICKED(wxID_ANY, MyFrame::OnHtmlCellClicked)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
IMPLEMENT_APP(MyApp)
|
IMPLEMENT_APP(MyApp)
|
||||||
|
|
||||||
@@ -377,12 +377,12 @@ wxHtmlOpeningStatus MyHtmlWindow::OnOpeningURL(wxHtmlURLType WXUNUSED(type),
|
|||||||
return wxHTML_OPEN;
|
return wxHTML_OPEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyHtmlWindow, wxHtmlWindow)
|
wxBEGIN_EVENT_TABLE(MyHtmlWindow, wxHtmlWindow)
|
||||||
#if wxUSE_CLIPBOARD
|
#if wxUSE_CLIPBOARD
|
||||||
EVT_TEXT_COPY(wxID_ANY, MyHtmlWindow::OnClipboardEvent)
|
EVT_TEXT_COPY(wxID_ANY, MyHtmlWindow::OnClipboardEvent)
|
||||||
#endif // wxUSE_CLIPBOARD
|
#endif // wxUSE_CLIPBOARD
|
||||||
EVT_ERASE_BACKGROUND(MyHtmlWindow::OnEraseBgEvent)
|
EVT_ERASE_BACKGROUND(MyHtmlWindow::OnEraseBgEvent)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
#if wxUSE_CLIPBOARD
|
#if wxUSE_CLIPBOARD
|
||||||
void MyHtmlWindow::OnClipboardEvent(wxClipboardTextEvent& WXUNUSED(event))
|
void MyHtmlWindow::OnClipboardEvent(wxClipboardTextEvent& WXUNUSED(event))
|
||||||
|
@@ -111,7 +111,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -137,11 +137,11 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(Minimal_Back, MyFrame::OnBack)
|
EVT_MENU(Minimal_Back, MyFrame::OnBack)
|
||||||
EVT_MENU(Minimal_Forward, MyFrame::OnForward)
|
EVT_MENU(Minimal_Forward, MyFrame::OnForward)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
|
@@ -104,7 +104,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -130,11 +130,11 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(Minimal_Back, MyFrame::OnBack)
|
EVT_MENU(Minimal_Back, MyFrame::OnBack)
|
||||||
EVT_MENU(Minimal_Forward, MyFrame::OnForward)
|
EVT_MENU(Minimal_Forward, MyFrame::OnForward)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
|
@@ -60,7 +60,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -83,11 +83,11 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(Minimal_Back, MyFrame::OnBack)
|
EVT_MENU(Minimal_Back, MyFrame::OnBack)
|
||||||
EVT_MENU(Minimal_Forward, MyFrame::OnForward)
|
EVT_MENU(Minimal_Forward, MyFrame::OnForward)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
|
@@ -43,9 +43,9 @@
|
|||||||
// MyCanvas
|
// MyCanvas
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
wxBEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
||||||
EVT_PAINT(MyCanvas::OnPaint)
|
EVT_PAINT(MyCanvas::OnPaint)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
|
MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint &pos, const wxSize &size )
|
const wxPoint &pos, const wxSize &size )
|
||||||
|
@@ -68,5 +68,5 @@ private:
|
|||||||
wxBitmap m_bmpSmileXpm;
|
wxBitmap m_bmpSmileXpm;
|
||||||
wxIcon m_iconSmileXpm;
|
wxIcon m_iconSmileXpm;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
@@ -104,8 +104,8 @@ private:
|
|||||||
static wxString LoadUserImage(wxImage& image);
|
static wxString LoadUserImage(wxImage& image);
|
||||||
|
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS(MyFrame)
|
wxDECLARE_DYNAMIC_CLASS(MyFrame);
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -437,7 +437,7 @@ private:
|
|||||||
wxBitmap m_bitmap;
|
wxBitmap m_bitmap;
|
||||||
double m_zoom;
|
double m_zoom;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef wxHAVE_RAW_BITMAP
|
#ifdef wxHAVE_RAW_BITMAP
|
||||||
@@ -574,7 +574,7 @@ private:
|
|||||||
wxBitmap m_bitmap;
|
wxBitmap m_bitmap;
|
||||||
wxBitmap m_alphaBitmap;
|
wxBitmap m_alphaBitmap;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // wxHAVE_RAW_BITMAP
|
#endif // wxHAVE_RAW_BITMAP
|
||||||
@@ -588,7 +588,7 @@ private:
|
|||||||
// MyImageFrame
|
// MyImageFrame
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyImageFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyImageFrame, wxFrame)
|
||||||
EVT_ERASE_BACKGROUND(MyImageFrame::OnEraseBackground)
|
EVT_ERASE_BACKGROUND(MyImageFrame::OnEraseBackground)
|
||||||
EVT_PAINT(MyImageFrame::OnPaint)
|
EVT_PAINT(MyImageFrame::OnPaint)
|
||||||
|
|
||||||
@@ -599,7 +599,7 @@ BEGIN_EVENT_TABLE(MyImageFrame, wxFrame)
|
|||||||
EVT_MENU(wxID_ZOOM_IN, MyImageFrame::OnZoom)
|
EVT_MENU(wxID_ZOOM_IN, MyImageFrame::OnZoom)
|
||||||
EVT_MENU(wxID_ZOOM_OUT, MyImageFrame::OnZoom)
|
EVT_MENU(wxID_ZOOM_OUT, MyImageFrame::OnZoom)
|
||||||
EVT_MENU(wxID_ZOOM_100, MyImageFrame::OnZoom)
|
EVT_MENU(wxID_ZOOM_100, MyImageFrame::OnZoom)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// MyRawBitmapFrame
|
// MyRawBitmapFrame
|
||||||
@@ -607,9 +607,9 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
#ifdef wxHAVE_RAW_BITMAP
|
#ifdef wxHAVE_RAW_BITMAP
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyRawBitmapFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyRawBitmapFrame, wxFrame)
|
||||||
EVT_PAINT(MyRawBitmapFrame::OnPaint)
|
EVT_PAINT(MyRawBitmapFrame::OnPaint)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
#endif // wxHAVE_RAW_BITMAP
|
#endif // wxHAVE_RAW_BITMAP
|
||||||
|
|
||||||
@@ -629,7 +629,7 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame )
|
IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame )
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU (ID_ABOUT, MyFrame::OnAbout)
|
EVT_MENU (ID_ABOUT, MyFrame::OnAbout)
|
||||||
EVT_MENU (ID_QUIT, MyFrame::OnQuit)
|
EVT_MENU (ID_QUIT, MyFrame::OnQuit)
|
||||||
EVT_MENU (ID_NEW, MyFrame::OnNewFrame)
|
EVT_MENU (ID_NEW, MyFrame::OnNewFrame)
|
||||||
@@ -645,7 +645,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MENU(wxID_COPY, MyFrame::OnCopy)
|
EVT_MENU(wxID_COPY, MyFrame::OnCopy)
|
||||||
EVT_MENU(wxID_PASTE, MyFrame::OnPaste)
|
EVT_MENU(wxID_PASTE, MyFrame::OnPaste)
|
||||||
#endif // wxUSE_CLIPBOARD
|
#endif // wxUSE_CLIPBOARD
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyFrame::MyFrame()
|
MyFrame::MyFrame()
|
||||||
: wxFrame( (wxFrame *)NULL, wxID_ANY, wxT("wxImage sample"),
|
: wxFrame( (wxFrame *)NULL, wxID_ANY, wxT("wxImage sample"),
|
||||||
|
@@ -77,7 +77,7 @@ public:
|
|||||||
void OnTest3(wxCommandEvent& event);
|
void OnTest3(wxCommandEvent& event);
|
||||||
void OnTestMsgBox(wxCommandEvent& event);
|
void OnTestMsgBox(wxCommandEvent& event);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
|
|
||||||
wxLocale& m_locale;
|
wxLocale& m_locale;
|
||||||
};
|
};
|
||||||
@@ -154,7 +154,7 @@ wxCOMPILE_TIME_ASSERT( WXSIZEOF(langNames) == WXSIZEOF(langIds),
|
|||||||
// wxWidgets macros
|
// wxWidgets macros
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(INTERNAT_TEST, MyFrame::OnTestLocaleAvail)
|
EVT_MENU(INTERNAT_TEST, MyFrame::OnTestLocaleAvail)
|
||||||
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
|
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
|
||||||
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
|
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
|
||||||
@@ -165,7 +165,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MENU(INTERNAT_TEST_2, MyFrame::OnTest2)
|
EVT_MENU(INTERNAT_TEST_2, MyFrame::OnTest2)
|
||||||
EVT_MENU(INTERNAT_TEST_3, MyFrame::OnTest3)
|
EVT_MENU(INTERNAT_TEST_3, MyFrame::OnTest3)
|
||||||
EVT_MENU(INTERNAT_TEST_MSGBOX, MyFrame::OnTestMsgBox)
|
EVT_MENU(INTERNAT_TEST_MSGBOX, MyFrame::OnTestMsgBox)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
IMPLEMENT_APP(MyApp)
|
IMPLEMENT_APP(MyApp)
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
IMPLEMENT_APP(MyApp)
|
IMPLEMENT_APP(MyApp)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(wxID_EXIT, MyFrame::OnExit)
|
EVT_MENU(wxID_EXIT, MyFrame::OnExit)
|
||||||
EVT_CLOSE( MyFrame::OnClose )
|
EVT_CLOSE( MyFrame::OnClose )
|
||||||
EVT_BUTTON( ID_START, MyFrame::OnStart )
|
EVT_BUTTON( ID_START, MyFrame::OnStart )
|
||||||
@@ -57,7 +57,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_BUTTON( ID_POKE, MyFrame::OnPoke )
|
EVT_BUTTON( ID_POKE, MyFrame::OnPoke )
|
||||||
EVT_BUTTON( ID_EXECUTE, MyFrame::OnExecute )
|
EVT_BUTTON( ID_EXECUTE, MyFrame::OnExecute )
|
||||||
EVT_BUTTON( ID_REQUEST, MyFrame::OnRequest )
|
EVT_BUTTON( ID_REQUEST, MyFrame::OnRequest )
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// globals
|
// globals
|
||||||
|
@@ -75,7 +75,7 @@ protected:
|
|||||||
void OnRequest(wxCommandEvent& event);
|
void OnRequest(wxCommandEvent& event);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyConnection : public MyConnectionBase
|
class MyConnection : public MyConnectionBase
|
||||||
|
@@ -45,14 +45,14 @@
|
|||||||
|
|
||||||
IMPLEMENT_APP(MyApp)
|
IMPLEMENT_APP(MyApp)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_CLOSE( MyFrame::OnClose )
|
EVT_CLOSE( MyFrame::OnClose )
|
||||||
|
|
||||||
EVT_BUTTON( ID_START, MyFrame::OnStart )
|
EVT_BUTTON( ID_START, MyFrame::OnStart )
|
||||||
EVT_CHOICE( ID_SERVERNAME, MyFrame::OnServerName )
|
EVT_CHOICE( ID_SERVERNAME, MyFrame::OnServerName )
|
||||||
EVT_BUTTON( ID_DISCONNECT, MyFrame::OnDisconnect )
|
EVT_BUTTON( ID_DISCONNECT, MyFrame::OnDisconnect )
|
||||||
EVT_BUTTON( ID_ADVISE, MyFrame::OnAdvise )
|
EVT_BUTTON( ID_ADVISE, MyFrame::OnAdvise )
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
@@ -59,7 +59,7 @@ protected:
|
|||||||
void OnDisconnect( wxCommandEvent &event );
|
void OnDisconnect( wxCommandEvent &event );
|
||||||
void OnAdvise( wxCommandEvent &event );
|
void OnAdvise( wxCommandEvent &event );
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyConnection : public MyConnectionBase
|
class MyConnection : public MyConnectionBase
|
||||||
|
@@ -97,9 +97,9 @@ bool MyApp::OnInit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
wxBEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
||||||
EVT_JOYSTICK_EVENTS(MyCanvas::OnJoystickEvent)
|
EVT_JOYSTICK_EVENTS(MyCanvas::OnJoystickEvent)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Define a constructor for my canvas
|
// Define a constructor for my canvas
|
||||||
MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size):
|
MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size):
|
||||||
@@ -182,9 +182,9 @@ void MyCanvas::OnJoystickEvent(wxJoystickEvent& event)
|
|||||||
#endif // wxUSE_SOUND
|
#endif // wxUSE_SOUND
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(JOYTEST_QUIT, MyFrame::OnQuit)
|
EVT_MENU(JOYTEST_QUIT, MyFrame::OnQuit)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyFrame::MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos,
|
MyFrame::MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos,
|
||||||
const wxSize& size, const long style)
|
const wxSize& size, const long style)
|
||||||
|
@@ -35,7 +35,7 @@ public:
|
|||||||
void OnJoystickEvent(wxJoystickEvent& event);
|
void OnJoystickEvent(wxJoystickEvent& event);
|
||||||
|
|
||||||
wxJoystick* m_stick;
|
wxJoystick* m_stick;
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyFrame: public wxFrame
|
class MyFrame: public wxFrame
|
||||||
|
@@ -62,7 +62,7 @@ bool MyApp::OnInit()
|
|||||||
// MyFrame
|
// MyFrame
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(LAYOUT_ABOUT, MyFrame::OnAbout)
|
EVT_MENU(LAYOUT_ABOUT, MyFrame::OnAbout)
|
||||||
EVT_MENU(LAYOUT_QUIT, MyFrame::OnQuit)
|
EVT_MENU(LAYOUT_QUIT, MyFrame::OnQuit)
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MENU(LAYOUT_TEST_SET_MINIMAL, MyFrame::TestSetMinimal)
|
EVT_MENU(LAYOUT_TEST_SET_MINIMAL, MyFrame::TestSetMinimal)
|
||||||
EVT_MENU(LAYOUT_TEST_NESTED, MyFrame::TestNested)
|
EVT_MENU(LAYOUT_TEST_NESTED, MyFrame::TestNested)
|
||||||
EVT_MENU(LAYOUT_TEST_WRAP, MyFrame::TestWrap)
|
EVT_MENU(LAYOUT_TEST_WRAP, MyFrame::TestWrap)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Define my frame constructor
|
// Define my frame constructor
|
||||||
MyFrame::MyFrame()
|
MyFrame::MyFrame()
|
||||||
@@ -465,12 +465,12 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyGridBagSizerFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyGridBagSizerFrame, wxFrame)
|
||||||
EVT_BUTTON( GBS_HIDE_BTN, MyGridBagSizerFrame::OnHideBtn)
|
EVT_BUTTON( GBS_HIDE_BTN, MyGridBagSizerFrame::OnHideBtn)
|
||||||
EVT_BUTTON( GBS_SHOW_BTN, MyGridBagSizerFrame::OnShowBtn)
|
EVT_BUTTON( GBS_SHOW_BTN, MyGridBagSizerFrame::OnShowBtn)
|
||||||
EVT_BUTTON( GBS_MOVE_BTN1, MyGridBagSizerFrame::OnMoveBtn)
|
EVT_BUTTON( GBS_MOVE_BTN1, MyGridBagSizerFrame::OnMoveBtn)
|
||||||
EVT_BUTTON( GBS_MOVE_BTN2, MyGridBagSizerFrame::OnMoveBtn)
|
EVT_BUTTON( GBS_MOVE_BTN2, MyGridBagSizerFrame::OnMoveBtn)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
MyGridBagSizerFrame::MyGridBagSizerFrame(wxFrame* parent)
|
MyGridBagSizerFrame::MyGridBagSizerFrame(wxFrame* parent)
|
||||||
@@ -582,10 +582,10 @@ enum {
|
|||||||
ID_SET_BIG
|
ID_SET_BIG
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MySimpleSizerFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MySimpleSizerFrame, wxFrame)
|
||||||
EVT_MENU( ID_SET_SMALL, MySimpleSizerFrame::OnSetSmallSize)
|
EVT_MENU( ID_SET_SMALL, MySimpleSizerFrame::OnSetSmallSize)
|
||||||
EVT_MENU( ID_SET_BIG, MySimpleSizerFrame::OnSetBigSize)
|
EVT_MENU( ID_SET_BIG, MySimpleSizerFrame::OnSetBigSize)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MySimpleSizerFrame::MySimpleSizerFrame(wxFrame* parent)
|
MySimpleSizerFrame::MySimpleSizerFrame(wxFrame* parent)
|
||||||
: wxFrame(parent, wxID_ANY, "Simple Sizer Test Frame")
|
: wxFrame(parent, wxID_ANY, "Simple Sizer Test Frame")
|
||||||
@@ -674,10 +674,10 @@ MyNestedSizerFrame::MyNestedSizerFrame(wxFrame* parent)
|
|||||||
// MyWrapSizerFrame
|
// MyWrapSizerFrame
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyWrapSizerFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyWrapSizerFrame, wxFrame)
|
||||||
EVT_MENU(wxID_ADD, MyWrapSizerFrame::OnAddCheckbox)
|
EVT_MENU(wxID_ADD, MyWrapSizerFrame::OnAddCheckbox)
|
||||||
EVT_MENU(wxID_REMOVE, MyWrapSizerFrame::OnRemoveCheckbox)
|
EVT_MENU(wxID_REMOVE, MyWrapSizerFrame::OnRemoveCheckbox)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyWrapSizerFrame::MyWrapSizerFrame(wxFrame* parent)
|
MyWrapSizerFrame::MyWrapSizerFrame(wxFrame* parent)
|
||||||
: wxFrame(parent, wxID_ANY, "Wrap Sizer Test Frame",
|
: wxFrame(parent, wxID_ANY, "Wrap Sizer Test Frame",
|
||||||
|
@@ -34,7 +34,7 @@ public:
|
|||||||
void OnQuit(wxCommandEvent& event);
|
void OnQuit(wxCommandEvent& event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// a frame showing the box sizer proportions
|
// a frame showing the box sizer proportions
|
||||||
@@ -93,7 +93,7 @@ private:
|
|||||||
wxButton* m_moveBtn2;
|
wxButton* m_moveBtn2;
|
||||||
wxGBPosition m_lastPos;
|
wxGBPosition m_lastPos;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
wxTextCtrl *m_target;
|
wxTextCtrl *m_target;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ private:
|
|||||||
wxWindow* m_checkboxParent;
|
wxWindow* m_checkboxParent;
|
||||||
wxSizer* m_wrapSizer;
|
wxSizer* m_wrapSizer;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// controls and menu constants
|
// controls and menu constants
|
||||||
|
@@ -108,7 +108,7 @@ bool MyApp::OnInit()
|
|||||||
// MyFrame
|
// MyFrame
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_SIZE(MyFrame::OnSize)
|
EVT_SIZE(MyFrame::OnSize)
|
||||||
|
|
||||||
EVT_MENU(LIST_QUIT, MyFrame::OnQuit)
|
EVT_MENU(LIST_QUIT, MyFrame::OnQuit)
|
||||||
@@ -161,7 +161,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_UPDATE_UI(LIST_TOGGLE_MULTI_SEL, MyFrame::OnUpdateToggleMultiSel)
|
EVT_UPDATE_UI(LIST_TOGGLE_MULTI_SEL, MyFrame::OnUpdateToggleMultiSel)
|
||||||
EVT_UPDATE_UI(LIST_TOGGLE_HEADER, MyFrame::OnUpdateToggleHeader)
|
EVT_UPDATE_UI(LIST_TOGGLE_HEADER, MyFrame::OnUpdateToggleHeader)
|
||||||
EVT_UPDATE_UI(LIST_ROW_LINES, MyFrame::OnUpdateRowLines)
|
EVT_UPDATE_UI(LIST_ROW_LINES, MyFrame::OnUpdateRowLines)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// My frame constructor
|
// My frame constructor
|
||||||
MyFrame::MyFrame(const wxChar *title)
|
MyFrame::MyFrame(const wxChar *title)
|
||||||
@@ -923,7 +923,7 @@ void MyFrame::OnDeleteAll(wxCommandEvent& WXUNUSED(event))
|
|||||||
// MyListCtrl
|
// MyListCtrl
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyListCtrl, wxListCtrl)
|
wxBEGIN_EVENT_TABLE(MyListCtrl, wxListCtrl)
|
||||||
EVT_LIST_BEGIN_DRAG(LIST_CTRL, MyListCtrl::OnBeginDrag)
|
EVT_LIST_BEGIN_DRAG(LIST_CTRL, MyListCtrl::OnBeginDrag)
|
||||||
EVT_LIST_BEGIN_RDRAG(LIST_CTRL, MyListCtrl::OnBeginRDrag)
|
EVT_LIST_BEGIN_RDRAG(LIST_CTRL, MyListCtrl::OnBeginRDrag)
|
||||||
EVT_LIST_BEGIN_LABEL_EDIT(LIST_CTRL, MyListCtrl::OnBeginLabelEdit)
|
EVT_LIST_BEGIN_LABEL_EDIT(LIST_CTRL, MyListCtrl::OnBeginLabelEdit)
|
||||||
@@ -950,7 +950,7 @@ BEGIN_EVENT_TABLE(MyListCtrl, wxListCtrl)
|
|||||||
EVT_CHAR(MyListCtrl::OnChar)
|
EVT_CHAR(MyListCtrl::OnChar)
|
||||||
|
|
||||||
EVT_RIGHT_DOWN(MyListCtrl::OnRightClick)
|
EVT_RIGHT_DOWN(MyListCtrl::OnRightClick)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
void MyListCtrl::OnCacheHint(wxListEvent& event)
|
void MyListCtrl::OnCacheHint(wxListEvent& event)
|
||||||
{
|
{
|
||||||
|
@@ -90,7 +90,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(MyListCtrl);
|
wxDECLARE_NO_COPY_CLASS(MyListCtrl);
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Define a new frame type
|
// Define a new frame type
|
||||||
@@ -186,7 +186,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(MyFrame);
|
wxDECLARE_NO_COPY_CLASS(MyFrame);
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -62,7 +62,7 @@ IMPLEMENT_APP(MyApp)
|
|||||||
// event tables
|
// event tables
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxMDIParentFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxMDIParentFrame)
|
||||||
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
|
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
|
||||||
EVT_MENU(wxID_NEW, MyFrame::OnNewWindow)
|
EVT_MENU(wxID_NEW, MyFrame::OnNewWindow)
|
||||||
EVT_MENU(MDI_FULLSCREEN, MyFrame::OnFullScreen)
|
EVT_MENU(MDI_FULLSCREEN, MyFrame::OnFullScreen)
|
||||||
@@ -71,12 +71,12 @@ BEGIN_EVENT_TABLE(MyFrame, wxMDIParentFrame)
|
|||||||
EVT_MENU(wxID_CLOSE_ALL, MyFrame::OnCloseAll)
|
EVT_MENU(wxID_CLOSE_ALL, MyFrame::OnCloseAll)
|
||||||
|
|
||||||
EVT_CLOSE(MyFrame::OnClose)
|
EVT_CLOSE(MyFrame::OnClose)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Note that wxID_NEW and wxID_ABOUT commands get passed
|
// Note that wxID_NEW and wxID_ABOUT commands get passed
|
||||||
// to the parent window for processing, so no need to
|
// to the parent window for processing, so no need to
|
||||||
// duplicate event handlers here.
|
// duplicate event handlers here.
|
||||||
BEGIN_EVENT_TABLE(MyChild, wxMDIChildFrame)
|
wxBEGIN_EVENT_TABLE(MyChild, wxMDIChildFrame)
|
||||||
EVT_MENU(wxID_CLOSE, MyChild::OnClose)
|
EVT_MENU(wxID_CLOSE, MyChild::OnClose)
|
||||||
EVT_MENU(MDI_REFRESH, MyChild::OnRefresh)
|
EVT_MENU(MDI_REFRESH, MyChild::OnRefresh)
|
||||||
EVT_MENU(MDI_CHANGE_TITLE, MyChild::OnChangeTitle)
|
EVT_MENU(MDI_CHANGE_TITLE, MyChild::OnChangeTitle)
|
||||||
@@ -92,15 +92,15 @@ BEGIN_EVENT_TABLE(MyChild, wxMDIChildFrame)
|
|||||||
EVT_MOVE(MyChild::OnMove)
|
EVT_MOVE(MyChild::OnMove)
|
||||||
|
|
||||||
EVT_CLOSE(MyChild::OnCloseWindow)
|
EVT_CLOSE(MyChild::OnCloseWindow)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
wxBEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
||||||
EVT_MOUSE_EVENTS(MyCanvas::OnEvent)
|
EVT_MOUSE_EVENTS(MyCanvas::OnEvent)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyChild::EventHandler, wxEvtHandler)
|
wxBEGIN_EVENT_TABLE(MyChild::EventHandler, wxEvtHandler)
|
||||||
EVT_MENU(MDI_REFRESH, MyChild::EventHandler::OnRefresh)
|
EVT_MENU(MDI_REFRESH, MyChild::EventHandler::OnRefresh)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
// implementation
|
// implementation
|
||||||
|
@@ -34,7 +34,7 @@ private:
|
|||||||
|
|
||||||
bool m_dirty;
|
bool m_dirty;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Define a new frame
|
// Define a new frame
|
||||||
@@ -60,7 +60,7 @@ private:
|
|||||||
|
|
||||||
wxTextCtrl *m_textWindow;
|
wxTextCtrl *m_textWindow;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyChild : public wxMDIChildFrame
|
class MyChild : public wxMDIChildFrame
|
||||||
@@ -108,12 +108,12 @@ private:
|
|||||||
|
|
||||||
const unsigned m_numChild;
|
const unsigned m_numChild;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(EventHandler);
|
wxDECLARE_NO_COPY_CLASS(EventHandler);
|
||||||
};
|
};
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// menu items ids
|
// menu items ids
|
||||||
|
@@ -589,9 +589,9 @@ wxMediaPlayerFrame::wxMediaPlayerFrame(const wxString& title)
|
|||||||
// class you want to use for events, such as wxMediaPlayerFrame.
|
// class you want to use for events, such as wxMediaPlayerFrame.
|
||||||
//
|
//
|
||||||
// Then after your class declaration you put
|
// Then after your class declaration you put
|
||||||
// BEGIN_EVENT_TABLE(wxMediaPlayerFrame, wxFrame)
|
// wxBEGIN_EVENT_TABLE(wxMediaPlayerFrame, wxFrame)
|
||||||
// EVT_XXX(XXX)...
|
// EVT_XXX(XXX)...
|
||||||
// END_EVENT_TABLE()
|
// wxEND_EVENT_TABLE()
|
||||||
//
|
//
|
||||||
// Where wxMediaPlayerFrame is the class with the DECLARE_MESSAGE_MAP
|
// Where wxMediaPlayerFrame is the class with the DECLARE_MESSAGE_MAP
|
||||||
// in it. EVT_XXX(XXX) are each of your handlers, such
|
// in it. EVT_XXX(XXX) are each of your handlers, such
|
||||||
|
@@ -120,9 +120,9 @@ bool MyApp::OnInit(void)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
|
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// My frame constructor
|
// My frame constructor
|
||||||
MyFrame::MyFrame(wxFrame *parent):
|
MyFrame::MyFrame(wxFrame *parent):
|
||||||
|
@@ -182,7 +182,7 @@ private:
|
|||||||
// the previous log target
|
// the previous log target
|
||||||
wxLog *m_logOld;
|
wxLog *m_logOld;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyDialog : public wxDialog
|
class MyDialog : public wxDialog
|
||||||
@@ -227,7 +227,7 @@ private:
|
|||||||
wxTextCtrl *m_textctrl;
|
wxTextCtrl *m_textctrl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// A small helper class which intercepts all menu events and logs them
|
// A small helper class which intercepts all menu events and logs them
|
||||||
@@ -246,7 +246,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
MyFrame *m_frame;
|
MyFrame *m_frame;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -323,7 +323,7 @@ enum
|
|||||||
// event tables
|
// event tables
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Menu_File_Quit, MyFrame::OnQuit)
|
EVT_MENU(Menu_File_Quit, MyFrame::OnQuit)
|
||||||
#if USE_LOG_WINDOW
|
#if USE_LOG_WINDOW
|
||||||
EVT_MENU(Menu_File_ClearLog, MyFrame::OnClearLog)
|
EVT_MENU(Menu_File_ClearLog, MyFrame::OnClearLog)
|
||||||
@@ -387,9 +387,9 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MENU_HIGHLIGHT_ALL(MyFrame::OnMenuHighlight)
|
EVT_MENU_HIGHLIGHT_ALL(MyFrame::OnMenuHighlight)
|
||||||
|
|
||||||
EVT_SIZE(MyFrame::OnSize)
|
EVT_SIZE(MyFrame::OnSize)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(MyDialog, wxDialog)
|
||||||
#if USE_CONTEXT_MENU
|
#if USE_CONTEXT_MENU
|
||||||
EVT_CONTEXT_MENU(MyDialog::OnContextMenu)
|
EVT_CONTEXT_MENU(MyDialog::OnContextMenu)
|
||||||
#else
|
#else
|
||||||
@@ -398,11 +398,11 @@ BEGIN_EVENT_TABLE(MyDialog, wxDialog)
|
|||||||
EVT_MENU_OPEN(MyDialog::OnMenuOpen)
|
EVT_MENU_OPEN(MyDialog::OnMenuOpen)
|
||||||
EVT_MENU_CLOSE(MyDialog::OnMenuClose)
|
EVT_MENU_CLOSE(MyDialog::OnMenuClose)
|
||||||
EVT_MENU_HIGHLIGHT_ALL(MyDialog::OnMenuHighlight)
|
EVT_MENU_HIGHLIGHT_ALL(MyDialog::OnMenuHighlight)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyEvtHandler, wxEvtHandler)
|
wxBEGIN_EVENT_TABLE(MyEvtHandler, wxEvtHandler)
|
||||||
EVT_MENU(wxID_ANY, MyEvtHandler::OnMenuEvent)
|
EVT_MENU(wxID_ANY, MyEvtHandler::OnMenuEvent)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// implementation
|
// implementation
|
||||||
|
@@ -108,7 +108,7 @@ public:
|
|||||||
MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size);
|
MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size);
|
||||||
void OnPaint(wxPaintEvent& event);
|
void OnPaint(wxPaintEvent& event);
|
||||||
void OnMouseEvent(wxMouseEvent& event);
|
void OnMouseEvent(wxMouseEvent& event);
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyChild: public wxFrame
|
class MyChild: public wxFrame
|
||||||
@@ -123,7 +123,7 @@ public:
|
|||||||
|
|
||||||
MyCanvas *canvas;
|
MyCanvas *canvas;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ID for the menu quit command
|
// ID for the menu quit command
|
||||||
@@ -320,10 +320,10 @@ wxFrame *MyApp::CreateFrame()
|
|||||||
return subframe;
|
return subframe;
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
wxBEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
||||||
EVT_PAINT(MyCanvas::OnPaint)
|
EVT_PAINT(MyCanvas::OnPaint)
|
||||||
EVT_MOUSE_EVENTS(MyCanvas::OnMouseEvent)
|
EVT_MOUSE_EVENTS(MyCanvas::OnMouseEvent)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Define a constructor for my canvas
|
// Define a constructor for my canvas
|
||||||
MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size)
|
MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size)
|
||||||
@@ -370,11 +370,11 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event)
|
|||||||
s_ypos = pos.y;
|
s_ypos = pos.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyChild, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyChild, wxFrame)
|
||||||
EVT_MENU(HELLO_QUIT, MyChild::OnQuit)
|
EVT_MENU(HELLO_QUIT, MyChild::OnQuit)
|
||||||
EVT_MENU(HELLO_NEW, MyChild::OnNew)
|
EVT_MENU(HELLO_NEW, MyChild::OnNew)
|
||||||
EVT_ACTIVATE(MyChild::OnActivate)
|
EVT_ACTIVATE(MyChild::OnActivate)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyChild::MyChild(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, const long style)
|
MyChild::MyChild(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, const long style)
|
||||||
: wxFrame(frame, -1, title, pos, size, style)
|
: wxFrame(frame, -1, title, pos, size, style)
|
||||||
|
@@ -70,7 +70,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -96,10 +96,10 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(Minimal_About, MyFrame::OnAbout)
|
EVT_MENU(Minimal_About, MyFrame::OnAbout)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
|
@@ -69,10 +69,10 @@ bool MyApp::OnInit(void)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit)
|
EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit)
|
||||||
EVT_MENU(RESOURCE_TEST1, MyFrame::OnTest1)
|
EVT_MENU(RESOURCE_TEST1, MyFrame::OnTest1)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Define my frame constructor
|
// Define my frame constructor
|
||||||
MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size):
|
MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size):
|
||||||
@@ -101,10 +101,10 @@ void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event))
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(MyDialog, wxDialog)
|
||||||
EVT_BUTTON(wxID_OK, MyDialog::OnOk)
|
EVT_BUTTON(wxID_OK, MyDialog::OnOk)
|
||||||
EVT_BUTTON(wxID_CANCEL, MyDialog::OnCancel)
|
EVT_BUTTON(wxID_CANCEL, MyDialog::OnCancel)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
void MyDialog::OnOk(wxCommandEvent& WXUNUSED(event))
|
void MyDialog::OnOk(wxCommandEvent& WXUNUSED(event))
|
||||||
|
@@ -24,7 +24,7 @@ class MyFrame: public wxFrame
|
|||||||
void OnQuit(wxCommandEvent& event);
|
void OnQuit(wxCommandEvent& event);
|
||||||
void OnTest1(wxCommandEvent& event);
|
void OnTest1(wxCommandEvent& event);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyDialog : public wxDialog
|
class MyDialog : public wxDialog
|
||||||
@@ -33,7 +33,7 @@ class MyDialog : public wxDialog
|
|||||||
void OnOk(wxCommandEvent& event);
|
void OnOk(wxCommandEvent& event);
|
||||||
void OnCancel(wxCommandEvent& event);
|
void OnCancel(wxCommandEvent& event);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
#define RESOURCE_QUIT 4
|
#define RESOURCE_QUIT 4
|
||||||
|
@@ -221,7 +221,7 @@ wxPanel *CreatePage(wxBookCtrlBase *parent, const wxString&pageName)
|
|||||||
// MyFrame
|
// MyFrame
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
// File menu
|
// File menu
|
||||||
EVT_MENU_RANGE(ID_BOOK_NOTEBOOK, ID_BOOK_MAX, MyFrame::OnType)
|
EVT_MENU_RANGE(ID_BOOK_NOTEBOOK, ID_BOOK_MAX, MyFrame::OnType)
|
||||||
EVT_MENU_RANGE(ID_ORIENT_DEFAULT, ID_ORIENT_MAX, MyFrame::OnOrient)
|
EVT_MENU_RANGE(ID_ORIENT_DEFAULT, ID_ORIENT_MAX, MyFrame::OnOrient)
|
||||||
@@ -279,7 +279,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
|
|
||||||
// Update title in idle time
|
// Update title in idle time
|
||||||
EVT_IDLE(MyFrame::OnIdle)
|
EVT_IDLE(MyFrame::OnIdle)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyFrame::MyFrame()
|
MyFrame::MyFrame()
|
||||||
: wxFrame(NULL, wxID_ANY, wxString(wxT("wxWidgets book controls sample")))
|
: wxFrame(NULL, wxID_ANY, wxString(wxT("wxWidgets book controls sample")))
|
||||||
|
@@ -133,7 +133,7 @@ private:
|
|||||||
|
|
||||||
wxImageList *m_imageList;
|
wxImageList *m_imageList;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ID_COMMANDS
|
enum ID_COMMANDS
|
||||||
|
@@ -74,7 +74,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -100,11 +100,11 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(OleAuto_Quit, MyFrame::OnQuit)
|
EVT_MENU(OleAuto_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(OleAuto_About, MyFrame::OnAbout)
|
EVT_MENU(OleAuto_About, MyFrame::OnAbout)
|
||||||
EVT_MENU(OleAuto_Test, MyFrame::OnTest)
|
EVT_MENU(OleAuto_Test, MyFrame::OnTest)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
|
@@ -306,11 +306,11 @@ TestGLContext& MyApp::GetContext(wxGLCanvas *canvas, bool useStereo)
|
|||||||
// TestGLCanvas
|
// TestGLCanvas
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(TestGLCanvas, wxGLCanvas)
|
wxBEGIN_EVENT_TABLE(TestGLCanvas, wxGLCanvas)
|
||||||
EVT_PAINT(TestGLCanvas::OnPaint)
|
EVT_PAINT(TestGLCanvas::OnPaint)
|
||||||
EVT_KEY_DOWN(TestGLCanvas::OnKeyDown)
|
EVT_KEY_DOWN(TestGLCanvas::OnKeyDown)
|
||||||
EVT_TIMER(SpinTimer, TestGLCanvas::OnSpinTimer)
|
EVT_TIMER(SpinTimer, TestGLCanvas::OnSpinTimer)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
TestGLCanvas::TestGLCanvas(wxWindow *parent, int *attribList)
|
TestGLCanvas::TestGLCanvas(wxWindow *parent, int *attribList)
|
||||||
// With perspective OpenGL graphics, the wxFULL_REPAINT_ON_RESIZE style
|
// With perspective OpenGL graphics, the wxFULL_REPAINT_ON_RESIZE style
|
||||||
@@ -452,11 +452,11 @@ wxString glGetwxString(GLenum name)
|
|||||||
// MyFrame: main application window
|
// MyFrame: main application window
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(wxID_NEW, MyFrame::OnNewWindow)
|
EVT_MENU(wxID_NEW, MyFrame::OnNewWindow)
|
||||||
EVT_MENU(NEW_STEREO_WINDOW, MyFrame::OnNewStereoWindow)
|
EVT_MENU(NEW_STEREO_WINDOW, MyFrame::OnNewStereoWindow)
|
||||||
EVT_MENU(wxID_CLOSE, MyFrame::OnClose)
|
EVT_MENU(wxID_CLOSE, MyFrame::OnClose)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyFrame::MyFrame( bool stereoWindow )
|
MyFrame::MyFrame( bool stereoWindow )
|
||||||
: wxFrame(NULL, wxID_ANY, wxT("wxWidgets OpenGL Cube Sample"))
|
: wxFrame(NULL, wxID_ANY, wxT("wxWidgets OpenGL Cube Sample"))
|
||||||
|
@@ -59,7 +59,7 @@ private:
|
|||||||
void OnNewWindow(wxCommandEvent& event);
|
void OnNewWindow(wxCommandEvent& event);
|
||||||
void OnNewStereoWindow(wxCommandEvent& event);
|
void OnNewStereoWindow(wxCommandEvent& event);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class TestGLCanvas : public wxGLCanvas
|
class TestGLCanvas : public wxGLCanvas
|
||||||
@@ -81,7 +81,7 @@ private:
|
|||||||
bool m_useStereo,
|
bool m_useStereo,
|
||||||
m_stereoWarningAlreadyDisplayed;
|
m_stereoWarningAlreadyDisplayed;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@@ -87,9 +87,9 @@ bool MyApp::OnCmdLineParsed(wxCmdLineParser& parser)
|
|||||||
// MyFrame
|
// MyFrame
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(wxID_EXIT, MyFrame::OnExit)
|
EVT_MENU(wxID_EXIT, MyFrame::OnExit)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos,
|
MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos,
|
||||||
const wxSize& size, long style)
|
const wxSize& size, long style)
|
||||||
@@ -161,12 +161,12 @@ void MyFrame::OnExit( wxCommandEvent& WXUNUSED(event) )
|
|||||||
// TestGLCanvas
|
// TestGLCanvas
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(TestGLCanvas, wxGLCanvas)
|
wxBEGIN_EVENT_TABLE(TestGLCanvas, wxGLCanvas)
|
||||||
EVT_SIZE(TestGLCanvas::OnSize)
|
EVT_SIZE(TestGLCanvas::OnSize)
|
||||||
EVT_PAINT(TestGLCanvas::OnPaint)
|
EVT_PAINT(TestGLCanvas::OnPaint)
|
||||||
EVT_CHAR(TestGLCanvas::OnChar)
|
EVT_CHAR(TestGLCanvas::OnChar)
|
||||||
EVT_MOUSE_EVENTS(TestGLCanvas::OnMouseEvent)
|
EVT_MOUSE_EVENTS(TestGLCanvas::OnMouseEvent)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
TestGLCanvas::TestGLCanvas(wxWindow *parent,
|
TestGLCanvas::TestGLCanvas(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
|
@@ -70,7 +70,7 @@ private:
|
|||||||
GLfloat m_yrot;
|
GLfloat m_yrot;
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(TestGLCanvas);
|
wxDECLARE_NO_COPY_CLASS(TestGLCanvas);
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ public:
|
|||||||
private :
|
private :
|
||||||
void OnExit(wxCommandEvent& event);
|
void OnExit(wxCommandEvent& event);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -66,11 +66,11 @@ IMPLEMENT_APP(MyApp)
|
|||||||
// MyFrame
|
// MyFrame
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(wxID_OPEN, MyFrame::OnMenuFileOpen)
|
EVT_MENU(wxID_OPEN, MyFrame::OnMenuFileOpen)
|
||||||
EVT_MENU(wxID_EXIT, MyFrame::OnMenuFileExit)
|
EVT_MENU(wxID_EXIT, MyFrame::OnMenuFileExit)
|
||||||
EVT_MENU(wxID_HELP, MyFrame::OnMenuHelpAbout)
|
EVT_MENU(wxID_HELP, MyFrame::OnMenuHelpAbout)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// MyFrame constructor
|
// MyFrame constructor
|
||||||
MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos,
|
MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos,
|
||||||
@@ -133,12 +133,12 @@ void MyFrame::OnMenuHelpAbout( wxCommandEvent& WXUNUSED(event) )
|
|||||||
// TestGLCanvas
|
// TestGLCanvas
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(TestGLCanvas, wxGLCanvas)
|
wxBEGIN_EVENT_TABLE(TestGLCanvas, wxGLCanvas)
|
||||||
EVT_SIZE(TestGLCanvas::OnSize)
|
EVT_SIZE(TestGLCanvas::OnSize)
|
||||||
EVT_PAINT(TestGLCanvas::OnPaint)
|
EVT_PAINT(TestGLCanvas::OnPaint)
|
||||||
EVT_ERASE_BACKGROUND(TestGLCanvas::OnEraseBackground)
|
EVT_ERASE_BACKGROUND(TestGLCanvas::OnEraseBackground)
|
||||||
EVT_MOUSE_EVENTS(TestGLCanvas::OnMouse)
|
EVT_MOUSE_EVENTS(TestGLCanvas::OnMouse)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
TestGLCanvas::TestGLCanvas(wxWindow *parent,
|
TestGLCanvas::TestGLCanvas(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
|
@@ -69,7 +69,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
TestGLCanvas *m_canvas;
|
TestGLCanvas *m_canvas;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ private:
|
|||||||
DXFRenderer m_renderer;
|
DXFRenderer m_renderer;
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(TestGLCanvas);
|
wxDECLARE_NO_COPY_CLASS(TestGLCanvas);
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // #ifndef _WX_PENGUIN_H_
|
#endif // #ifndef _WX_PENGUIN_H_
|
||||||
|
@@ -51,7 +51,7 @@ public:
|
|||||||
void OnListboxDblClick (wxCommandEvent& event);
|
void OnListboxDblClick (wxCommandEvent& event);
|
||||||
bool OnClose () { return true; }
|
bool OnClose () { return true; }
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void InitMenu();
|
void InitMenu();
|
||||||
@@ -74,7 +74,7 @@ enum
|
|||||||
Control_Listbox, Control_Listbox2
|
Control_Listbox, Control_Listbox2
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(OwnerDrawnFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(OwnerDrawnFrame, wxFrame)
|
||||||
EVT_MENU(Menu_Toggle, OwnerDrawnFrame::OnMenuToggle)
|
EVT_MENU(Menu_Toggle, OwnerDrawnFrame::OnMenuToggle)
|
||||||
EVT_MENU(Menu_About, OwnerDrawnFrame::OnAbout)
|
EVT_MENU(Menu_About, OwnerDrawnFrame::OnAbout)
|
||||||
EVT_MENU(Menu_Quit, OwnerDrawnFrame::OnQuit)
|
EVT_MENU(Menu_Quit, OwnerDrawnFrame::OnQuit)
|
||||||
@@ -82,7 +82,7 @@ BEGIN_EVENT_TABLE(OwnerDrawnFrame, wxFrame)
|
|||||||
EVT_CHECKLISTBOX(Control_Listbox, OwnerDrawnFrame::OnCheckboxToggle)
|
EVT_CHECKLISTBOX(Control_Listbox, OwnerDrawnFrame::OnCheckboxToggle)
|
||||||
EVT_COMMAND(Control_Listbox, wxEVT_LISTBOX_DCLICK,
|
EVT_COMMAND(Control_Listbox, wxEVT_LISTBOX_DCLICK,
|
||||||
OwnerDrawnFrame::OnListboxDblClick)
|
OwnerDrawnFrame::OnListboxDblClick)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
IMPLEMENT_APP(OwnerDrawnApp)
|
IMPLEMENT_APP(OwnerDrawnApp)
|
||||||
|
|
||||||
|
@@ -89,8 +89,8 @@ private:
|
|||||||
void OnSpinCtrl( wxSpinEvent& event );
|
void OnSpinCtrl( wxSpinEvent& event );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_CLASS(SimpleTransientPopup)
|
wxDECLARE_ABSTRACT_CLASS(SimpleTransientPopup);
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
@@ -98,14 +98,14 @@ private:
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
IMPLEMENT_CLASS(SimpleTransientPopup,wxPopupTransientWindow)
|
IMPLEMENT_CLASS(SimpleTransientPopup,wxPopupTransientWindow)
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(SimpleTransientPopup,wxPopupTransientWindow)
|
wxBEGIN_EVENT_TABLE(SimpleTransientPopup,wxPopupTransientWindow)
|
||||||
EVT_MOUSE_EVENTS( SimpleTransientPopup::OnMouse )
|
EVT_MOUSE_EVENTS( SimpleTransientPopup::OnMouse )
|
||||||
EVT_SIZE( SimpleTransientPopup::OnSize )
|
EVT_SIZE( SimpleTransientPopup::OnSize )
|
||||||
EVT_SET_FOCUS( SimpleTransientPopup::OnSetFocus )
|
EVT_SET_FOCUS( SimpleTransientPopup::OnSetFocus )
|
||||||
EVT_KILL_FOCUS( SimpleTransientPopup::OnKillFocus )
|
EVT_KILL_FOCUS( SimpleTransientPopup::OnKillFocus )
|
||||||
EVT_BUTTON( Minimal_PopupButton, SimpleTransientPopup::OnButton )
|
EVT_BUTTON( Minimal_PopupButton, SimpleTransientPopup::OnButton )
|
||||||
EVT_SPINCTRL( Minimal_PopupSpinctrl, SimpleTransientPopup::OnSpinCtrl )
|
EVT_SPINCTRL( Minimal_PopupSpinctrl, SimpleTransientPopup::OnSpinCtrl )
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
SimpleTransientPopup::SimpleTransientPopup( wxWindow *parent, bool scrolled )
|
SimpleTransientPopup::SimpleTransientPopup( wxWindow *parent, bool scrolled )
|
||||||
:wxPopupTransientWindow( parent )
|
:wxPopupTransientWindow( parent )
|
||||||
@@ -267,7 +267,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
SimpleTransientPopup *m_simplePopup;
|
SimpleTransientPopup *m_simplePopup;
|
||||||
SimpleTransientPopup *m_scrolledPopup;
|
SimpleTransientPopup *m_scrolledPopup;
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyFrame : public wxFrame
|
class MyFrame : public wxFrame
|
||||||
@@ -288,7 +288,7 @@ private:
|
|||||||
SimpleTransientPopup *m_scrolledPopup;
|
SimpleTransientPopup *m_scrolledPopup;
|
||||||
wxTextCtrl *m_logWin;
|
wxTextCtrl *m_logWin;
|
||||||
wxLog *m_logOld;
|
wxLog *m_logOld;
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyApp : public wxApp
|
class MyApp : public wxApp
|
||||||
@@ -329,14 +329,14 @@ bool MyApp::OnInit()
|
|||||||
// main frame
|
// main frame
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(Minimal_About, MyFrame::OnAbout)
|
EVT_MENU(Minimal_About, MyFrame::OnAbout)
|
||||||
EVT_MENU(Minimal_TestDialog, MyFrame::OnTestDialog)
|
EVT_MENU(Minimal_TestDialog, MyFrame::OnTestDialog)
|
||||||
EVT_ACTIVATE(MyFrame::OnActivate)
|
EVT_ACTIVATE(MyFrame::OnActivate)
|
||||||
EVT_BUTTON(Minimal_StartSimplePopup, MyFrame::OnStartSimplePopup)
|
EVT_BUTTON(Minimal_StartSimplePopup, MyFrame::OnStartSimplePopup)
|
||||||
EVT_BUTTON(Minimal_StartScrolledPopup, MyFrame::OnStartScrolledPopup)
|
EVT_BUTTON(Minimal_StartScrolledPopup, MyFrame::OnStartScrolledPopup)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyFrame::MyFrame(const wxString& title)
|
MyFrame::MyFrame(const wxString& title)
|
||||||
: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(500,300))
|
: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(500,300))
|
||||||
@@ -454,10 +454,10 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
|||||||
// test dialog
|
// test dialog
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
|
wxBEGIN_EVENT_TABLE(MyDialog, wxDialog)
|
||||||
EVT_BUTTON(Minimal_StartSimplePopup, MyDialog::OnStartSimplePopup)
|
EVT_BUTTON(Minimal_StartSimplePopup, MyDialog::OnStartSimplePopup)
|
||||||
EVT_BUTTON(Minimal_StartScrolledPopup, MyDialog::OnStartScrolledPopup)
|
EVT_BUTTON(Minimal_StartScrolledPopup, MyDialog::OnStartScrolledPopup)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyDialog::MyDialog(const wxString& title)
|
MyDialog::MyDialog(const wxString& title)
|
||||||
:wxDialog(NULL, wxID_ANY, title, wxPoint(50,50), wxSize(400,300))
|
:wxDialog(NULL, wxID_ANY, title, wxPoint(50,50), wxSize(400,300))
|
||||||
|
@@ -167,10 +167,10 @@ private:
|
|||||||
|
|
||||||
wxLog *m_logOld;
|
wxLog *m_logOld;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_IDLE(MyFrame::OnIdle)
|
EVT_IDLE(MyFrame::OnIdle)
|
||||||
|
|
||||||
#ifdef wxHAS_POWER_EVENTS
|
#ifdef wxHAS_POWER_EVENTS
|
||||||
@@ -179,7 +179,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_POWER_SUSPEND_CANCEL(MyFrame::OnSuspendCancel)
|
EVT_POWER_SUSPEND_CANCEL(MyFrame::OnSuspendCancel)
|
||||||
EVT_POWER_RESUME(MyFrame::OnResume)
|
EVT_POWER_RESUME(MyFrame::OnResume)
|
||||||
#endif // wxHAS_POWER_EVENTS
|
#endif // wxHAS_POWER_EVENTS
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// main application class
|
// main application class
|
||||||
|
@@ -270,7 +270,7 @@ void MyApp::Draw(wxDC&dc)
|
|||||||
// MyFrame
|
// MyFrame
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(wxID_EXIT, MyFrame::OnExit)
|
EVT_MENU(wxID_EXIT, MyFrame::OnExit)
|
||||||
EVT_MENU(wxID_PRINT, MyFrame::OnPrint)
|
EVT_MENU(wxID_PRINT, MyFrame::OnPrint)
|
||||||
EVT_MENU(wxID_PREVIEW, MyFrame::OnPrintPreview)
|
EVT_MENU(wxID_PREVIEW, MyFrame::OnPrintPreview)
|
||||||
@@ -290,7 +290,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MENU_RANGE(WXPRINT_FRAME_MODAL_APP,
|
EVT_MENU_RANGE(WXPRINT_FRAME_MODAL_APP,
|
||||||
WXPRINT_FRAME_MODAL_NON,
|
WXPRINT_FRAME_MODAL_NON,
|
||||||
MyFrame::OnPreviewFrameModalityKind)
|
MyFrame::OnPreviewFrameModalityKind)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyFrame::MyFrame(wxFrame *frame, const wxString&title, const wxPoint&pos, const wxSize&size)
|
MyFrame::MyFrame(wxFrame *frame, const wxString&title, const wxPoint&pos, const wxSize&size)
|
||||||
: wxFrame(frame, wxID_ANY, title, pos, size)
|
: wxFrame(frame, wxID_ANY, title, pos, size)
|
||||||
@@ -502,9 +502,9 @@ void MyFrame::OnPreviewFrameModalityKind(wxCommandEvent& event)
|
|||||||
// MyCanvas
|
// MyCanvas
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
wxBEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
||||||
// EVT_PAINT(MyCanvas::OnPaint)
|
// EVT_PAINT(MyCanvas::OnPaint)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyCanvas::MyCanvas(wxFrame *frame, const wxPoint&pos, const wxSize&size, long style)
|
MyCanvas::MyCanvas(wxFrame *frame, const wxPoint&pos, const wxSize&size, long style)
|
||||||
: wxScrolledWindow(frame, wxID_ANY, pos, size, style)
|
: wxScrolledWindow(frame, wxID_ANY, pos, size, style)
|
||||||
|
@@ -66,7 +66,7 @@ private:
|
|||||||
MyCanvas* m_canvas;
|
MyCanvas* m_canvas;
|
||||||
wxPreviewFrameModalityKind m_previewModality;
|
wxPreviewFrameModalityKind m_previewModality;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Define a new white canvas
|
// Define a new white canvas
|
||||||
@@ -79,7 +79,7 @@ public:
|
|||||||
virtual void OnDraw(wxDC& dc) wxOVERRIDE;
|
virtual void OnDraw(wxDC& dc) wxOVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Defines a new printout class to print our document
|
// Defines a new printout class to print our document
|
||||||
|
@@ -80,7 +80,7 @@
|
|||||||
|
|
||||||
class wxSampleMultiButtonEditor : public wxPGTextCtrlEditor
|
class wxSampleMultiButtonEditor : public wxPGTextCtrlEditor
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxSampleMultiButtonEditor)
|
wxDECLARE_DYNAMIC_CLASS(wxSampleMultiButtonEditor);
|
||||||
public:
|
public:
|
||||||
wxSampleMultiButtonEditor() {}
|
wxSampleMultiButtonEditor() {}
|
||||||
virtual ~wxSampleMultiButtonEditor() {}
|
virtual ~wxSampleMultiButtonEditor() {}
|
||||||
@@ -441,7 +441,7 @@ enum
|
|||||||
// Event table
|
// Event table
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(FormMain, wxFrame)
|
wxBEGIN_EVENT_TABLE(FormMain, wxFrame)
|
||||||
EVT_IDLE(FormMain::OnIdle)
|
EVT_IDLE(FormMain::OnIdle)
|
||||||
EVT_MOVE(FormMain::OnMove)
|
EVT_MOVE(FormMain::OnMove)
|
||||||
EVT_SIZE(FormMain::OnResize)
|
EVT_SIZE(FormMain::OnResize)
|
||||||
@@ -557,7 +557,7 @@ BEGIN_EVENT_TABLE(FormMain, wxFrame)
|
|||||||
|
|
||||||
EVT_CONTEXT_MENU( FormMain::OnContextMenu )
|
EVT_CONTEXT_MENU( FormMain::OnContextMenu )
|
||||||
EVT_BUTTON(ID_SHOWPOPUP, FormMain::OnShowPopup)
|
EVT_BUTTON(ID_SHOWPOPUP, FormMain::OnShowPopup)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -1762,16 +1762,16 @@ protected:
|
|||||||
void OnPageChange( wxPropertyGridEvent& event );
|
void OnPageChange( wxPropertyGridEvent& event );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxMyPropertyGridPage, wxPropertyGridPage)
|
wxBEGIN_EVENT_TABLE(wxMyPropertyGridPage, wxPropertyGridPage)
|
||||||
EVT_PG_SELECTED( wxID_ANY, wxMyPropertyGridPage::OnPropertySelect )
|
EVT_PG_SELECTED( wxID_ANY, wxMyPropertyGridPage::OnPropertySelect )
|
||||||
EVT_PG_CHANGING( wxID_ANY, wxMyPropertyGridPage::OnPropertyChanging )
|
EVT_PG_CHANGING( wxID_ANY, wxMyPropertyGridPage::OnPropertyChanging )
|
||||||
EVT_PG_CHANGED( wxID_ANY, wxMyPropertyGridPage::OnPropertyChange )
|
EVT_PG_CHANGED( wxID_ANY, wxMyPropertyGridPage::OnPropertyChange )
|
||||||
EVT_PG_PAGE_CHANGED( wxID_ANY, wxMyPropertyGridPage::OnPageChange )
|
EVT_PG_PAGE_CHANGED( wxID_ANY, wxMyPropertyGridPage::OnPageChange )
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
void wxMyPropertyGridPage::OnPropertySelect( wxPropertyGridEvent& WXUNUSED(event) )
|
void wxMyPropertyGridPage::OnPropertySelect( wxPropertyGridEvent& WXUNUSED(event) )
|
||||||
@@ -1811,12 +1811,12 @@ public:
|
|||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxPGKeyHandler,wxEvtHandler)
|
wxBEGIN_EVENT_TABLE(wxPGKeyHandler,wxEvtHandler)
|
||||||
EVT_KEY_DOWN( wxPGKeyHandler::OnKeyEvent )
|
EVT_KEY_DOWN( wxPGKeyHandler::OnKeyEvent )
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
@@ -3257,15 +3257,15 @@ struct PropertyGridPopup : wxPopupWindow
|
|||||||
SetSize(pos.x, pos.y, size.x, size.y);
|
SetSize(pos.x, pos.y, size.x, size.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
DECLARE_CLASS(PropertyGridPopup)
|
wxDECLARE_ABSTRACT_CLASS(PropertyGridPopup);
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
IMPLEMENT_CLASS(PropertyGridPopup, wxPopupWindow)
|
IMPLEMENT_CLASS(PropertyGridPopup, wxPopupWindow)
|
||||||
BEGIN_EVENT_TABLE(PropertyGridPopup, wxPopupWindow)
|
wxBEGIN_EVENT_TABLE(PropertyGridPopup, wxPopupWindow)
|
||||||
EVT_PG_ITEM_COLLAPSED(ID_POPUPGRID, PropertyGridPopup::OnCollapse)
|
EVT_PG_ITEM_COLLAPSED(ID_POPUPGRID, PropertyGridPopup::OnCollapse)
|
||||||
EVT_PG_ITEM_EXPANDED(ID_POPUPGRID, PropertyGridPopup::OnExpand)
|
EVT_PG_ITEM_EXPANDED(ID_POPUPGRID, PropertyGridPopup::OnExpand)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
void FormMain::OnShowPopup(wxCommandEvent& WXUNUSED(event))
|
void FormMain::OnShowPopup(wxCommandEvent& WXUNUSED(event))
|
||||||
|
@@ -260,7 +260,7 @@ public:
|
|||||||
bool RunTests( bool fullTest, bool interactive = false );
|
bool RunTests( bool fullTest, bool interactive = false );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
@@ -23,14 +23,14 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
wxPropertyGrid* m_pg;
|
wxPropertyGrid* m_pg;
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(wxID_HIGHEST+1, MyFrame::OnAction)
|
EVT_MENU(wxID_HIGHEST+1, MyFrame::OnAction)
|
||||||
EVT_PG_CHANGED( -1, MyFrame::OnPropertyGridChange )
|
EVT_PG_CHANGED( -1, MyFrame::OnPropertyGridChange )
|
||||||
EVT_PG_CHANGING( -1, MyFrame::OnPropertyGridChanging )
|
EVT_PG_CHANGING( -1, MyFrame::OnPropertyGridChanging )
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyFrame::MyFrame(wxWindow* parent)
|
MyFrame::MyFrame(wxWindow* parent)
|
||||||
: wxFrame(parent, wxID_ANY, wxT("PropertyGrid Test"))
|
: wxFrame(parent, wxID_ANY, wxT("PropertyGrid Test"))
|
||||||
|
@@ -365,7 +365,7 @@ protected:
|
|||||||
virtual void ArraySwap( size_t first, size_t second ) wxOVERRIDE;
|
virtual void ArraySwap( size_t first, size_t second ) wxOVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxArrayDoubleEditorDialog)
|
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxArrayDoubleEditorDialog);
|
||||||
};
|
};
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxArrayDoubleEditorDialog, wxPGArrayEditorDialog)
|
IMPLEMENT_DYNAMIC_CLASS(wxArrayDoubleEditorDialog, wxPGArrayEditorDialog)
|
||||||
|
@@ -174,7 +174,7 @@ public:
|
|||||||
void AddStdKeys();
|
void AddStdKeys();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // #if DO_REGTEST
|
#endif // #if DO_REGTEST
|
||||||
@@ -210,7 +210,7 @@ public:
|
|||||||
|
|
||||||
void OnViewChange (wxCommandEvent& event);
|
void OnViewChange (wxCommandEvent& event);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ enum
|
|||||||
// event tables
|
// event tables
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(RegFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(RegFrame, wxFrame)
|
||||||
EVT_MENU(Menu_Test, RegFrame::OnTest)
|
EVT_MENU(Menu_Test, RegFrame::OnTest)
|
||||||
EVT_MENU(Menu_About, RegFrame::OnAbout)
|
EVT_MENU(Menu_About, RegFrame::OnAbout)
|
||||||
EVT_MENU(Menu_Quit, RegFrame::OnQuit)
|
EVT_MENU(Menu_Quit, RegFrame::OnQuit)
|
||||||
@@ -268,11 +268,11 @@ BEGIN_EVENT_TABLE(RegFrame, wxFrame)
|
|||||||
EVT_MENU(Menu_ViewDefault, RegFrame::OnViewChange)
|
EVT_MENU(Menu_ViewDefault, RegFrame::OnViewChange)
|
||||||
EVT_MENU(Menu_View32, RegFrame::OnViewChange)
|
EVT_MENU(Menu_View32, RegFrame::OnViewChange)
|
||||||
EVT_MENU(Menu_View64, RegFrame::OnViewChange)
|
EVT_MENU(Menu_View64, RegFrame::OnViewChange)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
#if DO_REGTEST
|
#if DO_REGTEST
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(RegTreeCtrl, wxTreeCtrl)
|
wxBEGIN_EVENT_TABLE(RegTreeCtrl, wxTreeCtrl)
|
||||||
EVT_TREE_DELETE_ITEM (Ctrl_RegTree, RegTreeCtrl::OnDeleteItem)
|
EVT_TREE_DELETE_ITEM (Ctrl_RegTree, RegTreeCtrl::OnDeleteItem)
|
||||||
EVT_TREE_ITEM_EXPANDING (Ctrl_RegTree, RegTreeCtrl::OnItemExpanding)
|
EVT_TREE_ITEM_EXPANDING (Ctrl_RegTree, RegTreeCtrl::OnItemExpanding)
|
||||||
EVT_TREE_ITEM_COLLAPSING(Ctrl_RegTree, RegTreeCtrl::OnItemExpanding)
|
EVT_TREE_ITEM_COLLAPSING(Ctrl_RegTree, RegTreeCtrl::OnItemExpanding)
|
||||||
@@ -288,7 +288,7 @@ BEGIN_EVENT_TABLE(RegTreeCtrl, wxTreeCtrl)
|
|||||||
EVT_CHAR (RegTreeCtrl::OnChar)
|
EVT_CHAR (RegTreeCtrl::OnChar)
|
||||||
EVT_RIGHT_DOWN(RegTreeCtrl::OnRightClick)
|
EVT_RIGHT_DOWN(RegTreeCtrl::OnRightClick)
|
||||||
EVT_IDLE (RegTreeCtrl::OnIdle)
|
EVT_IDLE (RegTreeCtrl::OnIdle)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -149,7 +149,7 @@ private:
|
|||||||
class MyPanel *m_panel;
|
class MyPanel *m_panel;
|
||||||
|
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// a very simple class just to have something to draw on
|
// a very simple class just to have something to draw on
|
||||||
@@ -274,12 +274,12 @@ private:
|
|||||||
bool m_useIcon,
|
bool m_useIcon,
|
||||||
m_useBitmap;
|
m_useBitmap;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyPanel, wxPanel)
|
wxBEGIN_EVENT_TABLE(MyPanel, wxPanel)
|
||||||
EVT_PAINT(MyPanel::OnPaint)
|
EVT_PAINT(MyPanel::OnPaint)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// constants
|
// constants
|
||||||
@@ -324,7 +324,7 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(Render_DrawDisabled, MyFrame::OnDrawDisabled)
|
EVT_MENU(Render_DrawDisabled, MyFrame::OnDrawDisabled)
|
||||||
EVT_MENU(Render_DrawFocused, MyFrame::OnDrawFocused)
|
EVT_MENU(Render_DrawFocused, MyFrame::OnDrawFocused)
|
||||||
EVT_MENU(Render_DrawPressed, MyFrame::OnDrawPressed)
|
EVT_MENU(Render_DrawPressed, MyFrame::OnDrawPressed)
|
||||||
@@ -345,7 +345,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MENU(Render_Quit, MyFrame::OnQuit)
|
EVT_MENU(Render_Quit, MyFrame::OnQuit)
|
||||||
|
|
||||||
EVT_MENU(Render_About, MyFrame::OnAbout)
|
EVT_MENU(Render_About, MyFrame::OnAbout)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
|
@@ -169,7 +169,7 @@ protected:
|
|||||||
bool m_bChecked;
|
bool m_bChecked;
|
||||||
wxString m_new_text;
|
wxString m_new_text;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// -- implementations --
|
// -- implementations --
|
||||||
@@ -185,7 +185,7 @@ bool MyApp::OnInit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_RIBBONBUTTONBAR_CLICKED(ID_ENABLE, MyFrame::OnEnable)
|
EVT_RIBBONBUTTONBAR_CLICKED(ID_ENABLE, MyFrame::OnEnable)
|
||||||
EVT_RIBBONBUTTONBAR_CLICKED(ID_DISABLE, MyFrame::OnDisable)
|
EVT_RIBBONBUTTONBAR_CLICKED(ID_DISABLE, MyFrame::OnDisable)
|
||||||
EVT_RIBBONBUTTONBAR_CLICKED(ID_DISABLED, MyFrame::OnDisabled)
|
EVT_RIBBONBUTTONBAR_CLICKED(ID_DISABLED, MyFrame::OnDisabled)
|
||||||
@@ -244,7 +244,7 @@ EVT_RIBBONBUTTONBAR_CLICKED(ID_SHOW_PAGES, MyFrame::OnShowPages)
|
|||||||
EVT_RIBBONBAR_TOGGLED(wxID_ANY, MyFrame::OnRibbonBarToggled)
|
EVT_RIBBONBAR_TOGGLED(wxID_ANY, MyFrame::OnRibbonBarToggled)
|
||||||
EVT_RIBBONBAR_HELP_CLICK(wxID_ANY, MyFrame::OnRibbonBarHelpClicked)
|
EVT_RIBBONBAR_HELP_CLICK(wxID_ANY, MyFrame::OnRibbonBarHelpClicked)
|
||||||
EVT_SIZE(MyFrame::OnSizeEvent)
|
EVT_SIZE(MyFrame::OnSizeEvent)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
#include "align_center.xpm"
|
#include "align_center.xpm"
|
||||||
#include "align_left.xpm"
|
#include "align_left.xpm"
|
||||||
|
@@ -321,7 +321,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
|
|
||||||
MyRichTextCtrl* m_richTextCtrl;
|
MyRichTextCtrl* m_richTextCtrl;
|
||||||
};
|
};
|
||||||
@@ -404,7 +404,7 @@ enum
|
|||||||
// the event tables connect the wxWidgets events with the functions (event
|
// the event tables connect the wxWidgets events with the functions (event
|
||||||
// handlers) which process them. It can be also done at run-time, but for the
|
// handlers) which process them. It can be also done at run-time, but for the
|
||||||
// simple menu events like this the static method is much simpler.
|
// simple menu events like this the static method is much simpler.
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(ID_Quit, MyFrame::OnQuit)
|
EVT_MENU(ID_Quit, MyFrame::OnQuit)
|
||||||
EVT_MENU(ID_About, MyFrame::OnAbout)
|
EVT_MENU(ID_About, MyFrame::OnAbout)
|
||||||
|
|
||||||
@@ -488,7 +488,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
|
|
||||||
EVT_MENU(ID_SET_FONT_SCALE, MyFrame::OnSetFontScale)
|
EVT_MENU(ID_SET_FONT_SCALE, MyFrame::OnSetFontScale)
|
||||||
EVT_MENU(ID_SET_DIMENSION_SCALE, MyFrame::OnSetDimensionScale)
|
EVT_MENU(ID_SET_DIMENSION_SCALE, MyFrame::OnSetDimensionScale)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWidgets to create
|
// Create a new application object: this macro will allow wxWidgets to create
|
||||||
// the application object during program execution (it's better than using a
|
// the application object during program execution (it's better than using a
|
||||||
|
@@ -81,14 +81,14 @@ bool MyApp::OnInit(void)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxMDIParentFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxMDIParentFrame)
|
||||||
EVT_MENU(SASHTEST_ABOUT, MyFrame::OnAbout)
|
EVT_MENU(SASHTEST_ABOUT, MyFrame::OnAbout)
|
||||||
EVT_MENU(SASHTEST_NEW_WINDOW, MyFrame::OnNewWindow)
|
EVT_MENU(SASHTEST_NEW_WINDOW, MyFrame::OnNewWindow)
|
||||||
EVT_SIZE(MyFrame::OnSize)
|
EVT_SIZE(MyFrame::OnSize)
|
||||||
EVT_MENU(SASHTEST_QUIT, MyFrame::OnQuit)
|
EVT_MENU(SASHTEST_QUIT, MyFrame::OnQuit)
|
||||||
EVT_MENU(SASHTEST_TOGGLE_WINDOW, MyFrame::OnToggleWindow)
|
EVT_MENU(SASHTEST_TOGGLE_WINDOW, MyFrame::OnToggleWindow)
|
||||||
EVT_SASH_DRAGGED_RANGE(ID_WINDOW_TOP, ID_WINDOW_BOTTOM, MyFrame::OnSashDrag)
|
EVT_SASH_DRAGGED_RANGE(ID_WINDOW_TOP, ID_WINDOW_BOTTOM, MyFrame::OnSashDrag)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
// Define my frame constructor
|
// Define my frame constructor
|
||||||
@@ -276,9 +276,9 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event))
|
|||||||
subframe->Show(true);
|
subframe->Show(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
wxBEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
||||||
EVT_MOUSE_EVENTS(MyCanvas::OnEvent)
|
EVT_MOUSE_EVENTS(MyCanvas::OnEvent)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Define a constructor for my canvas
|
// Define a constructor for my canvas
|
||||||
MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size)
|
MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size)
|
||||||
@@ -346,9 +346,9 @@ void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event))
|
|||||||
// to the parent window for processing, so no need to
|
// to the parent window for processing, so no need to
|
||||||
// duplicate event handlers here.
|
// duplicate event handlers here.
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyChild, wxMDIChildFrame)
|
wxBEGIN_EVENT_TABLE(MyChild, wxMDIChildFrame)
|
||||||
EVT_MENU(SASHTEST_CHILD_QUIT, MyChild::OnQuit)
|
EVT_MENU(SASHTEST_CHILD_QUIT, MyChild::OnQuit)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyChild::MyChild(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size,
|
MyChild::MyChild(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size,
|
||||||
const long style):
|
const long style):
|
||||||
|
@@ -24,7 +24,7 @@ class MyCanvas: public wxScrolledWindow
|
|||||||
virtual void OnDraw(wxDC& dc) wxOVERRIDE;
|
virtual void OnDraw(wxDC& dc) wxOVERRIDE;
|
||||||
void OnEvent(wxMouseEvent& event);
|
void OnEvent(wxMouseEvent& event);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Define a new frame
|
// Define a new frame
|
||||||
|
@@ -106,7 +106,7 @@ private:
|
|||||||
|
|
||||||
wxButton *m_button;
|
wxButton *m_button;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyCanvasFrame : public wxFrame
|
class MyCanvasFrame : public wxFrame
|
||||||
@@ -588,7 +588,7 @@ private:
|
|||||||
wxFont m_font;
|
wxFont m_font;
|
||||||
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyAutoFrame : public wxFrame
|
class MyAutoFrame : public wxFrame
|
||||||
@@ -629,7 +629,7 @@ private:
|
|||||||
MyScrolledWindowBase *m_win1,
|
MyScrolledWindowBase *m_win1,
|
||||||
*m_win2;
|
*m_win2;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -659,7 +659,7 @@ const wxWindowIDRef ID_QUERYPOS = wxWindow::NewControlId();
|
|||||||
|
|
||||||
const wxWindowIDRef ID_NEWBUTTON = wxWindow::NewControlId();
|
const wxWindowIDRef ID_NEWBUTTON = wxWindow::NewControlId();
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyCanvas, wxScrolled<wxPanel>)
|
wxBEGIN_EVENT_TABLE(MyCanvas, wxScrolled<wxPanel>)
|
||||||
EVT_PAINT( MyCanvas::OnPaint)
|
EVT_PAINT( MyCanvas::OnPaint)
|
||||||
EVT_RIGHT_DOWN( MyCanvas::OnMouseRightDown)
|
EVT_RIGHT_DOWN( MyCanvas::OnMouseRightDown)
|
||||||
EVT_MOUSEWHEEL( MyCanvas::OnMouseWheel)
|
EVT_MOUSEWHEEL( MyCanvas::OnMouseWheel)
|
||||||
@@ -668,7 +668,7 @@ BEGIN_EVENT_TABLE(MyCanvas, wxScrolled<wxPanel>)
|
|||||||
EVT_BUTTON( ID_DELBUTTON, MyCanvas::OnDeleteButton)
|
EVT_BUTTON( ID_DELBUTTON, MyCanvas::OnDeleteButton)
|
||||||
EVT_BUTTON( ID_MOVEBUTTON, MyCanvas::OnMoveButton)
|
EVT_BUTTON( ID_MOVEBUTTON, MyCanvas::OnMoveButton)
|
||||||
EVT_BUTTON( ID_SCROLLWIN, MyCanvas::OnScrollWin)
|
EVT_BUTTON( ID_SCROLLWIN, MyCanvas::OnScrollWin)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyCanvas::MyCanvas(wxWindow *parent)
|
MyCanvas::MyCanvas(wxWindow *parent)
|
||||||
: wxScrolled<wxPanel>(parent, wxID_ANY,
|
: wxScrolled<wxPanel>(parent, wxID_ANY,
|
||||||
@@ -840,7 +840,7 @@ const wxWindowID Scroll_Test_Auto = wxWindow::NewControlId();
|
|||||||
const wxWindowID Scroll_TglBtn_Sync = wxWindow::NewControlId();
|
const wxWindowID Scroll_TglBtn_Sync = wxWindow::NewControlId();
|
||||||
const wxWindowID Scroll_Radio_ShowScrollbar = wxWindow::NewControlId();
|
const wxWindowID Scroll_Radio_ShowScrollbar = wxWindow::NewControlId();
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame,wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame,wxFrame)
|
||||||
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
|
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
|
||||||
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
|
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
|
||||||
|
|
||||||
@@ -852,7 +852,7 @@ BEGIN_EVENT_TABLE(MyFrame,wxFrame)
|
|||||||
|
|
||||||
EVT_TOGGLEBUTTON(Scroll_TglBtn_Sync, MyFrame::OnToggleSync)
|
EVT_TOGGLEBUTTON(Scroll_TglBtn_Sync, MyFrame::OnToggleSync)
|
||||||
EVT_RADIOBOX(Scroll_Radio_ShowScrollbar, MyFrame::OnScrollbarVisibility)
|
EVT_RADIOBOX(Scroll_Radio_ShowScrollbar, MyFrame::OnScrollbarVisibility)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyFrame::MyFrame()
|
MyFrame::MyFrame()
|
||||||
: wxFrame(NULL, wxID_ANY, "wxWidgets scroll sample")
|
: wxFrame(NULL, wxID_ANY, "wxWidgets scroll sample")
|
||||||
@@ -1045,13 +1045,13 @@ void MyScrolledWindowSmart::OnDraw(wxDC& dc)
|
|||||||
// MyAutoScrollingWindow
|
// MyAutoScrollingWindow
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyAutoScrollingWindow, wxScrolled<wxWindow>)
|
wxBEGIN_EVENT_TABLE(MyAutoScrollingWindow, wxScrolled<wxWindow>)
|
||||||
EVT_LEFT_DOWN(MyAutoScrollingWindow::OnMouseLeftDown)
|
EVT_LEFT_DOWN(MyAutoScrollingWindow::OnMouseLeftDown)
|
||||||
EVT_LEFT_UP(MyAutoScrollingWindow::OnMouseLeftUp)
|
EVT_LEFT_UP(MyAutoScrollingWindow::OnMouseLeftUp)
|
||||||
EVT_MOTION(MyAutoScrollingWindow::OnMouseMove)
|
EVT_MOTION(MyAutoScrollingWindow::OnMouseMove)
|
||||||
EVT_MOUSE_CAPTURE_LOST(MyAutoScrollingWindow::OnMouseCaptureLost)
|
EVT_MOUSE_CAPTURE_LOST(MyAutoScrollingWindow::OnMouseCaptureLost)
|
||||||
EVT_SCROLLWIN(MyAutoScrollingWindow::OnScroll)
|
EVT_SCROLLWIN(MyAutoScrollingWindow::OnScroll)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MyAutoScrollingWindow::MyAutoScrollingWindow(wxWindow* parent)
|
MyAutoScrollingWindow::MyAutoScrollingWindow(wxWindow* parent)
|
||||||
: wxScrolled<wxWindow>(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
: wxScrolled<wxWindow>(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||||
|
@@ -93,7 +93,7 @@ private:
|
|||||||
void OnShowEffect(wxCommandEvent& event);
|
void OnShowEffect(wxCommandEvent& event);
|
||||||
void OnExit(wxCommandEvent& event);
|
void OnExit(wxCommandEvent& event);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Define a new frame type: this is going to the frame showing the
|
// Define a new frame type: this is going to the frame showing the
|
||||||
@@ -128,7 +128,7 @@ private:
|
|||||||
wxPoint m_delta;
|
wxPoint m_delta;
|
||||||
|
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Define a new frame type: this is going to the frame showing the
|
// Define a new frame type: this is going to the frame showing the
|
||||||
@@ -156,7 +156,7 @@ private:
|
|||||||
State m_currentState;
|
State m_currentState;
|
||||||
|
|
||||||
// any class wishing to process wxWidgets events must use this macro
|
// any class wishing to process wxWidgets events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class EffectFrame : public wxFrame
|
class EffectFrame : public wxFrame
|
||||||
@@ -250,12 +250,12 @@ bool MyApp::OnInit()
|
|||||||
// main frame
|
// main frame
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MainFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MainFrame, wxFrame)
|
||||||
EVT_MENU(Show_Shaped, MainFrame::OnShowShaped)
|
EVT_MENU(Show_Shaped, MainFrame::OnShowShaped)
|
||||||
EVT_MENU(Show_Transparent, MainFrame::OnShowTransparent)
|
EVT_MENU(Show_Transparent, MainFrame::OnShowTransparent)
|
||||||
EVT_MENU_RANGE(Show_Effect_First, Show_Effect_Last, MainFrame::OnShowEffect)
|
EVT_MENU_RANGE(Show_Effect_First, Show_Effect_Last, MainFrame::OnShowEffect)
|
||||||
EVT_MENU(wxID_EXIT, MainFrame::OnExit)
|
EVT_MENU(wxID_EXIT, MainFrame::OnExit)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
MainFrame::MainFrame()
|
MainFrame::MainFrame()
|
||||||
: wxFrame(NULL, wxID_ANY, "wxWidgets Shaped Sample",
|
: wxFrame(NULL, wxID_ANY, "wxWidgets Shaped Sample",
|
||||||
@@ -370,14 +370,14 @@ void MainFrame::OnExit(wxCommandEvent& WXUNUSED(event))
|
|||||||
// shaped frame
|
// shaped frame
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(ShapedFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(ShapedFrame, wxFrame)
|
||||||
EVT_LEFT_DCLICK(ShapedFrame::OnDoubleClick)
|
EVT_LEFT_DCLICK(ShapedFrame::OnDoubleClick)
|
||||||
EVT_LEFT_DOWN(ShapedFrame::OnLeftDown)
|
EVT_LEFT_DOWN(ShapedFrame::OnLeftDown)
|
||||||
EVT_LEFT_UP(ShapedFrame::OnLeftUp)
|
EVT_LEFT_UP(ShapedFrame::OnLeftUp)
|
||||||
EVT_MOTION(ShapedFrame::OnMouseMove)
|
EVT_MOTION(ShapedFrame::OnMouseMove)
|
||||||
EVT_RIGHT_UP(ShapedFrame::OnExit)
|
EVT_RIGHT_UP(ShapedFrame::OnExit)
|
||||||
EVT_PAINT(ShapedFrame::OnPaint)
|
EVT_PAINT(ShapedFrame::OnPaint)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
// frame constructor
|
// frame constructor
|
||||||
@@ -476,10 +476,10 @@ void ShapedFrame::OnPaint(wxPaintEvent& WXUNUSED(evt))
|
|||||||
// see-through frame
|
// see-through frame
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(SeeThroughFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(SeeThroughFrame, wxFrame)
|
||||||
EVT_LEFT_DCLICK(SeeThroughFrame::OnDoubleClick)
|
EVT_LEFT_DCLICK(SeeThroughFrame::OnDoubleClick)
|
||||||
EVT_PAINT(SeeThroughFrame::OnPaint)
|
EVT_PAINT(SeeThroughFrame::OnPaint)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
SeeThroughFrame::SeeThroughFrame()
|
SeeThroughFrame::SeeThroughFrame()
|
||||||
: wxFrame(NULL, wxID_ANY, "Transparency test: double click here",
|
: wxFrame(NULL, wxID_ANY, "Transparency test: double click here",
|
||||||
|
@@ -71,7 +71,7 @@ WX_DECLARE_LIST(ThreadWorker, TList);
|
|||||||
WX_DECLARE_LIST(EventWorker, EList);
|
WX_DECLARE_LIST(EventWorker, EList);
|
||||||
|
|
||||||
class Client : public wxApp {
|
class Client : public wxApp {
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
public:
|
public:
|
||||||
void RemoveEventWorker(EventWorker* p_worker);
|
void RemoveEventWorker(EventWorker* p_worker);
|
||||||
private:
|
private:
|
||||||
@@ -140,7 +140,7 @@ private:
|
|||||||
|
|
||||||
class EventWorker : public wxEvtHandler
|
class EventWorker : public wxEvtHandler
|
||||||
{
|
{
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
public:
|
public:
|
||||||
EventWorker(const wxString& p_host, char* p_buf, int p_size);
|
EventWorker(const wxString& p_host, char* p_buf, int p_size);
|
||||||
void Run();
|
void Run();
|
||||||
@@ -504,10 +504,10 @@ Client::OnTimerEvent(wxTimerEvent&) {
|
|||||||
dumpStatistics();
|
dumpStatistics();
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(Client,wxEvtHandler)
|
wxBEGIN_EVENT_TABLE(Client,wxEvtHandler)
|
||||||
EVT_WORKER(Client::OnWorkerEvent)
|
EVT_WORKER(Client::OnWorkerEvent)
|
||||||
EVT_TIMER(wxID_ANY,Client::OnTimerEvent)
|
EVT_TIMER(wxID_ANY,Client::OnTimerEvent)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -646,9 +646,9 @@ EventWorker::~EventWorker() {
|
|||||||
delete [] m_inbuf;
|
delete [] m_inbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EventWorker,wxEvtHandler)
|
wxBEGIN_EVENT_TABLE(EventWorker,wxEvtHandler)
|
||||||
EVT_SOCKET(wxID_ANY,EventWorker::OnSocketEvent)
|
EVT_SOCKET(wxID_ANY,EventWorker::OnSocketEvent)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
ThreadWorker::ThreadWorker(const wxString& p_host, char* p_buf, int p_size)
|
ThreadWorker::ThreadWorker(const wxString& p_host, char* p_buf, int p_size)
|
||||||
|
@@ -100,7 +100,7 @@ WX_DECLARE_LIST(EventWorker, EList);
|
|||||||
//and list of two type worker classes that serve clients
|
//and list of two type worker classes that serve clients
|
||||||
class Server : public wxApp
|
class Server : public wxApp
|
||||||
{
|
{
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
public:
|
public:
|
||||||
Server() : m_maxConnections(-1) {}
|
Server() : m_maxConnections(-1) {}
|
||||||
~Server() {}
|
~Server() {}
|
||||||
@@ -197,7 +197,7 @@ private:
|
|||||||
void DoWrite();
|
void DoWrite();
|
||||||
void DoRead();
|
void DoRead();
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************* Implementation ******************/
|
/******************* Implementation ******************/
|
||||||
@@ -473,11 +473,11 @@ void Server::OnTimerEvent(wxTimerEvent&)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(Server,wxEvtHandler)
|
wxBEGIN_EVENT_TABLE(Server,wxEvtHandler)
|
||||||
EVT_SOCKET(wxID_ANY,Server::OnSocketEvent)
|
EVT_SOCKET(wxID_ANY,Server::OnSocketEvent)
|
||||||
EVT_WORKER(Server::OnWorkerEvent)
|
EVT_WORKER(Server::OnWorkerEvent)
|
||||||
EVT_TIMER(wxID_ANY,Server::OnTimerEvent)
|
EVT_TIMER(wxID_ANY,Server::OnTimerEvent)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
ThreadWorker::ThreadWorker(wxSocketBase* pSocket) : wxThread(wxTHREAD_JOINABLE)
|
ThreadWorker::ThreadWorker(wxSocketBase* pSocket) : wxThread(wxTHREAD_JOINABLE)
|
||||||
@@ -759,6 +759,6 @@ void EventWorker::DoWrite()
|
|||||||
while (!m_socket->Error());
|
while (!m_socket->Error());
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EventWorker,wxEvtHandler)
|
wxBEGIN_EVENT_TABLE(EventWorker,wxEvtHandler)
|
||||||
EVT_SOCKET(wxID_ANY,EventWorker::OnSocketEvent)
|
EVT_SOCKET(wxID_ANY,EventWorker::OnSocketEvent)
|
||||||
END_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user