print-setup-dlg.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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 }
00089
00090 #endif // GCU_PRINT_SETUP_DLG_H