print-setup-dlg.h
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
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 }
00079
00080 #endif // GCU_PRINT_SETUP_DLG_H