preferences.h

00001 // -*- C++ -*-
00002 
00003 /* 
00004  * GChemPaint library
00005  * preferences.h 
00006  *
00007  * Copyright (C) 2006-2007 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 
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 }       //      namespace gcp
00092 
00093 #endif  //      GCP_PREFERENCES_H

Generated on Thu Jun 28 09:02:01 2007 for The Gnome Chemistry Utils by  doxygen 1.5.2