Various changes to preferences object, file loading, and error logging.
[jben.git] / frame_maingui.h
blob5c7381f8e6f6c1e58cc87ecec316243ef6fd6693
1 /*
2 Project: J-Ben
3 Author: Paul Goins
4 Website: http://www.vultaire.net/software/jben/
5 License: GNU General Public License (GPL) version 2
6 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt)
8 File: frame_maingui.h
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>
24 #ifndef frame_maingui_h
25 #define frame_maingui_h
27 /* Stock wxWidgets includes */
28 #include "wx/wxprec.h"
29 #ifdef __BORLANDC__
30 #pragma hdrstop
31 #endif
32 #ifndef WX_PRECOMP
33 #include "wx/wx.h"
34 #endif
36 #include "dialog_addkanjibygrade.h"
37 #include "dialog_addkanjibyfreq.h"
38 #include "panel_kanjidict.h"
39 #include "panel_worddict.h"
40 #include "panel_kanjidrill.h"
41 #include "panel_kanjilisteditor.h"
42 #include "panel_vocablisteditor.h"
43 #include "panel_config.h"
44 #include "wx/notebook.h"
46 /* This is defined simply to help external code enable/disable GUI menus
47 when necessary. */
48 enum {
49 GUI_menuFile=0,
50 GUI_menuKanji,
51 GUI_menuHelp
54 class FrameMainGUI: public wxFrame {
55 public:
56 FrameMainGUI();
58 void OnClose(wxCloseEvent& event);
60 void OnFileQuit(wxCommandEvent& event);
62 void OnKanjiAddFromFile(wxCommandEvent& event);
63 void OnKanjiAddByGrade(wxCommandEvent& event);
64 void OnKanjiAddByFreq(wxCommandEvent& event);
65 void OnKanjiSaveToFile(wxCommandEvent& event);
66 void OnKanjiClearList(wxCommandEvent& event);
67 void OnKanjiSortByGrade(wxCommandEvent& event);
68 void OnKanjiSortByFreq(wxCommandEvent& event);
69 #ifdef DEBUG
70 void OnKanjiDumpList(wxCommandEvent& event);
71 #endif
72 void OnKanjiSearchKanjiPad(wxCommandEvent& event);
74 void OnHelpAbout(wxCommandEvent& event);
75 void OnHelpLicense(wxCommandEvent& event);
77 void OnTabChanging(wxNotebookEvent& event);
78 void OnMajorTabChanged(wxNotebookEvent& event);
79 void OnMinorTabChanged(wxNotebookEvent& event);
81 void Redraw();
82 private:
83 bool TabChangeHandler(wxNotebookPage *page);
85 wxMenu *kanjiMenu;
86 wxNotebook *tabsMain, *tabsKanji, *tabsWords, *tabsConfig;
87 wxNotebookPage *tabMajor, *tabMinor;
88 PanelKanjiDict *panelKanjiDict;
89 PanelWordDict *panelWordDict;
90 PanelKanjiDrill *panelKanjiDrill;
91 PanelKanjiListEditor *panelKanjiListEditor;
92 PanelVocabListEditor *panelVocabListEditor;
93 PanelConfig *panelConfig;
94 DialogAddKanjiByGrade *dialogAddKanjiByGrade;
95 DialogAddKanjiByFreq *dialogAddKanjiByFreq;
96 DECLARE_EVENT_TABLE()
99 #endif