print-setup-dlg.h

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 
00029 namespace gcu {
00030 
00031 class Application;
00032 
00033 class PrintSetupDlg: public Dialog
00034 {
00035 public:
00036         PrintSetupDlg (Application* App, Printable *printable);
00037         virtual ~PrintSetupDlg ();
00038 
00039         void DoPrint (bool preview);
00040         void OnPrinterSetup ();
00041         void UpdatePageSetup (GtkPageSetup *page_setup);
00042         void OnOrientation (GtkPageOrientation orientation);
00043         bool SelectUnit (GtkTreeIter *iter);
00044         void OnUnitChanged ();
00045         void OnTopMarginChanged (double x);
00046         void OnBottomMarginChanged (double x);
00047         void OnRightMarginChanged (double x);
00048         void OnLeftMarginChanged (double x);
00049         void OnHeaderHeightChanged (double x);
00050         void OnFooterHeightChanged (double x);
00051         void OnHorizCenter ();
00052         void OnVertCenter ();
00053         void UpdateScale ();
00054         void OnScaleType (PrintScaleType type);
00055         void OnScale (double scale);
00056         void OnHFit (bool fit);
00057         void OnVFit (bool fit);
00058         void OnHPages (int pages);
00059         void OnVPages (int pages);
00060 
00061 private:
00062         Printable *m_Printable;
00063         GtkLabel *m_PageSizeLbl, *m_PageTypeLbl;
00064         GtkToggleButton *m_PortraitBtn, *m_RPortraitBtn, *m_LandscapeBtn, *m_RLandscapeBtn;
00065         gulong m_PortraitId, m_RPortraitId, m_LandscapeId, m_RLandscapeId;
00066         GtkSpinButton *m_MarginTopBtn, *m_MarginBottomBtn, *m_MarginRightBtn, *m_MarginLeftBtn, *m_HeaderHeightBtn, *m_FooterHeightBtn;
00067         gulong m_MarginTopId, m_MarginBottomId, m_MarginRightId, m_MarginLeftId, m_HeaderHeightId, m_FooterHeightId;
00068         GtkListStore *m_UnitList;
00069         GtkComboBox *m_UnitBox;
00070         GtkToggleButton *m_HBtn, *m_VBtn;
00071         gulong m_UnitId, m_HId, m_VId;
00072         GtkToggleButton *m_ScalingNoneBtn, *m_ScalingFixedBtn, *m_ScalingAutoBtn, *m_HFitBtn, *m_VFitBtn;
00073         gulong m_ScalingNoneId, m_ScalingFixedId, m_ScalingAutoId, m_HFitId, m_VFitId;
00074         GtkSpinButton *m_HPagesBtn, *m_VPagesBtn, *m_ScaleBtn;
00075         GtkLabel *m_ScaleLbl, *m_FitHLbl, *m_FitVLbl;
00076 };
00077         
00078 }       //      namespace gcu
00079 
00080 #endif  //      GCU_PRINT_SETUP_DLG_H

Generated on Tue Mar 18 16:06:03 2008 for The Gnome Chemistry Utils by  doxygen 1.5.5