//--------------------------------------------------------------------------- #ifndef PrintFrmH #define PrintFrmH //--------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include "RxRichEditX.h" #include #include "RxCombos.hpp" #include typedef struct tagTPageOffset { long int Start; long int End; RECT rendRect; } TPageOffsets; //--------------------------------------------------------------------------- class TPrintForm : public TForm { __published: // IDE-managed Components TPanel *Panel1; TPageControl *PageControl1; TTabSheet *shtSelection; TTabSheet *shtSetup; TBitBtn *btnPrint; TBitBtn *btnSetup; TBitBtn *btnPreview; TBitBtn *btnClose; TGroupBox *GroupBox1; TRadioButton *radText; TRadioButton *radComm; TRadioButton *radLD; TGroupBox *GroupBox2; TEdit *editStart; TLabel *staticRange; TComboBox *cmbModule; TLabel *lblModName; TGroupBox *GroupBox3; TGroupBox *GroupBox4; TGroupBox *GroupBox5; TLabel *labelLeft; TLabel *labelBot; TLabel *labelRight; TLabel *labelTop; TEdit *editLeft; TUpDown *spnLeft; TEdit *editBottom; TUpDown *spnBottom; TEdit *editTop; TUpDown *spnTop; TEdit *editRight; TUpDown *spnRight; TLabel *labelHeader; TLabel *labelFooter; TEdit *editHeader; TEdit *editFooter; TLabel *Label10; TLabel *Label11; TLabel *Label12; TUpDown *spnHeading; TEdit *editHeading; TUpDown *spnBody; TEdit *editBody; TUpDown *spnNumbers; TEdit *editNumbers; TPrinterSetupDialog *PrinterSetupDialog; TLabel *labelFont; TPanel *pnlFontComboBox; TCheckBox *ckChHead; TCheckBox *ckPrefix; TCheckBox *ckParagraph; TCheckBox *ckPostfix; TCheckBox *ckVSNum; TCheckBox *ckSuperVS; TTabSheet *shtFormat; TCheckBox *ckBookHead; TCheckBox *ckHeader; TCheckBox *ckFooter; void __fastcall FormShow(TObject *Sender); void __fastcall btnCloseClick(TObject *Sender); void __fastcall radTextClick(TObject *Sender); void __fastcall radCommClick(TObject *Sender); void __fastcall radLDClick(TObject *Sender); void __fastcall spnLeftClick(TObject *Sender, TUDBtnType Button); void __fastcall spnRightClick(TObject *Sender, TUDBtnType Button); void __fastcall spnBottomClick(TObject *Sender, TUDBtnType Button); void __fastcall spnTopClick(TObject *Sender, TUDBtnType Button); void __fastcall btnPrintClick(TObject *Sender); void __fastcall OnPrint(TRxRichEdit* rtfPrint); void __fastcall btnSetupClick(TObject *Sender); void __fastcall btnPreviewClick(TObject *Sender); void __fastcall ckHeaderClick(TObject *Sender); void __fastcall ckFooterClick(TObject *Sender); void __fastcall ckVSNumClick(TObject *Sender); private: void SavePrintPrefs(); int inline GetSpinPos(const float & value); float roundMargin(float value); // User declarations public: // User declarations TFontComboBox *cmbFont; TRxRichEditX* rtfPrint; __fastcall TPrintForm(TComponent* Owner); void FillModuleCombo(); void SetHint(); void PrepareRTF(); void SetDefaultOps(); void print(ListKey *keys = 0, SWModule *module = 0); }; //--------------------------------------------------------------------------- extern PACKAGE TPrintForm *PrintForm; //--------------------------------------------------------------------------- #endif