The Gnome Chemistry Utils 0.12.8
|
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 friend class PrintSetupDlgPrivate; 00040 public: 00047 PrintSetupDlg (Application* App, Printable *printable); 00051 virtual ~PrintSetupDlg (); 00052 00053 void DoPrint (bool preview); 00054 void OnPrinterSetup (); 00055 void UpdatePageSetup (GtkPageSetup *page_setup); 00056 void OnOrientation (GtkPageOrientation orientation); 00057 bool SelectUnit (GtkTreeIter *iter); 00058 void OnUnitChanged (); 00059 void OnTopMarginChanged (double x); 00060 void OnBottomMarginChanged (double x); 00061 void OnRightMarginChanged (double x); 00062 void OnLeftMarginChanged (double x); 00063 void OnHeaderHeightChanged (double x); 00064 void OnFooterHeightChanged (double x); 00065 void OnHorizCenter (); 00066 void OnVertCenter (); 00067 void UpdateScale (); 00068 void OnScaleType (PrintScaleType type); 00069 void OnScale (double scale); 00070 void OnHFit (bool fit); 00071 void OnVFit (bool fit); 00072 void OnHPages (int pages); 00073 void OnVPages (int pages); 00074 00075 private: 00076 Printable *m_Printable; 00077 GtkLabel *m_PageSizeLbl, *m_PageTypeLbl; 00078 GtkToggleButton *m_PortraitBtn, *m_RPortraitBtn, *m_LandscapeBtn, *m_RLandscapeBtn; 00079 gulong m_PortraitId, m_RPortraitId, m_LandscapeId, m_RLandscapeId; 00080 GtkSpinButton *m_MarginTopBtn, *m_MarginBottomBtn, *m_MarginRightBtn, *m_MarginLeftBtn, *m_HeaderHeightBtn, *m_FooterHeightBtn; 00081 gulong m_MarginTopId, m_MarginBottomId, m_MarginRightId, m_MarginLeftId, m_HeaderHeightId, m_FooterHeightId; 00082 GtkListStore *m_UnitList; 00083 GtkComboBox *m_UnitBox; 00084 GtkToggleButton *m_HBtn, *m_VBtn; 00085 gulong m_UnitId, m_HId, m_VId; 00086 GtkToggleButton *m_ScalingNoneBtn, *m_ScalingFixedBtn, *m_ScalingAutoBtn, *m_HFitBtn, *m_VFitBtn; 00087 gulong m_ScalingNoneId, m_ScalingFixedId, m_ScalingAutoId, m_HFitId, m_VFitId; 00088 GtkSpinButton *m_HPagesBtn, *m_VPagesBtn, *m_ScaleBtn; 00089 GtkLabel *m_ScaleLbl, *m_FitHLbl, *m_FitVLbl; 00090 }; 00091 00092 } // namespace gcu 00093 00094 #endif // GCU_PRINT_SETUP_DLG_H