1 //////////////////////////////////////////////////////////////////////////////
3 // Purpose: STC test application
4 // Maintainer: Otto Wyss
7 // Copyright: (c) wxGuide
8 // Licence: wxWindows licence
9 //////////////////////////////////////////////////////////////////////////////
11 //----------------------------------------------------------------------------
13 //----------------------------------------------------------------------------
15 // For compilers that support precompilation, includes <wx/wx.h>.
16 #include <wx/wxprec.h>
22 // for all others, include the necessary headers (this file is usually all you
23 // need because it includes almost all 'standard' wxWindows headers)
29 #include <wx/config.h> // configuration support
30 #include <wx/filedlg.h> // file dialog support
31 #include <wx/filename.h> // filename support
32 #include <wx/notebook.h> // notebook support
33 #include <wx/settings.h> // system settings
34 #include <wx/string.h> // strings support
36 //! application headers
37 #include "defsext.h" // Additional definitions
38 #include "edit.h" // Edit module
39 #include "prefs.h" // Prefs
42 //----------------------------------------------------------------------------
44 //----------------------------------------------------------------------------
46 // the application icon (under Windows and OS/2 it is in resources)
47 #if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__)
48 #include "mondrian.xpm"
51 //============================================================================
53 //============================================================================
55 #define APP_NAME _T("STC-Test")
56 #define APP_DESCR _("See http://wxguide.sourceforge.net/indexedit.html")
58 #define APP_MAINT _T("Otto Wyss")
59 #define APP_VENDOR _T("wxWindows")
60 #define APP_COPYRIGTH _T("(C) 2003 Otto Wyss")
61 #define APP_LICENCE _T("wxWindows")
63 #define APP_VERSION _T("0.1.alpha")
64 #define APP_BUILD __DATE__
66 #define APP_WEBSITE _T("http://www.wxWindows.org")
67 #define APP_MAIL _T("mailto://???")
69 #define NONAME _("<untitled>")
74 //----------------------------------------------------------------------------
75 //! global application name
76 wxString
*g_appname
= NULL
;
78 //! global print data, to remember settings during the session
79 wxPrintData
*g_printData
= (wxPrintData
*) NULL
;
80 wxPageSetupData
*g_pageSetupData
= (wxPageSetupData
*) NULL
;
83 //----------------------------------------------------------------------------
84 //! application APP_VENDOR-APP_NAME.
85 class App
: public wxApp
{
86 friend class AppFrame
;
89 //! the main function called durning application start
90 virtual bool OnInit ();
92 //! application exit function
93 virtual int OnExit ();
101 // created dynamically by wxWindows
104 //----------------------------------------------------------------------------
105 //! frame of the application APP_VENDOR-APP_NAME.
106 class AppFrame
: public wxFrame
{
108 friend class AppBook
;
109 friend class AppAbout
;
113 AppFrame (const wxString
&title
);
120 void OnClose (wxCloseEvent
&event
);
121 void OnAbout (wxCommandEvent
&event
);
122 void OnExit (wxCommandEvent
&event
);
123 void OnTimerEvent (wxTimerEvent
&event
);
125 void OnFileNew (wxCommandEvent
&event
);
126 void OnFileNewFrame (wxCommandEvent
&event
);
127 void OnFileOpen (wxCommandEvent
&event
);
128 void OnFileOpenFrame (wxCommandEvent
&event
);
129 void OnFileSave (wxCommandEvent
&event
);
130 void OnFileSaveAs (wxCommandEvent
&event
);
131 void OnFileClose (wxCommandEvent
&event
);
133 void OnProperties (wxCommandEvent
&event
);
135 void OnPrintSetup (wxCommandEvent
&event
);
136 void OnPrintPreview (wxCommandEvent
&event
);
137 void OnPrint (wxCommandEvent
&event
);
139 void OnEdit (wxCommandEvent
&event
);
144 void FileOpen (wxString fname
);
146 //! creates the application menu bar
147 wxMenuBar
*m_menuBar
;
150 // print preview position and size
151 wxRect
DeterminePrintSize ();
153 DECLARE_EVENT_TABLE()
156 //----------------------------------------------------------------------------
157 //! about box of the application APP_VENDOR-APP_NAME
158 class AppAbout
: public wxDialog
{
162 AppAbout (wxWindow
*parent
,
163 int milliseconds
= 0,
170 void OnTimerEvent (wxTimerEvent
&event
);
176 DECLARE_EVENT_TABLE()
180 //============================================================================
182 //============================================================================
186 //----------------------------------------------------------------------------
188 //----------------------------------------------------------------------------
190 bool App::OnInit () {
192 wxInitAllImageHandlers();
194 // set application and vendor name
195 SetAppName (APP_NAME
);
196 SetVendorName (APP_VENDOR
);
197 g_appname
= new wxString ();
198 g_appname
->Append (APP_VENDOR
);
199 g_appname
->Append (_T("-"));
200 g_appname
->Append (APP_NAME
);
202 // initialize print data and setup
203 g_printData
= new wxPrintData
;
204 g_pageSetupData
= new wxPageSetupDialogData
;
206 // create application frame
207 m_frame
= new AppFrame (*g_appname
);
209 // open application frame
211 m_frame
->Show (true);
212 SetTopWindow (m_frame
);
219 // delete global appname
222 // delete global print data and setup
223 if (g_printData
) delete g_printData
;
224 if (g_pageSetupData
) delete g_pageSetupData
;
229 //----------------------------------------------------------------------------
231 //----------------------------------------------------------------------------
233 BEGIN_EVENT_TABLE (AppFrame
, wxFrame
)
235 EVT_CLOSE ( AppFrame::OnClose
)
237 EVT_MENU (wxID_OPEN
, AppFrame::OnFileOpen
)
238 EVT_MENU (wxID_SAVE
, AppFrame::OnFileSave
)
239 EVT_MENU (wxID_SAVEAS
, AppFrame::OnFileSaveAs
)
240 EVT_MENU (wxID_CLOSE
, AppFrame::OnFileClose
)
242 EVT_MENU (myID_PROPERTIES
, AppFrame::OnProperties
)
244 EVT_MENU (wxID_PRINT_SETUP
, AppFrame::OnPrintSetup
)
245 EVT_MENU (wxID_PREVIEW
, AppFrame::OnPrintPreview
)
246 EVT_MENU (wxID_PRINT
, AppFrame::OnPrint
)
247 EVT_MENU (wxID_EXIT
, AppFrame::OnExit
)
249 EVT_MENU (wxID_CLEAR
, AppFrame::OnEdit
)
250 EVT_MENU (wxID_CUT
, AppFrame::OnEdit
)
251 EVT_MENU (wxID_COPY
, AppFrame::OnEdit
)
252 EVT_MENU (wxID_PASTE
, AppFrame::OnEdit
)
253 EVT_MENU (myID_INDENTINC
, AppFrame::OnEdit
)
254 EVT_MENU (myID_INDENTRED
, AppFrame::OnEdit
)
255 EVT_MENU (wxID_SELECTALL
, AppFrame::OnEdit
)
256 EVT_MENU (myID_SELECTLINE
, AppFrame::OnEdit
)
257 EVT_MENU (wxID_REDO
, AppFrame::OnEdit
)
258 EVT_MENU (wxID_UNDO
, AppFrame::OnEdit
)
260 EVT_MENU (wxID_FIND
, AppFrame::OnEdit
)
261 EVT_MENU (myID_FINDNEXT
, AppFrame::OnEdit
)
262 EVT_MENU (myID_REPLACE
, AppFrame::OnEdit
)
263 EVT_MENU (myID_REPLACENEXT
, AppFrame::OnEdit
)
264 EVT_MENU (myID_BRACEMATCH
, AppFrame::OnEdit
)
265 EVT_MENU (myID_GOTO
, AppFrame::OnEdit
)
267 EVT_MENU_RANGE (myID_HILIGHTFIRST
, myID_HILIGHTLAST
,
269 EVT_MENU (myID_DISPLAYEOL
, AppFrame::OnEdit
)
270 EVT_MENU (myID_INDENTGUIDE
, AppFrame::OnEdit
)
271 EVT_MENU (myID_LINENUMBER
, AppFrame::OnEdit
)
272 EVT_MENU (myID_LONGLINEON
, AppFrame::OnEdit
)
273 EVT_MENU (myID_WHITESPACE
, AppFrame::OnEdit
)
274 EVT_MENU (myID_FOLDTOGGLE
, AppFrame::OnEdit
)
275 EVT_MENU (myID_OVERTYPE
, AppFrame::OnEdit
)
276 EVT_MENU (myID_READONLY
, AppFrame::OnEdit
)
277 EVT_MENU (myID_WRAPMODEON
, AppFrame::OnEdit
)
279 EVT_MENU (myID_CHANGELOWER
, AppFrame::OnEdit
)
280 EVT_MENU (myID_CHANGEUPPER
, AppFrame::OnEdit
)
281 EVT_MENU (myID_CONVERTCR
, AppFrame::OnEdit
)
282 EVT_MENU (myID_CONVERTCRLF
, AppFrame::OnEdit
)
283 EVT_MENU (myID_CONVERTLF
, AppFrame::OnEdit
)
284 EVT_MENU (myID_CHARSETANSI
, AppFrame::OnEdit
)
285 EVT_MENU (myID_CHARSETMAC
, AppFrame::OnEdit
)
287 EVT_MENU (wxID_ABOUT
, AppFrame::OnAbout
)
290 AppFrame::AppFrame (const wxString
&title
)
291 : wxFrame ((wxFrame
*)NULL
, -1, title
, wxDefaultPosition
, wxSize(600,400),
292 wxDEFAULT_FRAME_STYLE
| wxNO_FULL_REPAINT_ON_RESIZE
) {
294 // intitialize important variables
297 // set icon and background
298 SetTitle (*g_appname
);
299 SetIcon (wxICON (mondrian
));
300 SetBackgroundColour (_T("WHITE"));
302 // about box shown for 1 seconds
303 AppAbout (this, 1000);
306 m_menuBar
= new wxMenuBar
;
310 m_edit
= new Edit (this, -1);
315 AppFrame::~AppFrame () {
318 // common event handlers
319 void AppFrame::OnClose (wxCloseEvent
&event
) {
322 if (m_edit
&& m_edit
->Modified()) {
323 if (event
.CanVeto()) event
.Veto (true);
329 void AppFrame::OnAbout (wxCommandEvent
&WXUNUSED(event
)) {
333 void AppFrame::OnExit (wxCommandEvent
&WXUNUSED(event
)) {
337 // file event handlers
338 void AppFrame::OnFileOpen (wxCommandEvent
&WXUNUSED(event
)) {
341 wxFileDialog
dlg (this, _T("Open file"), _T(""), _T(""), _T("Any file (*)|*"),
342 wxOPEN
| wxFILE_MUST_EXIST
| wxCHANGE_DIR
);
343 if (dlg
.ShowModal() != wxID_OK
) return;
344 fname
= dlg
.GetPath ();
348 void AppFrame::OnFileSave (wxCommandEvent
&WXUNUSED(event
)) {
350 if (!m_edit
->Modified()) {
351 wxMessageBox (_("There is nothing to save!"), _("Save file"),
352 wxOK
| wxICON_EXCLAMATION
);
358 void AppFrame::OnFileSaveAs (wxCommandEvent
&WXUNUSED(event
)) {
360 wxString filename
= wxEmptyString
;
361 wxFileDialog
dlg (this, _T("Save file"), _T(""), _T(""), _T("Any file (*)|*"), wxSAVE
|wxOVERWRITE_PROMPT
);
362 if (dlg
.ShowModal() != wxID_OK
) return;
363 filename
= dlg
.GetPath();
364 m_edit
->SaveFile (filename
);
367 void AppFrame::OnFileClose (wxCommandEvent
&WXUNUSED(event
)) {
369 if (m_edit
->Modified()) {
370 if (wxMessageBox (_("Text is not saved, save before closing?"), _("Close"),
371 wxYES_NO
| wxICON_QUESTION
) == wxYES
) {
373 if (m_edit
->Modified()) {
374 wxMessageBox (_("Text could not be saved!"), _("Close abort"),
375 wxOK
| wxICON_EXCLAMATION
);
382 // properties event handlers
383 void AppFrame::OnProperties (wxCommandEvent
&WXUNUSED(event
)) {
385 EditProperties (m_edit
, 0);
388 // print event handlers
389 void AppFrame::OnPrintSetup (wxCommandEvent
&WXUNUSED(event
)) {
390 (*g_pageSetupData
) = * g_printData
;
391 wxPageSetupDialog
pageSetupDialog(this, g_pageSetupData
);
392 pageSetupDialog
.ShowModal();
393 (*g_printData
) = pageSetupDialog
.GetPageSetupData().GetPrintData();
394 (*g_pageSetupData
) = pageSetupDialog
.GetPageSetupData();
397 void AppFrame::OnPrintPreview (wxCommandEvent
&WXUNUSED(event
)) {
398 wxPrintDialogData
printDialogData( *g_printData
);
399 wxPrintPreview
*preview
=
400 new wxPrintPreview (new EditPrint (m_edit
),
401 new EditPrint (m_edit
),
403 if (!preview
->Ok()) {
405 wxMessageBox (_("There was a problem with previewing.\n\
406 Perhaps your current printer is not correctly?"),
407 _("Previewing"), wxOK
);
410 wxRect rect
= DeterminePrintSize();
411 wxPreviewFrame
*frame
= new wxPreviewFrame (preview
, this, _("Print Preview"));
412 frame
->SetSize (rect
);
413 frame
->Centre(wxBOTH
);
418 void AppFrame::OnPrint (wxCommandEvent
&WXUNUSED(event
)) {
419 wxPrintDialogData
printDialogData( *g_printData
);
420 wxPrinter
printer (&printDialogData
);
421 EditPrint
printout (m_edit
);
422 if (!printer
.Print (this, &printout
, true)) {
423 if (wxPrinter::GetLastError() == wxPRINTER_ERROR
) {
424 wxMessageBox (_("There was a problem with printing.\n\
425 Perhaps your current printer is not correctly?"),
426 _("Previewing"), wxOK
);
430 (*g_printData
) = printer
.GetPrintDialogData().GetPrintData();
434 void AppFrame::OnEdit (wxCommandEvent
&event
) {
435 if (m_edit
) m_edit
->ProcessEvent (event
);
439 void AppFrame::CreateMenu () {
442 wxMenu
*menuFile
= new wxMenu
;
443 menuFile
->Append (wxID_OPEN
, _("&Open ..\tCtrl+O"));
444 menuFile
->Append (wxID_SAVE
, _("&Save\tCtrl+S"));
445 menuFile
->Append (wxID_SAVEAS
, _("Save &as ..\tCtrl+Shift+S"));
446 menuFile
->Append (wxID_CLOSE
, _("&Close\tCtrl+W"));
447 menuFile
->AppendSeparator();
448 menuFile
->Append (myID_PROPERTIES
, _("Proper&ties ..\tCtrl+I"));
449 menuFile
->AppendSeparator();
450 menuFile
->Append (wxID_PRINT_SETUP
, _("Print Set&up .."));
451 menuFile
->Append (wxID_PREVIEW
, _("Print Pre&view\tCtrl+Shift+P"));
452 menuFile
->Append (wxID_PRINT
, _("&Print ..\tCtrl+P"));
453 menuFile
->AppendSeparator();
454 menuFile
->Append (wxID_EXIT
, _("&Quit\tCtrl+Q"));
457 wxMenu
*menuEdit
= new wxMenu
;
458 menuEdit
->Append (wxID_UNDO
, _("&Undo\tCtrl+Z"));
459 menuEdit
->Append (wxID_REDO
, _("&Redo\tCtrl+Shift+Z"));
460 menuEdit
->AppendSeparator();
461 menuEdit
->Append (wxID_CUT
, _("Cu&t\tCtrl+X"));
462 menuEdit
->Append (wxID_COPY
, _("&Copy\tCtrl+C"));
463 menuEdit
->Append (wxID_PASTE
, _("&Paste\tCtrl+V"));
464 menuEdit
->Append (wxID_CLEAR
, _("&Delete\tDel"));
465 menuEdit
->AppendSeparator();
466 menuEdit
->Append (wxID_FIND
, _("&Find\tCtrl+F"));
467 menuEdit
->Enable (wxID_FIND
, false);
468 menuEdit
->Append (myID_FINDNEXT
, _("Find &next\tF3"));
469 menuEdit
->Enable (myID_FINDNEXT
, false);
470 menuEdit
->Append (myID_REPLACE
, _("&Replace\tCtrl+H"));
471 menuEdit
->Enable (myID_REPLACE
, false);
472 menuEdit
->Append (myID_REPLACENEXT
, _("Replace &again\tShift+F4"));
473 menuEdit
->Enable (myID_REPLACENEXT
, false);
474 menuEdit
->AppendSeparator();
475 menuEdit
->Append (myID_BRACEMATCH
, _("&Match brace\tCtrl+M"));
476 menuEdit
->Append (myID_GOTO
, _("&Goto\tCtrl+G"));
477 menuEdit
->Enable (myID_GOTO
, false);
478 menuEdit
->AppendSeparator();
479 menuEdit
->Append (myID_INDENTINC
, _("&Indent increase\tTab"));
480 menuEdit
->Append (myID_INDENTRED
, _("I&ndent reduce\tBksp"));
481 menuEdit
->AppendSeparator();
482 menuEdit
->Append (wxID_SELECTALL
, _("&Select all\tCtrl+A"));
483 menuEdit
->Append (myID_SELECTLINE
, _("Select &line\tCtrl+L"));
486 wxMenu
*menuHilight
= new wxMenu
;
488 for (Nr
= 0; Nr
< g_LanguagePrefsSize
; Nr
++) {
489 menuHilight
->Append (myID_HILIGHTFIRST
+ Nr
,
490 g_LanguagePrefs
[Nr
].name
);
494 wxMenu
*menuCharset
= new wxMenu
;
495 menuCharset
->Append (myID_CHARSETANSI
, _("&ANSI (Windows)"));
496 menuCharset
->Append (myID_CHARSETMAC
, _("&MAC (Macintosh)"));
499 wxMenu
*menuView
= new wxMenu
;
500 menuView
->Append (myID_HILIGHTLANG
, _("&Hilight language .."), menuHilight
);
501 menuView
->AppendSeparator();
502 menuView
->AppendCheckItem (myID_FOLDTOGGLE
, _("&Toggle current fold\tCtrl+T"));
503 menuView
->AppendCheckItem (myID_OVERTYPE
, _("&Overwrite mode\tIns"));
504 menuView
->AppendCheckItem (myID_WRAPMODEON
, _("&Wrap mode\tCtrl+U"));
505 menuView
->AppendSeparator();
506 menuView
->AppendCheckItem (myID_DISPLAYEOL
, _("Show line &endings"));
507 menuView
->AppendCheckItem (myID_INDENTGUIDE
, _("Show &indent guides"));
508 menuView
->AppendCheckItem (myID_LINENUMBER
, _("Show line &numbers"));
509 menuView
->AppendCheckItem (myID_LONGLINEON
, _("Show &long line marker"));
510 menuView
->AppendCheckItem (myID_WHITESPACE
, _("Show white&space"));
511 menuView
->AppendSeparator();
512 menuView
->Append (myID_USECHARSET
, _("Use &code page of .."), menuCharset
);
514 // change case submenu
515 wxMenu
*menuChangeCase
= new wxMenu
;
516 menuChangeCase
->Append (myID_CHANGEUPPER
, _("&Upper case"));
517 menuChangeCase
->Append (myID_CHANGELOWER
, _("&Lower case"));
519 // convert EOL submenu
520 wxMenu
*menuConvertEOL
= new wxMenu
;
521 menuConvertEOL
->Append (myID_CONVERTCR
, _("CR (&Linux)"));
522 menuConvertEOL
->Append (myID_CONVERTCRLF
, _("CR+LF (&Windows)"));
523 menuConvertEOL
->Append (myID_CONVERTLF
, _("LF (&Macintosh)"));
526 wxMenu
*menuExtra
= new wxMenu
;
527 menuExtra
->AppendCheckItem (myID_READONLY
, _("&Readonly mode"));
528 menuExtra
->AppendSeparator();
529 menuExtra
->Append (myID_CHANGECASE
, _("Change &case to .."), menuChangeCase
);
530 menuExtra
->AppendSeparator();
531 menuExtra
->Append (myID_CONVERTEOL
, _("Convert line &endings to .."), menuConvertEOL
);
534 wxMenu
*menuWindow
= new wxMenu
;
535 menuWindow
->Append (myID_PAGEPREV
, _("&Previous\tCtrl+Shift+Tab"));
536 menuWindow
->Append (myID_PAGENEXT
, _("&Next\tCtrl+Tab"));
539 wxMenu
*menuHelp
= new wxMenu
;
540 menuHelp
->Append (wxID_ABOUT
, _("&About ..\tShift+F1"));
543 m_menuBar
->Append (menuFile
, _("&File"));
544 m_menuBar
->Append (menuEdit
, _("&Edit"));
545 m_menuBar
->Append (menuView
, _("&View"));
546 m_menuBar
->Append (menuExtra
, _("E&xtra"));
547 m_menuBar
->Append (menuWindow
, _("&Window"));
548 m_menuBar
->Append (menuHelp
, _("&Help"));
549 SetMenuBar (m_menuBar
);
553 void AppFrame::FileOpen (wxString fname
) {
554 wxFileName
w(fname
); w
.Normalize(); fname
= w
.GetFullPath();
555 m_edit
->LoadFile (fname
);
558 wxRect
AppFrame::DeterminePrintSize () {
560 wxSize scr
= wxGetDisplaySize();
562 // determine position and size (shifting 16 left and down)
563 wxRect rect
= GetRect();
566 rect
.width
= wxMin (rect
.width
, (scr
.x
- rect
.x
));
567 rect
.height
= wxMin (rect
.height
, (scr
.x
- rect
.y
));
573 //----------------------------------------------------------------------------
575 //----------------------------------------------------------------------------
577 BEGIN_EVENT_TABLE (AppAbout
, wxDialog
)
578 EVT_TIMER (myID_ABOUTTIMER
, AppAbout::OnTimerEvent
)
581 AppAbout::AppAbout (wxWindow
*parent
,
584 : wxDialog (parent
, -1, wxEmptyString
,
585 wxDefaultPosition
, wxDefaultSize
,
586 wxDEFAULT_DIALOG_STYLE
| wxRESIZE_BORDER
) {
590 if (milliseconds
> 0) {
591 m_timer
= new wxTimer (this, myID_ABOUTTIMER
);
592 m_timer
->Start (milliseconds
, wxTIMER_ONE_SHOT
);
595 // sets the application title
596 SetTitle (_("About .."));
599 wxGridSizer
*aboutinfo
= new wxGridSizer (2, 0, 2);
600 aboutinfo
->Add (new wxStaticText(this, -1, _("Written by: ")),
602 aboutinfo
->Add (new wxStaticText(this, -1, APP_MAINT
),
603 1, wxEXPAND
| wxALIGN_LEFT
);
604 aboutinfo
->Add (new wxStaticText(this, -1, _("Version: ")),
606 aboutinfo
->Add (new wxStaticText(this, -1, APP_VERSION
),
607 1, wxEXPAND
| wxALIGN_LEFT
);
608 aboutinfo
->Add (new wxStaticText(this, -1, _("Licence type: ")),
610 aboutinfo
->Add (new wxStaticText(this, -1, APP_LICENCE
),
611 1, wxEXPAND
| wxALIGN_LEFT
);
612 aboutinfo
->Add (new wxStaticText(this, -1, _("Copyright: ")),
614 aboutinfo
->Add (new wxStaticText(this, -1, APP_COPYRIGTH
),
615 1, wxEXPAND
| wxALIGN_LEFT
);
617 // about icontitle//info
618 wxBoxSizer
*aboutpane
= new wxBoxSizer (wxHORIZONTAL
);
619 wxBitmap bitmap
= wxBitmap(wxICON (mondrian
));
620 aboutpane
->Add (new wxStaticBitmap (this, -1, bitmap
),
621 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxRIGHT
, 20);
622 aboutpane
->Add (aboutinfo
, 1, wxEXPAND
);
623 aboutpane
->Add (60, 0);
626 wxBoxSizer
*totalpane
= new wxBoxSizer (wxVERTICAL
);
627 totalpane
->Add (0, 20);
628 wxStaticText
*appname
= new wxStaticText(this, -1, *g_appname
);
629 appname
->SetFont (wxFont (24, wxDEFAULT
, wxNORMAL
, wxBOLD
));
630 totalpane
->Add (appname
, 0, wxALIGN_CENTER
| wxLEFT
| wxRIGHT
, 40);
631 totalpane
->Add (0, 10);
632 totalpane
->Add (aboutpane
, 0, wxEXPAND
| wxALL
, 4);
633 totalpane
->Add (new wxStaticText(this, -1, APP_DESCR
),
634 0, wxALIGN_CENTER
| wxALL
, 10);
635 wxButton
*okButton
= new wxButton (this, wxID_OK
, _("OK"));
636 okButton
->SetDefault();
637 totalpane
->Add (okButton
, 0, wxALIGN_CENTER
| wxLEFT
| wxRIGHT
| wxBOTTOM
, 10);
639 SetSizerAndFit (totalpane
);
645 AppAbout::~AppAbout () {
652 //----------------------------------------------------------------------------
654 void AppAbout::OnTimerEvent (wxTimerEvent
&event
) {
655 if (m_timer
) delete m_timer
;