The Gnome Chemistry Utils 0.13.3
|
00001 // -*- C++ -*- 00002 00003 /* 00004 * GChemPaint library 00005 * preferences.h 00006 * 00007 * Copyright (C) 2006-2011 Jean Bréfort <jean.brefort@normalesup.org> 00008 * 00009 * This program is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License as 00011 * published by the Free Software Foundation; either version 2 of the 00012 * License, or (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 00022 * USA 00023 */ 00024 00025 #ifndef GCP_PREFERENCES_H 00026 #define GCP_PREFERENCES_H 00027 00030 #include "fontsel.h" 00031 #include <gcugtk/dialog.h> 00032 #include <gcu/object.h> 00033 #include <gcu/macros.h> 00034 00036 namespace gcp { 00037 00038 class Application; 00039 class Theme; 00040 00045 class PrefsDlg: public gcugtk::Dialog, gcu::Object 00046 { 00047 friend class PrefsDlgPrivate; 00048 public: 00054 PrefsDlg (Application *pApp); 00058 virtual ~PrefsDlg (); 00059 00060 private: 00061 void OnSelectTheme (GtkTreeSelection *selection); 00062 void OnBondLength (double length); 00063 void OnBondAngle (double angle); 00064 void OnBondWidth (double width); 00065 void OnBondDist (double dist); 00066 void OnStereoBondWidth (double width); 00067 void OnHashWidth (double width); 00068 void OnHashDist (double dist); 00069 void OnFont (GcpFontSel *fs); 00070 void OnTextFont (GcpFontSel *fs); 00071 void OnArrowLength (double length); 00072 void OnArrowWidth (double width); 00073 void OnArrowDist (double dist); 00074 void OnArrowPadding (double padding); 00075 void OnArrowHeadA (double headA); 00076 void OnArrowHeadB (double headB); 00077 void OnArrowHeadC (double headC); 00078 void OnScale (double scale); 00079 void OnPadding (double padding); 00080 void OnObjectPadding (double padding); 00081 void OnStoichPadding (double padding); 00082 void OnSignPadding (double padding); 00083 void OnChargeSize (double size); 00084 void OnThemeNameChanged (char const *name); 00085 bool CheckError (); 00086 void SetDefaultTheme (char const *name); 00087 00088 private: 00089 Theme *m_CurTheme; 00090 GtkTreeStore *themes; 00091 GtkTreeSelection *m_ThemesSelection; 00092 GtkTreeView *m_ThemesView; 00093 GtkNotebook *m_Book; 00094 GtkSpinButton *m_BondLengthBtn, *m_BondWidthBtn, *m_BondAngleBtn, *m_BondDistBtn; 00095 GtkSpinButton *m_StereoBondWidthBtn, *m_HashDistBtn, *m_HashWidthBtn; 00096 GtkSpinButton *m_ArrowLengthBtn, *m_ArrowWidthBtn, *m_ArrowDistBtn, *m_ArrowPaddingBtn; 00097 GtkSpinButton *m_ArrowHeadABtn, *m_ArrowHeadBBtn, *m_ArrowHeadCBtn; 00098 GtkSpinButton *m_ScaleBtn, *m_PaddingBtn, *m_ObjectPaddingBtn, *m_StoichPaddingBtn, *m_SignPaddingBtn; 00099 GtkSpinButton *m_ChargeSizeBtn; 00100 GtkEntry *m_NameEntry; 00101 GcpFontSel *m_TextFontSel, *m_FontSel; 00102 gulong m_NameActivate, m_NameFocusOut, m_TextFontChanged, m_FontChanged; 00103 GtkTreePath *m_Path; 00104 #if GTK_CHECK_VERSION (2, 24, 0) 00105 GtkComboBoxText *m_DefaultThemeBox; 00106 #else 00107 GtkComboBox *m_DefaultThemeBox; 00108 #endif 00109 }; 00110 00111 } // namespace gcp 00112 00113 #endif // GCP_PREFERENCES_H