preferences.h
Go to the documentation of this file.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
00030 #include "fontsel.h"
00031 #include <gcu/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 gcu::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 GtkComboBox *m_DefaultThemeBox;
00105 };
00106
00107 }
00108
00109 #endif // GCP_PREFERENCES_H