projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support using GetTextExtent() with empty string to get descent in wxOSX.
[wxWidgets.git]
/
samples
/
minimal
/
minimal.cpp
diff --git
a/samples/minimal/minimal.cpp
b/samples/minimal/minimal.cpp
index cd34c36f20e811bb320584fde7b2eb27d2807b48..a78e462908be84bf2a6acba019340414f7ff813c 100644
(file)
--- a/
samples/minimal/minimal.cpp
+++ b/
samples/minimal/minimal.cpp
@@
-16,10
+16,10
@@
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
-
+
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
-
+
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifdef __BORLANDC__
#pragma hdrstop
#endif
@@
-36,7
+36,7
@@
// the application icon (under Windows and OS/2 it is in resources and even
// though we could still include the XPM here it would be unused)
// the application icon (under Windows and OS/2 it is in resources and even
// though we could still include the XPM here it would be unused)
-#if
!defined(__WXMSW__) && !defined(__WXPM__)
+#if
ndef wxHAS_IMAGES_IN_RESOURCES
#include "../sample.xpm"
#endif
#include "../sample.xpm"
#endif
@@
-99,7
+99,6
@@
enum
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
EVT_MENU(Minimal_About, MyFrame::OnAbout)
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
EVT_MENU(Minimal_About, MyFrame::OnAbout)
- EVT_BUTTON(Minimal_About, MyFrame::OnAbout)
END_EVENT_TABLE()
// Create a new application object: this macro will allow wxWidgets to create
END_EVENT_TABLE()
// Create a new application object: this macro will allow wxWidgets to create
@@
-155,7
+154,7
@@
MyFrame::MyFrame(const wxString& title)
// the "About" item should be in the help menu
wxMenu *helpMenu = new wxMenu;
// the "About" item should be in the help menu
wxMenu *helpMenu = new wxMenu;
- helpMenu->Append(Minimal_About, "&About
...
\tF1", "Show about dialog");
+ helpMenu->Append(Minimal_About, "&About\tF1", "Show about dialog");
fileMenu->Append(Minimal_Quit, "E&xit\tAlt-X", "Quit this program");
fileMenu->Append(Minimal_Quit, "E&xit\tAlt-X", "Quit this program");
@@
-168,11
+167,6
@@
MyFrame::MyFrame(const wxString& title)
SetMenuBar(menuBar);
#endif // wxUSE_MENUS
SetMenuBar(menuBar);
#endif // wxUSE_MENUS
- wxSizer * const sizer = new wxBoxSizer(wxVERTICAL);
- sizer->Add(new wxButton(this, wxID_ABOUT));
- sizer->Add(new wxButton(this, wxID_OPEN));
- SetSizer(sizer);
-
#if wxUSE_STATUSBAR
// create a status bar just for fun (by default with 1 pane only)
CreateStatusBar(2);
#if wxUSE_STATUSBAR
// create a status bar just for fun (by default with 1 pane only)
CreateStatusBar(2);
@@
-191,9
+185,6
@@
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
- wxGetTextFromUser("Your text?");
-
-#if 0
wxMessageBox(wxString::Format
(
"Welcome to %s!\n"
wxMessageBox(wxString::Format
(
"Welcome to %s!\n"
@@
-206,5
+197,4
@@
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
"About wxWidgets minimal sample",
wxOK | wxICON_INFORMATION,
this);
"About wxWidgets minimal sample",
wxOK | wxICON_INFORMATION,
this);
-#endif
}
}