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
35 #include <wx/image.h> // images support
37 //! application headers
38 #include "defsext.h" // Additional definitions
39 #include "edit.h" // Edit module
40 #include "prefs.h" // Prefs
43 //----------------------------------------------------------------------------
45 //----------------------------------------------------------------------------
47 // the application icon (under Windows and OS/2 it is in resources)
48 #if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__)
49 #include "mondrian.xpm"
52 //============================================================================
54 //============================================================================
56 #define APP_NAME _T("STC-Test")
57 #define APP_DESCR _("See http://wxguide.sourceforge.net/indexedit.html")
59 #define APP_MAINT _T("Otto Wyss")
60 #define APP_VENDOR _T("wxWindows")
61 #define APP_COPYRIGTH _T("(C) 2003 Otto Wyss")
62 #define APP_LICENCE _T("wxWindows")
64 #define APP_VERSION _T("0.1.alpha")
65 #define APP_BUILD __DATE__
67 #define APP_WEBSITE _T("http://www.wxWindows.org")
68 #define APP_MAIL _T("mailto://???")
70 #define NONAME _("<untitled>")
75 //----------------------------------------------------------------------------
76 //! global application name
77 wxString
*g_appname
= NULL
;
79 //! global print data, to remember settings during the session
80 wxPrintData
*g_printData
= (wxPrintData
*) NULL
;
81 wxPageSetupData
*g_pageSetupData
= (wxPageSetupData
*) NULL
;
84 //----------------------------------------------------------------------------
85 //! application APP_VENDOR-APP_NAME.
86 class App
: public wxApp
{
87 friend class AppFrame
;
90 //! the main function called durning application start
91 virtual bool OnInit ();
93 //! application exit function
94 virtual int OnExit ();
102 // created dynamically by wxWindows
105 //----------------------------------------------------------------------------
106 //! frame of the application APP_VENDOR-APP_NAME.
107 class AppFrame
: public wxFrame
{
109 friend class AppBook
;
110 friend class AppAbout
;
114 AppFrame (const wxString
&title
);
121 void OnClose (wxCloseEvent
&event
);
122 void OnAbout (wxCommandEvent
&event
);
123 void OnExit (wxCommandEvent
&event
);
124 void OnTimerEvent (wxTimerEvent
&event
);
126 void OnFileNew (wxCommandEvent
&event
);
127 void OnFileNewFrame (wxCommandEvent
&event
);
128 void OnFileOpen (wxCommandEvent
&event
);
129 void OnFileOpenFrame (wxCommandEvent
&event
);
130 void OnFileSave (wxCommandEvent
&event
);
131 void OnFileSaveAs (wxCommandEvent
&event
);
132 void OnFileClose (wxCommandEvent
&event
);
134 void OnProperties (wxCommandEvent
&event
);
136 void OnPrintSetup (wxCommandEvent
&event
);
137 void OnPrintPreview (wxCommandEvent
&event
);
138 void OnPrint (wxCommandEvent
&event
);
140 void OnEdit (wxCommandEvent
&event
);
145 void FileOpen (wxString fname
);
147 //! creates the application menu bar
148 wxMenuBar
*m_menuBar
;
151 // print preview position and size
152 wxRect
DeterminePrintSize ();
154 DECLARE_EVENT_TABLE()
157 //----------------------------------------------------------------------------
158 //! about box of the application APP_VENDOR-APP_NAME
159 class AppAbout
: public wxDialog
{
163 AppAbout (wxWindow
*parent
,
164 int milliseconds
= 0,
171 void OnTimerEvent (wxTimerEvent
&event
);
177 DECLARE_EVENT_TABLE()
181 //============================================================================
183 //============================================================================
187 //----------------------------------------------------------------------------
189 //----------------------------------------------------------------------------
191 bool App::OnInit () {
193 wxInitAllImageHandlers();
195 // set application and vendor name
196 SetAppName (APP_NAME
);
197 SetVendorName (APP_VENDOR
);
198 g_appname
= new wxString ();
199 g_appname
->Append (APP_VENDOR
);
200 g_appname
->Append (_T("-"));
201 g_appname
->Append (APP_NAME
);
203 // initialize print data and setup
204 g_printData
= new wxPrintData
;
205 g_pageSetupData
= new wxPageSetupDialogData
;
207 // create application frame
208 m_frame
= new AppFrame (*g_appname
);
210 // open application frame
212 m_frame
->Show (true);
213 SetTopWindow (m_frame
);
220 // delete global appname
223 // delete global print data and setup
224 if (g_printData
) delete g_printData
;
225 if (g_pageSetupData
) delete g_pageSetupData
;
230 //----------------------------------------------------------------------------
232 //----------------------------------------------------------------------------
234 BEGIN_EVENT_TABLE (AppFrame
, wxFrame
)
236 EVT_CLOSE ( AppFrame::OnClose
)
238 EVT_MENU (wxID_OPEN
, AppFrame::OnFileOpen
)
239 EVT_MENU (wxID_SAVE
, AppFrame::OnFileSave
)
240 EVT_MENU (wxID_SAVEAS
, AppFrame::OnFileSaveAs
)
241 EVT_MENU (wxID_CLOSE
, AppFrame::OnFileClose
)
243 EVT_MENU (myID_PROPERTIES
, AppFrame::OnProperties
)
245 EVT_MENU (wxID_PRINT_SETUP
, AppFrame::OnPrintSetup
)
246 EVT_MENU (wxID_PREVIEW
, AppFrame::OnPrintPreview
)
247 EVT_MENU (wxID_PRINT
, AppFrame::OnPrint
)
248 EVT_MENU (wxID_EXIT
, AppFrame::OnExit
)
250 EVT_MENU (wxID_CLEAR
, AppFrame::OnEdit
)
251 EVT_MENU (wxID_CUT
, AppFrame::OnEdit
)
252 EVT_MENU (wxID_COPY
, AppFrame::OnEdit
)
253 EVT_MENU (wxID_PASTE
, AppFrame::OnEdit
)
254 EVT_MENU (myID_INDENTINC
, AppFrame::OnEdit
)
255 EVT_MENU (myID_INDENTRED
, AppFrame::OnEdit
)
256 EVT_MENU (wxID_SELECTALL
, AppFrame::OnEdit
)
257 EVT_MENU (myID_SELECTLINE
, AppFrame::OnEdit
)
258 EVT_MENU (wxID_REDO
, AppFrame::OnEdit
)
259 EVT_MENU (wxID_UNDO
, AppFrame::OnEdit
)
261 EVT_MENU (wxID_FIND
, AppFrame::OnEdit
)
262 EVT_MENU (myID_FINDNEXT
, AppFrame::OnEdit
)
263 EVT_MENU (myID_REPLACE
, AppFrame::OnEdit
)
264 EVT_MENU (myID_REPLACENEXT
, AppFrame::OnEdit
)
265 EVT_MENU (myID_BRACEMATCH
, AppFrame::OnEdit
)
266 EVT_MENU (myID_GOTO
, AppFrame::OnEdit
)
268 EVT_MENU_RANGE (myID_HILIGHTFIRST
, myID_HILIGHTLAST
,
270 EVT_MENU (myID_DISPLAYEOL
, AppFrame::OnEdit
)
271 EVT_MENU (myID_INDENTGUIDE
, AppFrame::OnEdit
)
272 EVT_MENU (myID_LINENUMBER
, AppFrame::OnEdit
)
273 EVT_MENU (myID_LONGLINEON
, AppFrame::OnEdit
)
274 EVT_MENU (myID_WHITESPACE
, AppFrame::OnEdit
)
275 EVT_MENU (myID_FOLDTOGGLE
, AppFrame::OnEdit
)
276 EVT_MENU (myID_OVERTYPE
, AppFrame::OnEdit
)
277 EVT_MENU (myID_READONLY
, AppFrame::OnEdit
)
278 EVT_MENU (myID_WRAPMODEON
, AppFrame::OnEdit
)
280 EVT_MENU (myID_CHANGELOWER
, AppFrame::OnEdit
)
281 EVT_MENU (myID_CHANGEUPPER
, AppFrame::OnEdit
)
282 EVT_MENU (myID_CONVERTCR
, AppFrame::OnEdit
)
283 EVT_MENU (myID_CONVERTCRLF
, AppFrame::OnEdit
)
284 EVT_MENU (myID_CONVERTLF
, AppFrame::OnEdit
)
285 EVT_MENU (myID_CHARSETANSI
, AppFrame::OnEdit
)
286 EVT_MENU (myID_CHARSETMAC
, AppFrame::OnEdit
)
288 EVT_MENU (wxID_ABOUT
, AppFrame::OnAbout
)
291 AppFrame::AppFrame (const wxString
&title
)
292 : wxFrame ((wxFrame
*)NULL
, -1, title
, wxDefaultPosition
, wxSize(600,400),
293 wxDEFAULT_FRAME_STYLE
| wxNO_FULL_REPAINT_ON_RESIZE
) {
295 // intitialize important variables
298 // set icon and background
299 SetTitle (*g_appname
);
300 SetIcon (wxICON (mondrian
));
301 SetBackgroundColour (_T("WHITE"));
303 // about box shown for 1 seconds
304 AppAbout (this, 1000);
307 m_menuBar
= new wxMenuBar
;
311 m_edit
= new Edit (this, -1);
316 AppFrame::~AppFrame () {
319 // common event handlers
320 void AppFrame::OnClose (wxCloseEvent
&event
) {
323 if (m_edit
&& m_edit
->Modified()) {
324 if (event
.CanVeto()) event
.Veto (true);
330 void AppFrame::OnAbout (wxCommandEvent
&WXUNUSED(event
)) {
334 void AppFrame::OnExit (wxCommandEvent
&WXUNUSED(event
)) {
338 // file event handlers
339 void AppFrame::OnFileOpen (wxCommandEvent
&WXUNUSED(event
)) {
342 wxFileDialog
dlg (this, _T("Open file"), _T(""), _T(""), _T("Any file (*)|*"),
343 wxOPEN
| wxFILE_MUST_EXIST
| wxCHANGE_DIR
);
344 if (dlg
.ShowModal() != wxID_OK
) return;
345 fname
= dlg
.GetPath ();
349 void AppFrame::OnFileSave (wxCommandEvent
&WXUNUSED(event
)) {
351 if (!m_edit
->Modified()) {
352 wxMessageBox (_("There is nothing to save!"), _("Save file"),
353 wxOK
| wxICON_EXCLAMATION
);
359 void AppFrame::OnFileSaveAs (wxCommandEvent
&WXUNUSED(event
)) {
361 wxString filename
= wxEmptyString
;
362 wxFileDialog
dlg (this, _T("Save file"), _T(""), _T(""), _T("Any file (*)|*"), wxSAVE
|wxOVERWRITE_PROMPT
);
363 if (dlg
.ShowModal() != wxID_OK
) return;
364 filename
= dlg
.GetPath();
365 m_edit
->SaveFile (filename
);
368 void AppFrame::OnFileClose (wxCommandEvent
&WXUNUSED(event
)) {
370 if (m_edit
->Modified()) {
371 if (wxMessageBox (_("Text is not saved, save before closing?"), _("Close"),
372 wxYES_NO
| wxICON_QUESTION
) == wxYES
) {
374 if (m_edit
->Modified()) {
375 wxMessageBox (_("Text could not be saved!"), _("Close abort"),
376 wxOK
| wxICON_EXCLAMATION
);
383 // properties event handlers
384 void AppFrame::OnProperties (wxCommandEvent
&WXUNUSED(event
)) {
386 EditProperties (m_edit
, 0);
389 // print event handlers
390 void AppFrame::OnPrintSetup (wxCommandEvent
&WXUNUSED(event
)) {
391 (*g_pageSetupData
) = * g_printData
;
392 wxPageSetupDialog
pageSetupDialog(this, g_pageSetupData
);
393 pageSetupDialog
.ShowModal();
394 (*g_printData
) = pageSetupDialog
.GetPageSetupData().GetPrintData();
395 (*g_pageSetupData
) = pageSetupDialog
.GetPageSetupData();
398 void AppFrame::OnPrintPreview (wxCommandEvent
&WXUNUSED(event
)) {
399 wxPrintDialogData
printDialogData( *g_printData
);
400 wxPrintPreview
*preview
=
401 new wxPrintPreview (new EditPrint (m_edit
),
402 new EditPrint (m_edit
),
404 if (!preview
->Ok()) {
406 wxMessageBox (_("There was a problem with previewing.\n\
407 Perhaps your current printer is not correctly?"),
408 _("Previewing"), wxOK
);
411 wxRect rect
= DeterminePrintSize();
412 wxPreviewFrame
*frame
= new wxPreviewFrame (preview
, this, _("Print Preview"));
413 frame
->SetSize (rect
);
414 frame
->Centre(wxBOTH
);
419 void AppFrame::OnPrint (wxCommandEvent
&WXUNUSED(event
)) {
420 wxPrintDialogData
printDialogData( *g_printData
);
421 wxPrinter
printer (&printDialogData
);
422 EditPrint
printout (m_edit
);
423 if (!printer
.Print (this, &printout
, true)) {
424 if (wxPrinter::GetLastError() == wxPRINTER_ERROR
) {
425 wxMessageBox (_("There was a problem with printing.\n\
426 Perhaps your current printer is not correctly?"),
427 _("Previewing"), wxOK
);
431 (*g_printData
) = printer
.GetPrintDialogData().GetPrintData();
435 void AppFrame::OnEdit (wxCommandEvent
&event
) {
436 if (m_edit
) m_edit
->ProcessEvent (event
);
440 void AppFrame::CreateMenu () {
443 wxMenu
*menuFile
= new wxMenu
;
444 menuFile
->Append (wxID_OPEN
, _("&Open ..\tCtrl+O"));
445 menuFile
->Append (wxID_SAVE
, _("&Save\tCtrl+S"));
446 menuFile
->Append (wxID_SAVEAS
, _("Save &as ..\tCtrl+Shift+S"));
447 menuFile
->Append (wxID_CLOSE
, _("&Close\tCtrl+W"));
448 menuFile
->AppendSeparator();
449 menuFile
->Append (myID_PROPERTIES
, _("Proper&ties ..\tCtrl+I"));
450 menuFile
->AppendSeparator();
451 menuFile
->Append (wxID_PRINT_SETUP
, _("Print Set&up .."));
452 menuFile
->Append (wxID_PREVIEW
, _("Print Pre&view\tCtrl+Shift+P"));
453 menuFile
->Append (wxID_PRINT
, _("&Print ..\tCtrl+P"));
454 menuFile
->AppendSeparator();
455 menuFile
->Append (wxID_EXIT
, _("&Quit\tCtrl+Q"));
458 wxMenu
*menuEdit
= new wxMenu
;
459 menuEdit
->Append (wxID_UNDO
, _("&Undo\tCtrl+Z"));
460 menuEdit
->Append (wxID_REDO
, _("&Redo\tCtrl+Shift+Z"));
461 menuEdit
->AppendSeparator();
462 menuEdit
->Append (wxID_CUT
, _("Cu&t\tCtrl+X"));
463 menuEdit
->Append (wxID_COPY
, _("&Copy\tCtrl+C"));
464 menuEdit
->Append (wxID_PASTE
, _("&Paste\tCtrl+V"));
465 menuEdit
->Append (wxID_CLEAR
, _("&Delete\tDel"));
466 menuEdit
->AppendSeparator();
467 menuEdit
->Append (wxID_FIND
, _("&Find\tCtrl+F"));
468 menuEdit
->Enable (wxID_FIND
, false);
469 menuEdit
->Append (myID_FINDNEXT
, _("Find &next\tF3"));
470 menuEdit
->Enable (myID_FINDNEXT
, false);
471 menuEdit
->Append (myID_REPLACE
, _("&Replace\tCtrl+H"));
472 menuEdit
->Enable (myID_REPLACE
, false);
473 menuEdit
->Append (myID_REPLACENEXT
, _("Replace &again\tShift+F4"));
474 menuEdit
->Enable (myID_REPLACENEXT
, false);
475 menuEdit
->AppendSeparator();
476 menuEdit
->Append (myID_BRACEMATCH
, _("&Match brace\tCtrl+M"));
477 menuEdit
->Append (myID_GOTO
, _("&Goto\tCtrl+G"));
478 menuEdit
->Enable (myID_GOTO
, false);
479 menuEdit
->AppendSeparator();
480 menuEdit
->Append (myID_INDENTINC
, _("&Indent increase\tTab"));
481 menuEdit
->Append (myID_INDENTRED
, _("I&ndent reduce\tBksp"));
482 menuEdit
->AppendSeparator();
483 menuEdit
->Append (wxID_SELECTALL
, _("&Select all\tCtrl+A"));
484 menuEdit
->Append (myID_SELECTLINE
, _("Select &line\tCtrl+L"));
487 wxMenu
*menuHilight
= new wxMenu
;
489 for (Nr
= 0; Nr
< g_LanguagePrefsSize
; Nr
++) {
490 menuHilight
->Append (myID_HILIGHTFIRST
+ Nr
,
491 g_LanguagePrefs
[Nr
].name
);
495 wxMenu
*menuCharset
= new wxMenu
;
496 menuCharset
->Append (myID_CHARSETANSI
, _("&ANSI (Windows)"));
497 menuCharset
->Append (myID_CHARSETMAC
, _("&MAC (Macintosh)"));
500 wxMenu
*menuView
= new wxMenu
;
501 menuView
->Append (myID_HILIGHTLANG
, _("&Hilight language .."), menuHilight
);
502 menuView
->AppendSeparator();
503 menuView
->AppendCheckItem (myID_FOLDTOGGLE
, _("&Toggle current fold\tCtrl+T"));
504 menuView
->AppendCheckItem (myID_OVERTYPE
, _("&Overwrite mode\tIns"));
505 menuView
->AppendCheckItem (myID_WRAPMODEON
, _("&Wrap mode\tCtrl+U"));
506 menuView
->AppendSeparator();
507 menuView
->AppendCheckItem (myID_DISPLAYEOL
, _("Show line &endings"));
508 menuView
->AppendCheckItem (myID_INDENTGUIDE
, _("Show &indent guides"));
509 menuView
->AppendCheckItem (myID_LINENUMBER
, _("Show line &numbers"));
510 menuView
->AppendCheckItem (myID_LONGLINEON
, _("Show &long line marker"));
511 menuView
->AppendCheckItem (myID_WHITESPACE
, _("Show white&space"));
512 menuView
->AppendSeparator();
513 menuView
->Append (myID_USECHARSET
, _("Use &code page of .."), menuCharset
);
515 // change case submenu
516 wxMenu
*menuChangeCase
= new wxMenu
;
517 menuChangeCase
->Append (myID_CHANGEUPPER
, _("&Upper case"));
518 menuChangeCase
->Append (myID_CHANGELOWER
, _("&Lower case"));
520 // convert EOL submenu
521 wxMenu
*menuConvertEOL
= new wxMenu
;
522 menuConvertEOL
->Append (myID_CONVERTCR
, _("CR (&Linux)"));
523 menuConvertEOL
->Append (myID_CONVERTCRLF
, _("CR+LF (&Windows)"));
524 menuConvertEOL
->Append (myID_CONVERTLF
, _("LF (&Macintosh)"));
527 wxMenu
*menuExtra
= new wxMenu
;
528 menuExtra
->AppendCheckItem (myID_READONLY
, _("&Readonly mode"));
529 menuExtra
->AppendSeparator();
530 menuExtra
->Append (myID_CHANGECASE
, _("Change &case to .."), menuChangeCase
);
531 menuExtra
->AppendSeparator();
532 menuExtra
->Append (myID_CONVERTEOL
, _("Convert line &endings to .."), menuConvertEOL
);
535 wxMenu
*menuWindow
= new wxMenu
;
536 menuWindow
->Append (myID_PAGEPREV
, _("&Previous\tCtrl+Shift+Tab"));
537 menuWindow
->Append (myID_PAGENEXT
, _("&Next\tCtrl+Tab"));
540 wxMenu
*menuHelp
= new wxMenu
;
541 menuHelp
->Append (wxID_ABOUT
, _("&About ..\tShift+F1"));
544 m_menuBar
->Append (menuFile
, _("&File"));
545 m_menuBar
->Append (menuEdit
, _("&Edit"));
546 m_menuBar
->Append (menuView
, _("&View"));
547 m_menuBar
->Append (menuExtra
, _("E&xtra"));
548 m_menuBar
->Append (menuWindow
, _("&Window"));
549 m_menuBar
->Append (menuHelp
, _("&Help"));
550 SetMenuBar (m_menuBar
);
554 void AppFrame::FileOpen (wxString fname
) {
555 wxFileName
w(fname
); w
.Normalize(); fname
= w
.GetFullPath();
556 m_edit
->LoadFile (fname
);
559 wxRect
AppFrame::DeterminePrintSize () {
561 wxSize scr
= wxGetDisplaySize();
563 // determine position and size (shifting 16 left and down)
564 wxRect rect
= GetRect();
567 rect
.width
= wxMin (rect
.width
, (scr
.x
- rect
.x
));
568 rect
.height
= wxMin (rect
.height
, (scr
.x
- rect
.y
));
574 //----------------------------------------------------------------------------
576 //----------------------------------------------------------------------------
578 BEGIN_EVENT_TABLE (AppAbout
, wxDialog
)
579 EVT_TIMER (myID_ABOUTTIMER
, AppAbout::OnTimerEvent
)
582 AppAbout::AppAbout (wxWindow
*parent
,
585 : wxDialog (parent
, -1, wxEmptyString
,
586 wxDefaultPosition
, wxDefaultSize
,
587 style
| wxDEFAULT_DIALOG_STYLE
| wxRESIZE_BORDER
) {
591 if (milliseconds
> 0) {
592 m_timer
= new wxTimer (this, myID_ABOUTTIMER
);
593 m_timer
->Start (milliseconds
, wxTIMER_ONE_SHOT
);
596 // sets the application title
597 SetTitle (_("About .."));
600 wxGridSizer
*aboutinfo
= new wxGridSizer (2, 0, 2);
601 aboutinfo
->Add (new wxStaticText(this, -1, _("Written by: ")),
603 aboutinfo
->Add (new wxStaticText(this, -1, APP_MAINT
),
604 1, wxEXPAND
| wxALIGN_LEFT
);
605 aboutinfo
->Add (new wxStaticText(this, -1, _("Version: ")),
607 aboutinfo
->Add (new wxStaticText(this, -1, APP_VERSION
),
608 1, wxEXPAND
| wxALIGN_LEFT
);
609 aboutinfo
->Add (new wxStaticText(this, -1, _("Licence type: ")),
611 aboutinfo
->Add (new wxStaticText(this, -1, APP_LICENCE
),
612 1, wxEXPAND
| wxALIGN_LEFT
);
613 aboutinfo
->Add (new wxStaticText(this, -1, _("Copyright: ")),
615 aboutinfo
->Add (new wxStaticText(this, -1, APP_COPYRIGTH
),
616 1, wxEXPAND
| wxALIGN_LEFT
);
618 // about icontitle//info
619 wxBoxSizer
*aboutpane
= new wxBoxSizer (wxHORIZONTAL
);
620 wxBitmap bitmap
= wxBitmap(wxICON (mondrian
));
621 aboutpane
->Add (new wxStaticBitmap (this, -1, bitmap
),
622 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxRIGHT
, 20);
623 aboutpane
->Add (aboutinfo
, 1, wxEXPAND
);
624 aboutpane
->Add (60, 0);
627 wxBoxSizer
*totalpane
= new wxBoxSizer (wxVERTICAL
);
628 totalpane
->Add (0, 20);
629 wxStaticText
*appname
= new wxStaticText(this, -1, *g_appname
);
630 appname
->SetFont (wxFont (24, wxDEFAULT
, wxNORMAL
, wxBOLD
));
631 totalpane
->Add (appname
, 0, wxALIGN_CENTER
| wxLEFT
| wxRIGHT
, 40);
632 totalpane
->Add (0, 10);
633 totalpane
->Add (aboutpane
, 0, wxEXPAND
| wxALL
, 4);
634 totalpane
->Add (new wxStaticText(this, -1, APP_DESCR
),
635 0, wxALIGN_CENTER
| wxALL
, 10);
636 wxButton
*okButton
= new wxButton (this, wxID_OK
, _("OK"));
637 okButton
->SetDefault();
638 totalpane
->Add (okButton
, 0, wxALIGN_CENTER
| wxLEFT
| wxRIGHT
| wxBOTTOM
, 10);
640 SetSizerAndFit (totalpane
);
646 AppAbout::~AppAbout () {
653 //----------------------------------------------------------------------------
655 void AppAbout::OnTimerEvent (wxTimerEvent
&WXUNUSED(event
)) {
656 if (m_timer
) delete m_timer
;