Committing long uncommited changes
[jben.git] / src / dialog_config.h
blobeafd7b91c42307c7f4285f78cd35e339f5851215
1 /*
2 Project: J-Ben
3 Website: http://www.vultaire.net/software/jben/
4 License: GNU General Public License (GPL) version 2
5 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt)
7 File: dialog_config.h
8 Author: Paul Goins
9 Contributors: Alain Bertrand
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>
25 #ifndef dialog_config_h
26 #define dialog_config_h
28 #include "config_kanji_test.h"
29 #include "widget_storeddialog.h"
30 #include <gtkmm/checkbutton.h>
31 #include <gtkmm/button.h>
32 #include <gtkmm/table.h>
33 #include <gtkmm/textview.h>
34 #include <gtkmm/label.h>
35 #include <gtkmm/frame.h>
36 #include <vector>
37 #include <string>
39 class DialogConfig : public StoredDialog {
40 public:
41 DialogConfig(Gtk::Window& parent);
42 void Update();
43 void UpdateFontControl(Gtk::TextView& tvEnNormal,
44 const std::string& sFontEnNormal);
45 private:
46 void OnCancel();
47 void OnApply();
48 void OnOK();
50 void OnDictionaryToggle();
51 void OnFontChange(Gtk::Button* src);
52 void OnMobileToggle();
54 /* Kanji Dictionary Configuration */
55 Gtk::CheckButton chkReadings, chkMeanings, chkHighImp, chkMultiRad, chkDict,
56 chkVocabCrossRef, chkLowImp, chkSodStatic, chkSodAnim;
57 std::vector<Gtk::CheckButton*> vChkDict;
58 Gtk::VBox vbDicts;
59 /* Kanji Test Configuration */
60 ConfigKanjiTest ckt;
61 /* Font Config */
62 Gtk::Table tblFonts;
63 Gtk::Frame frJaNormal, frJaLarge, frEnNormal, frEnSmall;
64 Gtk::TextView tvJaNormal, tvJaLarge, tvEnNormal, tvEnSmall;
65 Gtk::Label lblJaNormal, lblJaLarge, lblEnNormal, lblEnSmall;
66 Gtk::Button btnJaNormal, btnJaLarge, btnEnNormal, btnEnSmall;
67 std::string sFontJaNormal, sFontJaLarge, sFontEnNormal, sFontEnSmall;
68 /* Other Options */
69 Gtk::CheckButton chkMobile;
70 /* Buttons */
71 Gtk::Button btnCancel, btnOK;
74 #endif