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 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 }       //      namespace gcp
00091 
00092 #endif  //      GCP_PREFERENCES_H

Generated on Sat Sep 6 16:39:00 2008 for The Gnome Chemistry Utils by  doxygen 1.5.6