Unit1.h
上传用户:daoqigc
上传日期:2021-04-20
资源大小:2795k
文件大小:9k
- //---------------------------------------------------------------------------
- #ifndef Unit1H
- #define Unit1H
- //---------------------------------------------------------------------------
- #include <vclClasses.hpp>
- #include <vclControls.hpp>
- #include <vclStdCtrls.hpp>
- #include <vclForms.hpp>
- #include <vclOleCtnrs.hpp>
- #include <vclComCtrls.hpp>
- #include <vclExtCtrls.hpp>
- #include <vclButtons.hpp>
- #include <vclMenus.hpp>
- #include <vclDialogs.hpp>
- #include "RVEdit.hpp"
- #include "RichView.hpp"
- #include "RVScroll.hpp"
- #include "PtblRV.hpp"
- #include "RVStyle.hpp"
- #include <Graphics.hpp>
- #include <ImgList.hpp>
- //---------------------------------------------------------------------------
- class TForm1 : public TForm
- {
- __published: // IDE-managed Components
- TRichViewEdit *RichViewEdit1;
- TStatusBar *StatusBar1;
- TPanel *Panel1;
- TComboBox *cmbText;
- TComboBox *cmbPara;
- TMainMenu *MainMenu1;
- TMenuItem *mpdFile;
- TMenuItem *mitLoad;
- TMenuItem *mitSave;
- TMenuItem *N2;
- TMenuItem *mitPreview;
- TMenuItem *mitPrint;
- TMenuItem *N4;
- TMenuItem *mitClear;
- TMenuItem *N1;
- TMenuItem *mitExit;
- TMenuItem *mpdEdit;
- TMenuItem *mitUndo;
- TMenuItem *mitRedo;
- TMenuItem *N10;
- TMenuItem *mitCut;
- TMenuItem *mitCopy;
- TMenuItem *mitPaste;
- TMenuItem *PasteAs1;
- TMenuItem *mitPasteAsRTF;
- TMenuItem *mitPasteAsText;
- TMenuItem *mitPasteAsUnicodeText;
- TMenuItem *mitPasteAsMetafile;
- TMenuItem *mitPasteAsBitmap;
- TMenuItem *mitPasteAsRVF;
- TMenuItem *N8;
- TMenuItem *mitPasteAsOLE;
- TMenuItem *mitDelete;
- TMenuItem *mitSelectAll;
- TMenuItem *N6;
- TMenuItem *mitSearch;
- TMenuItem *mitSelectCurrentWord;
- TMenuItem *N9;
- TMenuItem *mitInsertPageBreak;
- TMenuItem *mitRemovePageBreak;
- TMenuItem *N3;
- TMenuItem *mitEditCheckpoint;
- TMenuItem *mitEditProps;
- TMenuItem *mpdInsert;
- TMenuItem *mitInsertFile;
- TMenuItem *mitPicture;
- TMenuItem *mpdComponent;
- TMenuItem *mitButtonComp;
- TMenuItem *mitEditBoxComp;
- TMenuItem *mpdBullet;
- TMenuItem *mitHelpIcon;
- TMenuItem *mitHelpSearchIcon;
- TMenuItem *mitPropertiesIcon;
- TMenuItem *mpdHotspot;
- TMenuItem *mitAddImageHS;
- TMenuItem *mitAddTextHS;
- TMenuItem *mitBreak;
- TMenuItem *mpdTable;
- TMenuItem *mitInserttable1;
- TMenuItem *mitInsertTable2;
- TMenuItem *mitInsertTable3;
- TMenuItem *mitInsertTable4;
- TMenuItem *N7;
- TMenuItem *Insert1;
- TMenuItem *mitRowsAbove;
- TMenuItem *mitRowsBelow;
- TMenuItem *N14;
- TMenuItem *mitColsLeft;
- TMenuItem *mitColsRight;
- TMenuItem *Delete1;
- TMenuItem *mitDelRows;
- TMenuItem *mitDelColumns;
- TMenuItem *N13;
- TMenuItem *mitMergeCells;
- TMenuItem *Split1;
- TMenuItem *mitSplitVertically;
- TMenuItem *mitSplitHorizontally;
- TMenuItem *Unmerge1;
- TMenuItem *mitUmRows;
- TMenuItem *mitUmCols;
- TMenuItem *mitUmRowsandCols;
- TMenuItem *mpdMisc;
- TMenuItem *mpdBackground;
- TMenuItem *mitBackNoBitmap;
- TMenuItem *mitBackStretched;
- TMenuItem *mitBackTiled;
- TMenuItem *mitBackTiledandScrolled;
- TMenuItem *mitBackCentered;
- TMenuItem *N5;
- TMenuItem *mitCheckpointList;
- TOpenDialog *OpenDialog1;
- TSaveDialog *SaveDialog1;
- TPopupMenu *PopupMenu1;
- TMenuItem *mitEditCheckpoint1;
- TMenuItem *mitEditProp1;
- TFindDialog *FindDialog1;
- TRVPrint *RVPrint1;
- TPrinterSetupDialog *psd;
- TImageList *il;
- TMenuItem *N11;
- TMenuItem *mitReadOnly;
- TMenuItem *N12;
- TMenuItem *OptionsforSavingLoading1;
- TMenuItem *mpdLists;
- TMenuItem *mitApplyLists;
- TMenuItem *mitRemoveLists;
- TRVStyle *RVStyle1;
- TMenuItem *mitBackTopLeft;
- TMenuItem *mitBackTopRight;
- TMenuItem *mitBackBottomLeft;
- TMenuItem *mitBackBottomRight;
- void __fastcall FormCreate(TObject *Sender);
- void __fastcall RichViewEdit1CurParaStyleChanged(TObject *Sender);
- void __fastcall RichViewEdit1CurTextStyleChanged(TObject *Sender);
- void __fastcall cmbParaClick(TObject *Sender);
- void __fastcall cmbTextClick(TObject *Sender);
- void __fastcall mitLoadClick(TObject *Sender);
- void __fastcall RichViewEdit1RVFPictureNeeded(TCustomRichView *Sender,
- AnsiString Name, int Tag, TGraphic *&gr);
- void __fastcall RichViewEdit1RVFControlNeeded(TCustomRichView *Sender,
- AnsiString Name, int Tag, TControl *&ctrl);
- void __fastcall RichViewEdit1RVFImageListNeeded(TCustomRichView *Sender,
- int ImageListTag, TCustomImageList *&il);
- void __fastcall mitSaveClick(TObject *Sender);
- void __fastcall mitClearClick(TObject *Sender);
- void __fastcall mitPreviewClick(TObject *Sender);
- void __fastcall RichViewEdit1SaveComponentToFile(TCustomRichView *Sender,
- AnsiString Path, TPersistent *SaveMe, TRVSaveFormat SaveFormat,
- AnsiString &OutStr);
- void __fastcall mitPrintClick(TObject *Sender);
- void __fastcall mitExitClick(TObject *Sender);
- void __fastcall mitInsertFileClick(TObject *Sender);
- void __fastcall mitPictureClick(TObject *Sender);
- void __fastcall mitButtonCompClick(TObject *Sender);
- void __fastcall mitEditBoxCompClick(TObject *Sender);
- void __fastcall mitInsertBulletClick(TObject *Sender);
- void __fastcall mitInsertHotspotClick(TObject *Sender);
- void __fastcall mitBreakClick(TObject *Sender);
- void __fastcall mpdEditClick(TObject *Sender);
- void __fastcall mitUndoClick(TObject *Sender);
- void __fastcall mitRedoClick(TObject *Sender);
-
- void __fastcall mitCutClick(TObject *Sender);
- void __fastcall mitCopyClick(TObject *Sender);
- void __fastcall mitPasteClick(TObject *Sender);
-
- void __fastcall mitPasteAsRTFClick(TObject *Sender);
- void __fastcall mitPasteAsTextClick(TObject *Sender);
- void __fastcall mitPasteAsUnicodeTextClick(TObject *Sender);
- void __fastcall mitPasteAsMetafileClick(TObject *Sender);
- void __fastcall mitPasteAsBitmapClick(TObject *Sender);
-
- void __fastcall mitPasteAsRVFClick(TObject *Sender);
- void __fastcall mitPasteAsOLEClick(TObject *Sender);
- void __fastcall mitDeleteClick(TObject *Sender);
- void __fastcall mitSelectAllClick(TObject *Sender);
- void __fastcall RichViewEdit1Select(TObject *Sender);
- void __fastcall mitInsertPageBreakClick(TObject *Sender);
- void __fastcall mitRemovePageBreakClick(TObject *Sender);
- void __fastcall mitEditCheckpointClick(TObject *Sender);
- void __fastcall mitSearchClick(TObject *Sender);
- void __fastcall mitSelectCurrentWordClick(TObject *Sender);
- void __fastcall mitEditPropsClick(TObject *Sender);
- void __fastcall mitCheckpointListClick(TObject *Sender);
- void __fastcall mpdBackgroundClick(TObject *Sender);
- void __fastcall mitBackClick(TObject *Sender);
- void __fastcall PopupMenu1Popup(TObject *Sender);
- void __fastcall RichViewEdit1Change(TObject *Sender);
- void __fastcall FindDialog1Find(TObject *Sender);
- void __fastcall RichViewEdit1Jump(TObject *Sender, int id);
- void __fastcall RichViewEdit1RVMouseMove(TObject *Sender, int id);
- void __fastcall mitInserttable1Click(TObject *Sender);
- void __fastcall mitInsertTable2Click(TObject *Sender);
- void __fastcall mitInsertTable3Click(TObject *Sender);
- void __fastcall mitInsertTable4Click(TObject *Sender);
- void __fastcall mpdTableClick(TObject *Sender);
- void __fastcall mitCellOperation(TObject *Sender);
- void __fastcall mitReadOnlyClick(TObject *Sender);
- void __fastcall OptionsforSavingLoading1Click(TObject *Sender);
- void __fastcall mitApplyListsClick(TObject *Sender);
- void __fastcall mitRemoveListsClick(TObject *Sender);
- void __fastcall RichViewEdit1Click(TObject *Sender);
- void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
- void __fastcall RichViewEdit1ControlAction(TCustomRichView *Sender,
- TRVControlAction ControlAction, int ItemNo, TControl *&ctrl);
- void __fastcall RichViewEdit1WriteHyperlink(TCustomRichView *Sender, int id,
- TCustomRVData *RVData, int ItemNo, TRVSaveFormat SaveFormat,
- AnsiString &Target, AnsiString &Extras);
- protected:
- void __fastcall WMDisplayChange(TMessage &Message);
- BEGIN_MESSAGE_MAP
- MESSAGE_HANDLER(WM_DISPLAYCHANGE, TMessage, WMDisplayChange)
- END_MESSAGE_MAP(TForm)
- private: // User declarations
- TOleContainer* ActiveOleContainer;
- TRVSaveOptions HTMLSaveOptions;
- AnsiString HTMLTitle;
- void UpdateUndoMenu();
- AnsiString GetUnicodeFontName();
- void FillStyleCombo(TCustomRVInfos* Styles, TComboBox* cmb);
- void DisplayUnicodeWarning();
- AnsiString GetRVFErrors();
- void __fastcall OnOleResize(TObject *Sender);
- void __fastcall OnOleActivate(TObject *Sender);
- void __fastcall OnOleDeactivate(TObject *Sender);
- void __fastcall OnControlClick(TObject *Sender);
- void CloseOleContainer();
- public: // User declarations
- __fastcall TForm1(TComponent* Owner);
- };
- //---------------------------------------------------------------------------
- extern TForm1 *Form1;
- //---------------------------------------------------------------------------
- #endif
-