Unit1.h
上传用户:daoqigc
上传日期:2021-04-20
资源大小:2795k
文件大小:2k
源码类别:

RichEdit

开发平台:

Delphi

  1. //---------------------------------------------------------------------------
  2. #ifndef Unit1H
  3. #define Unit1H
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include "RichView.hpp"
  10. #include "RVEdit.hpp"
  11. #include "RVScroll.hpp"
  12. #include "RVStyle.hpp"
  13. #include <ComCtrls.hpp>
  14. #include <Dialogs.hpp>
  15. #include <ExtCtrls.hpp>
  16. //---------------------------------------------------------------------------
  17. class TForm1 : public TForm
  18. {
  19. __published: // IDE-managed Components
  20.     TPageControl *PageControl1;
  21.     TTabSheet *TabSheet1;
  22.     TPanel *Panel1;
  23.     TLabel *Label1;
  24.     TComboBox *cmbA;
  25.     TButton *btnOpenA;
  26.     TRichViewEdit *rveA;
  27.     TTabSheet *TabSheet2;
  28.     TPanel *Panel2;
  29.     TLabel *Label2;
  30.     TComboBox *cmbH;
  31.     TButton *btnOpenH;
  32.     TRichViewEdit *rveH;
  33.     TRVStyle *rvsA;
  34.     TRVStyle *rvsH;
  35.     TOpenDialog *od;
  36.     void __fastcall FormCreate(TObject *Sender);
  37.     void __fastcall cmbAClick(TObject *Sender);
  38.     void __fastcall cmbHClick(TObject *Sender);
  39.     void __fastcall btnOpenAClick(TObject *Sender);
  40.     void __fastcall btnOpenHClick(TObject *Sender);
  41. private: // User declarations
  42.     void FillComboBox(TComboBox* cmb, TFontCharset Charset);
  43.     void ApplyFont(const AnsiString FontName, TRVStyle* rvs,
  44.                         TFontCharset Charset,
  45.                         TRichViewEdit* rve);
  46.     void OpenFile(TRichViewEdit* rve);
  47. public: // User declarations
  48.     TFontCharset CurrentCharset;
  49.     bool Found;
  50.     __fastcall TForm1(TComponent* Owner);
  51. };
  52. //---------------------------------------------------------------------------
  53. extern PACKAGE TForm1 *Form1;
  54. //---------------------------------------------------------------------------
  55. #endif