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