print-setup-dlg.h

Go to the documentation of this file.
00001 /* 
00002  * Gnome Chemistry Utils
00003  * print-setup-dlg.h
00004  *
00005  * Copyright (C) 2008 Jean Bréfort <jean.brefort@normalesup.org>
00006  *
00007  * This program is free software; you can redistribute it and/or 
00008  * modify it under the terms of the GNU General Public License as 
00009  * published by the Free Software Foundation; either version 2 of the
00010  * License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
00020  * USA
00021  */
00022 
00023 #ifndef GCU_PRINT_SETUP_DLG_H
00024 #define GCU_PRINT_SETUP_DLG_H
00025 
00026 #include "dialog.h"
00027 #include "printable.h"
00028 
00030 namespace gcu {
00031 
00032 class Application;
00033 
00037 class PrintSetupDlg: public Dialog
00038 {
00039 public:
00046         PrintSetupDlg (Application* App, Printable *printable);
00047         virtual ~PrintSetupDlg ();
00048 
00049         void DoPrint (bool preview);
00050         void OnPrinterSetup ();
00051         void UpdatePageSetup (GtkPageSetup *page_setup);
00052         void OnOrientation (GtkPageOrientation orientation);
00053         bool SelectUnit (GtkTreeIter *iter);
00054         void OnUnitChanged ();
00055         void OnTopMarginChanged (double x);
00056         void OnBottomMarginChanged (double x);
00057         void OnRightMarginChanged (double x);
00058         void OnLeftMarginChanged (double x);
00059         void OnHeaderHeightChanged (double x);
00060         void OnFooterHeightChanged (double x);
00061         void OnHorizCenter ();
00062         void OnVertCenter ();
00063         void UpdateScale ();
00064         void OnScaleType (PrintScaleType type);
00065         void OnScale (double scale);
00066         void OnHFit (bool fit);
00067         void OnVFit (bool fit);
00068         void OnHPages (int pages);
00069         void OnVPages (int pages);
00070 
00071 private:
00072         Printable *m_Printable;
00073         GtkLabel *m_PageSizeLbl, *m_PageTypeLbl;
00074         GtkToggleButton *m_PortraitBtn, *m_RPortraitBtn, *m_LandscapeBtn, *m_RLandscapeBtn;
00075         gulong m_PortraitId, m_RPortraitId, m_LandscapeId, m_RLandscapeId;
00076         GtkSpinButton *m_MarginTopBtn, *m_MarginBottomBtn, *m_MarginRightBtn, *m_MarginLeftBtn, *m_HeaderHeightBtn, *m_FooterHeightBtn;
00077         gulong m_MarginTopId, m_MarginBottomId, m_MarginRightId, m_MarginLeftId, m_HeaderHeightId, m_FooterHeightId;
00078         GtkListStore *m_UnitList;
00079         GtkComboBox *m_UnitBox;
00080         GtkToggleButton *m_HBtn, *m_VBtn;
00081         gulong m_UnitId, m_HId, m_VId;
00082         GtkToggleButton *m_ScalingNoneBtn, *m_ScalingFixedBtn, *m_ScalingAutoBtn, *m_HFitBtn, *m_VFitBtn;
00083         gulong m_ScalingNoneId, m_ScalingFixedId, m_ScalingAutoId, m_HFitId, m_VFitId;
00084         GtkSpinButton *m_HPagesBtn, *m_VPagesBtn, *m_ScaleBtn;
00085         GtkLabel *m_ScaleLbl, *m_FitHLbl, *m_FitVLbl;
00086 };
00087         
00088 }       //      namespace gcu
00089 
00090 #endif  //      GCU_PRINT_SETUP_DLG_H

Generated on Sat Nov 15 10:13:33 2008 for The Gnome Chemistry Utils by  doxygen 1.5.6