The Gnome Chemistry Utils  0.14.0
preferences.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  * GChemPaint library
5  * preferences.h
6  *
7  * Copyright (C) 2006-2011 Jean Bréfort <jean.brefort@normalesup.org>
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License as
11  * published by the Free Software Foundation; either version 3 of the
12  * License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
22  * USA
23  */
24 
25 #ifndef GCP_PREFERENCES_H
26 #define GCP_PREFERENCES_H
27 
30 #include "fontsel.h"
31 #include <gcugtk/dialog.h>
32 #include <gcu/object.h>
33 #include <gcu/macros.h>
34 
36 namespace gcp {
37 
38 class Application;
39 class Theme;
40 
46 {
47 friend class PrefsDlgPrivate;
48 public:
54  PrefsDlg (Application *pApp);
58  virtual ~PrefsDlg ();
59 
60 private:
61  void OnSelectTheme (GtkTreeSelection *selection);
62  void OnBondLength (double length);
63  void OnBondAngle (double angle);
64  void OnBondWidth (double width);
65  void OnBondDist (double dist);
66  void OnStereoBondWidth (double width);
67  void OnHashWidth (double width);
68  void OnHashDist (double dist);
69  void OnFont (GcpFontSel *fs);
70  void OnTextFont (GcpFontSel *fs);
71  void OnArrowLength (double length);
72  void OnArrowWidth (double width);
73  void OnArrowDist (double dist);
74  void OnArrowPadding (double padding);
75  void OnArrowHeadA (double headA);
76  void OnArrowHeadB (double headB);
77  void OnArrowHeadC (double headC);
78  void OnScale (double scale);
79  void OnPadding (double padding);
80  void OnObjectPadding (double padding);
81  void OnStoichPadding (double padding);
82  void OnSignPadding (double padding);
83  void OnChargeSize (double size);
84  void OnThemeNameChanged (char const *name);
85  bool CheckError ();
86  void SetDefaultTheme (char const *name);
87 
88 private:
89  Theme *m_CurTheme;
90  GtkTreeStore *themes;
91  GtkTreeSelection *m_ThemesSelection;
92  GtkTreeView *m_ThemesView;
93  GtkNotebook *m_Book;
94  GtkSpinButton *m_BondLengthBtn, *m_BondWidthBtn, *m_BondAngleBtn, *m_BondDistBtn;
95  GtkSpinButton *m_StereoBondWidthBtn, *m_HashDistBtn, *m_HashWidthBtn;
96  GtkSpinButton *m_ArrowLengthBtn, *m_ArrowWidthBtn, *m_ArrowDistBtn, *m_ArrowPaddingBtn;
97  GtkSpinButton *m_ArrowHeadABtn, *m_ArrowHeadBBtn, *m_ArrowHeadCBtn;
98  GtkSpinButton *m_ScaleBtn, *m_PaddingBtn, *m_ObjectPaddingBtn, *m_StoichPaddingBtn, *m_SignPaddingBtn;
99  GtkSpinButton *m_ChargeSizeBtn;
100  GtkEntry *m_NameEntry;
101  GcpFontSel *m_TextFontSel, *m_FontSel;
102  gulong m_NameActivate, m_NameFocusOut, m_TextFontChanged, m_FontChanged;
103  GtkTreePath *m_Path;
104  GtkComboBoxText *m_DefaultThemeBox;
105 };
106 
107 } // namespace gcp
108 
109 #endif // GCP_PREFERENCES_H