paintu.h
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:2k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1. //---------------------------------------------------------------------------
  2. #ifndef paintuH
  3. #define paintuH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include "fcButton.hpp"
  10. #include "fcButtonGroup.hpp"
  11. #include "fcClearPanel.hpp"
  12. #include "fcColorCombo.hpp"
  13. #include "fcCombo.hpp"
  14. #include "fcImgBtn.hpp"
  15. #include "fcLabel.hpp"
  16. #include "fcOutlookBar.hpp"
  17. #include "fcOutlookList.hpp"
  18. #include "fcShapeBtn.hpp"
  19. #include <ExtCtrls.hpp>
  20. #include <ImgList.hpp>
  21. //---------------------------------------------------------------------------
  22. //TDrawingTool = (dtLine, dtRectangle, dtEllipse, dtRoundRect);
  23. enum TDrawingTool { dtLine, dtRectangle, dtEllipse, dtRoundRect};
  24. class TPaintForm : public TForm
  25. {
  26. __published: // IDE-managed Components
  27.         TImage *PaintBox;
  28.         TfcOutlookBar *fcControlBar1;
  29.         TfcShapeBtn *fcControlBar1fcShapeBtn1;
  30.         TfcShapeBtn *fcControlBar1fcShapeBtn2;
  31.         TfcShapeBtn *fcControlBar1fcShapeBtn3;
  32.         TfcShapeBtn *fcControlBar1fcShapeBtn4;
  33.         TfcOutlookList *ToolsOutlookList;
  34.         TfcOutlookList *BrushesOutlookList;
  35.         TfcOutlookList *PensOutlookList;
  36.         TfcLabel *fcLabel1;
  37.         TfcLabel *fcLabel2;
  38.         TfcColorCombo *BrushColorCombo;
  39.         TfcColorCombo *PenColorCombo;
  40.         TImageList *BrushImages;
  41.         TImageList *PenImages;
  42.         TImageList *ToolImages;
  43.         void __fastcall FormCreate(TObject *Sender);
  44.         void __fastcall FormActivate(TObject *Sender);
  45.         void __fastcall FormShow(TObject *Sender);
  46.         void __fastcall PaintBoxMouseDown(TObject *Sender,
  47.           TMouseButton Button, TShiftState Shift, int X, int Y);
  48.         void __fastcall PaintBoxMouseMove(TObject *Sender,
  49.           TShiftState Shift, int X, int Y);
  50.         void __fastcall PaintBoxMouseUp(TObject *Sender,
  51.           TMouseButton Button, TShiftState Shift, int X, int Y);
  52. private: // User declarations
  53.         bool Drawing;
  54.         bool InfoShown;
  55.         TPoint Origin, MovePt;
  56. public: // User declarations
  57.         __fastcall TPaintForm(TComponent* Owner);
  58.         void __fastcall DrawShape(TPoint *TopLeft,TPoint *BottomRight, TPenMode AMode);
  59. };
  60. //---------------------------------------------------------------------------
  61. extern PACKAGE TPaintForm *PaintForm;
  62. //---------------------------------------------------------------------------
  63. #endif