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 namespace gcp {
00033
00034 class Application;
00035 class Theme;
00036
00037 class PrefsDlg: public gcu::Dialog, gcu::Object
00038 {
00039 public:
00040 PrefsDlg (Application *pApp);
00041 virtual ~PrefsDlg ();
00042
00043 void OnNewTheme ();
00044 void OnSelectTheme (GtkTreeSelection *selection);
00045 void OnBondLength (double length);
00046 void OnBondAngle (double angle);
00047 void OnBondWidth (double width);
00048 void OnBondDist (double dist);
00049 void OnStereoBondWidth (double width);
00050 void OnHashWidth (double width);
00051 void OnHashDist (double dist);
00052 void OnFont (GcpFontSel *fs);
00053 void OnTextFont (GcpFontSel *fs);
00054 void OnArrowLength (double length);
00055 void OnArrowWidth (double width);
00056 void OnArrowDist (double dist);
00057 void OnArrowPadding (double padding);
00058 void OnArrowHeadA (double headA);
00059 void OnArrowHeadB (double headB);
00060 void OnArrowHeadC (double headC);
00061 void OnScale (double scale);
00062 void OnPadding (double padding);
00063 void OnObjectPadding (double padding);
00064 void OnStoichPadding (double padding);
00065 void OnSignPadding (double padding);
00066 void OnChargeSize (double size);
00067 void OnThemeNameChanged (char const *name);
00068 bool CheckError ();
00069 void SetDefaultTheme (char const *name);
00070
00071 private:
00072 Theme *m_CurTheme;
00073 GtkTreeStore *themes;
00074 GtkTreeSelection *m_ThemesSelection;
00075 GtkTreeView *m_ThemesView;
00076 GtkNotebook *m_Book;
00077 GtkSpinButton *m_BondLengthBtn, *m_BondWidthBtn, *m_BondAngleBtn, *m_BondDistBtn;
00078 GtkSpinButton *m_StereoBondWidthBtn, *m_HashDistBtn, *m_HashWidthBtn;
00079 GtkSpinButton *m_ArrowLengthBtn, *m_ArrowWidthBtn, *m_ArrowDistBtn, *m_ArrowPaddingBtn;
00080 GtkSpinButton *m_ArrowHeadABtn, *m_ArrowHeadBBtn, *m_ArrowHeadCBtn;
00081 GtkSpinButton *m_ScaleBtn, *m_PaddingBtn, *m_ObjectPaddingBtn, *m_StoichPaddingBtn, *m_SignPaddingBtn;
00082 GtkSpinButton *m_ChargeSizeBtn;
00083 GtkEntry *m_NameEntry;
00084 GcpFontSel *m_TextFontSel, *m_FontSel;
00085 gulong m_NameActivate, m_NameFocusOut, m_TextFontChanged, m_FontChanged;
00086 GtkTreePath *m_Path;
00087 GtkComboBox *m_DefaultThemeBox;
00088 };
00089
00090 }
00091
00092 #endif // GCP_PREFERENCES_H