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 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 }
00093
00094 #endif // GCU_PRINT_SETUP_DLG_H