preferences.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef GCP_PREFERENCES_H
00026 #define GCP_PREFERENCES_H
00027
00028 #include "fontsel.h"
00029 #include <gcu/dialog.h>
00030 #include <gcu/object.h>
00031 #include <gcu/macros.h>
00032
00034 namespace gcp {
00035
00036 class Application;
00037 class Theme;
00038
00043 class PrefsDlg: public gcu::Dialog, gcu::Object
00044 {
00045 friend class PrefsDlgPrivate;
00046 public:
00052 PrefsDlg (Application *pApp);
00056 virtual ~PrefsDlg ();
00057
00058 private:
00059 void OnSelectTheme (GtkTreeSelection *selection);
00060 void OnBondLength (double length);
00061 void OnBondAngle (double angle);
00062 void OnBondWidth (double width);
00063 void OnBondDist (double dist);
00064 void OnStereoBondWidth (double width);
00065 void OnHashWidth (double width);
00066 void OnHashDist (double dist);
00067 void OnFont (GcpFontSel *fs);
00068 void OnTextFont (GcpFontSel *fs);
00069 void OnArrowLength (double length);
00070 void OnArrowWidth (double width);
00071 void OnArrowDist (double dist);
00072 void OnArrowPadding (double padding);
00073 void OnArrowHeadA (double headA);
00074 void OnArrowHeadB (double headB);
00075 void OnArrowHeadC (double headC);
00076 void OnScale (double scale);
00077 void OnPadding (double padding);
00078 void OnObjectPadding (double padding);
00079 void OnStoichPadding (double padding);
00080 void OnSignPadding (double padding);
00081 void OnChargeSize (double size);
00082 void OnThemeNameChanged (char const *name);
00083 bool CheckError ();
00084 void SetDefaultTheme (char const *name);
00085
00086 private:
00087 Theme *m_CurTheme;
00088 GtkTreeStore *themes;
00089 GtkTreeSelection *m_ThemesSelection;
00090 GtkTreeView *m_ThemesView;
00091 GtkNotebook *m_Book;
00092 GtkSpinButton *m_BondLengthBtn, *m_BondWidthBtn, *m_BondAngleBtn, *m_BondDistBtn;
00093 GtkSpinButton *m_StereoBondWidthBtn, *m_HashDistBtn, *m_HashWidthBtn;
00094 GtkSpinButton *m_ArrowLengthBtn, *m_ArrowWidthBtn, *m_ArrowDistBtn, *m_ArrowPaddingBtn;
00095 GtkSpinButton *m_ArrowHeadABtn, *m_ArrowHeadBBtn, *m_ArrowHeadCBtn;
00096 GtkSpinButton *m_ScaleBtn, *m_PaddingBtn, *m_ObjectPaddingBtn, *m_StoichPaddingBtn, *m_SignPaddingBtn;
00097 GtkSpinButton *m_ChargeSizeBtn;
00098 GtkEntry *m_NameEntry;
00099 GcpFontSel *m_TextFontSel, *m_FontSel;
00100 gulong m_NameActivate, m_NameFocusOut, m_TextFontChanged, m_FontChanged;
00101 GtkTreePath *m_Path;
00102 GtkComboBox *m_DefaultThemeBox;
00103 };
00104
00105 }
00106
00107 #endif // GCP_PREFERENCES_H