Update indentation in native dialog sample
This commit is contained in:
@@ -39,7 +39,7 @@ bool MyApp::OnInit(void)
|
||||
return false;
|
||||
|
||||
// Create the main frame window
|
||||
MyFrame *frame = new MyFrame(NULL, wxID_ANY, "wxWidgets Native Dialog Sample", wxDefaultPosition, wxDefaultSize);
|
||||
MyFrame* frame = new MyFrame(NULL, wxID_ANY, "wxWidgets Native Dialog Sample", wxDefaultPosition, wxDefaultSize);
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
// Give it a status line
|
||||
@@ -47,12 +47,12 @@ bool MyApp::OnInit(void)
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
// Make a menubar
|
||||
wxMenu *file_menu = new wxMenu;
|
||||
wxMenu* file_menu = new wxMenu;
|
||||
|
||||
file_menu->Append(RESOURCE_TEST1, "&Dialog box test", "Test dialog box resource");
|
||||
file_menu->Append(RESOURCE_QUIT, "E&xit", "Quit program");
|
||||
|
||||
wxMenuBar *menu_bar = new wxMenuBar;
|
||||
wxMenuBar* menu_bar = new wxMenuBar;
|
||||
|
||||
menu_bar->Append(file_menu, "&File");
|
||||
|
||||
@@ -67,12 +67,12 @@ bool MyApp::OnInit(void)
|
||||
}
|
||||
|
||||
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit)
|
||||
EVT_MENU(RESOURCE_TEST1, MyFrame::OnTest1)
|
||||
EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit)
|
||||
EVT_MENU(RESOURCE_TEST1, MyFrame::OnTest1)
|
||||
wxEND_EVENT_TABLE()
|
||||
|
||||
// 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) :
|
||||
wxFrame(parent, id, title, pos, size)
|
||||
{
|
||||
SetIcon(wxICON(sample));
|
||||
@@ -89,12 +89,12 @@ void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
|
||||
MyDialog dialog;
|
||||
if (dialog.LoadNativeDialog(this, "dialog1"))
|
||||
if ( dialog.LoadNativeDialog(this, "dialog1") )
|
||||
{
|
||||
dialog.ShowModal();
|
||||
}
|
||||
#else
|
||||
wxMessageBox("No native dialog support","Platform limitation");
|
||||
wxMessageBox("No native dialog support", "Platform limitation");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -9,18 +9,18 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Define a new application
|
||||
class MyApp: public wxApp
|
||||
class MyApp : public wxApp
|
||||
{
|
||||
public:
|
||||
MyApp(void){}
|
||||
public:
|
||||
MyApp(void) {}
|
||||
bool OnInit(void) wxOVERRIDE;
|
||||
};
|
||||
|
||||
class MyFrame: public wxFrame
|
||||
class MyFrame : public wxFrame
|
||||
{
|
||||
public:
|
||||
wxWindow *panel;
|
||||
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||
public:
|
||||
wxWindow* panel;
|
||||
MyFrame(wxWindow* parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnTest1(wxCommandEvent& event);
|
||||
|
||||
@@ -29,7 +29,7 @@ class MyFrame: public wxFrame
|
||||
|
||||
class MyDialog : public wxDialog
|
||||
{
|
||||
public:
|
||||
public:
|
||||
void OnOk(wxCommandEvent& event);
|
||||
void OnCancel(wxCommandEvent& event);
|
||||
|
||||
|
Reference in New Issue
Block a user