home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 9 / CDACTUAL9.iso / progs / CB / DATA.Z / IMGLIST.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-06  |  9.1 KB  |  250 lines

  1. //----------------------------------------------------------------------------
  2. // imglist.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
  3. // From: imglist.pas
  4. //----------------------------------------------------------------------------
  5. #ifndef imglistHPP
  6. #define imglistHPP
  7. //----------------------------------------------------------------------------
  8. #ifndef DialogsHPP
  9. #include <Dialogs.hpp>
  10. #endif
  11.  
  12. #ifndef ClassesHPP
  13. #include <Classes.hpp>
  14. #endif
  15.  
  16. #ifndef ControlsHPP
  17. #include <Controls.hpp>
  18. #endif
  19.  
  20. #ifndef ExtCtrlsHPP
  21. #include <ExtCtrls.hpp>
  22. #endif
  23.  
  24. #ifndef StdCtrlsHPP
  25. #include <StdCtrls.hpp>
  26. #endif
  27.  
  28. #ifndef FormsHPP
  29. #include <Forms.hpp>
  30. #endif
  31.  
  32. #ifndef GraphicsHPP
  33. #include <Graphics.hpp>
  34. #endif
  35.  
  36. #ifndef SysUtilsHPP
  37. #include <SysUtils.hpp>
  38. #endif
  39.  
  40. #ifndef MessagesHPP
  41. #include <Messages.hpp>
  42. #endif
  43.  
  44. #ifndef WindowsHPP
  45. #include <Windows.hpp>
  46. #endif
  47.  
  48. #ifndef SystemHPP
  49. #include <System.hpp>
  50. #endif
  51.  
  52. namespace Imglist
  53. {
  54. //-- type declarations -------------------------------------------------------
  55. enum TImageOperation { ioCrop, ioStretch, ioCenter };
  56.  
  57. class __declspec(delphiclass) TImageInfo;
  58. class __declspec(delphiclass) TImageListItems;
  59. struct TSlotInfo
  60. {
  61.     Extctrls::TPanel *Panel;
  62.     Extctrls::TImage *Image;
  63. } ;
  64.  
  65. class __declspec(pascalimplementation) TImageListItems : public Forms::TForm
  66. {
  67.     typedef TImageListItems ThisClass;
  68.     typedef Forms::TForm inherited;
  69.     
  70. __published:
  71.     Stdctrls::TButton *OK;
  72.     Stdctrls::TButton *Cancel;
  73.     Stdctrls::TGroupBox *MainGroup;
  74.     Extctrls::TPanel *PSlot0;
  75.     Extctrls::TImage *ISlot0;
  76.     Extctrls::TPanel *PSlot1;
  77.     Extctrls::TImage *ISlot1;
  78.     Extctrls::TPanel *PSlot2;
  79.     Extctrls::TImage *ISlot2;
  80.     Extctrls::TPanel *PSlot3;
  81.     Extctrls::TImage *ISlot3;
  82.     Extctrls::TPanel *PSlot4;
  83.     Extctrls::TImage *ISlot4;
  84.     Stdctrls::TScrollBar *ScrollBar;
  85.     Stdctrls::TGroupBox *ImageGroup;
  86.     Extctrls::TPanel *Panel4;
  87.     Extctrls::TImage *MainImage;
  88.     Extctrls::TPanel *PSlot5;
  89.     Extctrls::TImage *ISlot5;
  90.     Dialogs::TOpenDialog *OpenDialog;
  91.     Extctrls::TPanel *ThumbPanel;
  92.     Extctrls::TRadioGroup *OptionsGroup;
  93.     Stdctrls::TButton *Apply;
  94.     Stdctrls::TComboBox *TransparentColor;
  95.     Stdctrls::TLabel *Label1;
  96.     Stdctrls::TLabel *Label2;
  97.     Stdctrls::TComboBox *FillColor;
  98.     Stdctrls::TButton *Add;
  99.     Stdctrls::TButton *Delete;
  100.     Stdctrls::TButton *Clear;
  101.     Stdctrls::TButton *Help;
  102.     void __fastcall AddClick(System::TObject *Sender);
  103.     void __fastcall DeleteClick(System::TObject *Sender);
  104.     void __fastcall ClearClick(System::TObject *Sender);
  105.     void __fastcall FormCreate(System::TObject *Sender);
  106.     void __fastcall ScrollBarChange(System::TObject *Sender);
  107.     void __fastcall PSlotEnter(System::TObject *Sender);
  108.     void __fastcall ISlot0Click(System::TObject *Sender);
  109.     void __fastcall ISlot1Click(System::TObject *Sender);
  110.     void __fastcall ISlot2Click(System::TObject *Sender);
  111.     void __fastcall ISlot3Click(System::TObject *Sender);
  112.     void __fastcall ISlot4Click(System::TObject *Sender);
  113.     void __fastcall ISlot5Click(System::TObject *Sender);
  114.     void __fastcall FormDestroy(System::TObject *Sender);
  115.     void __fastcall OptionsGroupClick(System::TObject *Sender);
  116.     void __fastcall ApplyClick(System::TObject *Sender);
  117.     void __fastcall TransparentColorChange(System::TObject *Sender);
  118.     void __fastcall FillColorChange(System::TObject *Sender);
  119.     void __fastcall ISlotStartDrag(System::TObject *Sender, Controls::TDragObject *&DragObject);
  120.     void __fastcall ISlotEndDrag(System::TObject *Sender, System::TObject *Target, System::Integer X, System::Integer 
  121.         Y);
  122.     void __fastcall ISlotDragOver(System::TObject *Sender, System::TObject *Source, System::Integer X, 
  123.         System::Integer Y, Controls::TDragState State, System::Boolean &Accept);
  124.     void __fastcall ISlotDragDrop(System::TObject *Sender, System::TObject *Source, System::Integer X, 
  125.         System::Integer Y);
  126.     void __fastcall ISlotMouseDown(System::TObject *Sender, Controls::TMouseButton Button,  Classes::TShiftState 
  127.         Shift, System::Integer X, System::Integer Y);
  128.     void __fastcall TransparentColorExit(System::TObject *Sender);
  129.     void __fastcall FillColorExit(System::TObject *Sender);
  130.     
  131. private:
  132.     Classes::TList *FInfoList;
  133.     Controls::TImageList *FImageList;
  134.     Graphics::TBitmap *FImageBitmap;
  135.     System::Integer FIndex;
  136.     Controls::TImageList *FComponentList;
  137.     TSlotInfo FImages[6];
  138.     Controls::TImageList *FDragImageList;
  139.     Graphics::TColor FOldBkColor;
  140.     Graphics::TColor FOldBlendColor;
  141.     TDrawingStyle FOldDrawingStyle;
  142.     TImageType FOldImageType;
  143.     void __fastcall AddColor(const System::AnsiString S);
  144.     void __fastcall ClearBitmap(Graphics::TBitmap *Value, Graphics::TColor Color);
  145.     void __fastcall ClearWithFill(Graphics::TBitmap *Bitmap, System::Integer Index);
  146.     void __fastcall DrawFocus(Extctrls::TPanel *Panel);
  147.     System::Integer __fastcall GetImageIndex(Extctrls::TImage *Value);
  148.     TImageInfo *__fastcall GetImageInfo(System::Integer Index);
  149.     Extctrls::TPanel *__fastcall GetPanelFromImage(Extctrls::TImage *Value);
  150.     System::Integer __fastcall GetPanelIndex(Extctrls::TPanel *Value);
  151.     void __fastcall KillFocus(void);
  152.     void __fastcall PaintImageAt(System::Integer Index, System::Integer Position);
  153.     void __fastcall PaintThumbNail(System::Word Start);
  154.     void __fastcall SetStates(void);
  155.     
  156. public:
  157.     void __fastcall AddBitmap(void);
  158.     void __fastcall Center(System::Integer Index);
  159.     void __fastcall Crop(System::Integer Index);
  160.     void __fastcall ChangeImage(System::Integer Index);
  161.     void __fastcall RemoveBitmap(System::Integer Index);
  162.     void __fastcall Stretch(System::Integer Index);
  163.     __property Controls::TImageList * DragImageList = {read=FDragImageList, write=FDragImageList, nodefault
  164.         };
  165.     __property Graphics::TBitmap * ImageBitmap = {read=FImageBitmap, nodefault};
  166.     __property System::Integer Index = {read=FIndex, nodefault};
  167.     __property Classes::TList * InfoList = {read=FInfoList, nodefault};
  168.     __property Controls::TImageList * ImageList = {read=FImageList, nodefault};
  169.     __property TImageInfo * Items[System::Integer Index] = {read=GetImageInfo};
  170.     __property Controls::TImageList * ComponentList = {read=FComponentList, nodefault};
  171. public:
  172.     /* !! TForm.Create */ __fastcall virtual TImageListItems(Classes::TComponent *AOwner) : Forms::TForm(
  173.         AOwner) { }
  174.     /* !! TForm.CreateNew */ __fastcall TImageListItems(Classes::TComponent *AOwner, System::Integer Dummy
  175.         ) : Forms::TForm(AOwner, Dummy) { }
  176.     /* !! TForm.Destroy */ __fastcall virtual ~TImageListItems(void) { }
  177.     
  178. };
  179.  
  180. class __declspec(pascalimplementation) TImageInfo : public System::TObject
  181. {
  182.     typedef TImageInfo ThisClass;
  183.     typedef System::TObject inherited;
  184.     
  185. private:
  186.     TImageOperation FOperation;
  187.     Classes::TList *FOwner;
  188.     TImageListItems *FOwnerForm;
  189.     System::Boolean FCanChangeTransparent;
  190.     System::Boolean FCanChangeFill;
  191.     Graphics::TBitmap *FBitmap;
  192.     Graphics::TColor FTransparentColor;
  193.     Graphics::TColor FFillColor;
  194.     void __fastcall Center(void);
  195.     void __fastcall Crop(void);
  196.     System::Integer __fastcall GetIndex(void);
  197.     void __fastcall SetOperation(TImageOperation Value);
  198.     void __fastcall SetFillColor(Graphics::TColor Value);
  199.     void __fastcall SetTransparentColor(Graphics::TColor Value);
  200.     void __fastcall Stretch(void);
  201.     
  202. public:
  203.     __fastcall TImageInfo(Classes::TList *AOwner, TImageListItems *AOwnerForm);
  204.     __fastcall virtual ~TImageInfo(void);
  205.     void __fastcall Change(void);
  206.     void __fastcall ChangeImage(void);
  207.     __property Graphics::TBitmap * Bitmap = {read=FBitmap, nodefault};
  208.     __property System::Boolean CanChangeFill = {read=FCanChangeFill, nodefault};
  209.     __property System::Boolean CanChangeTransparent = {read=FCanChangeTransparent, nodefault};
  210.     __property Graphics::TColor FillColor = {read=FFillColor, write=SetFillColor, nodefault};
  211.     __property System::Integer Index = {read=GetIndex, nodefault};
  212.     __property TImageOperation Operation = {read=FOperation, write=SetOperation, nodefault};
  213.     __property Classes::TList * Owner = {read=FOwner, nodefault};
  214.     __property TImageListItems * OwnerForm = {read=FOwnerForm, nodefault};
  215.     __property Graphics::TColor TransparentColor = {read=FTransparentColor, write=SetTransparentColor, 
  216.         nodefault};
  217. };
  218.  
  219. class __declspec(delphiclass) TImageDragObject;
  220. class __declspec(pascalimplementation) TImageDragObject : public Controls::TDragControlObject
  221. {
  222.     typedef TImageDragObject ThisClass;
  223.     typedef Controls::TDragControlObject inherited;
  224.     
  225. private:
  226.     TImageListItems *FOwner;
  227.     
  228. public:
  229.     virtual Controls::TCustomImageList *__fastcall GetDragImages(void);
  230.     __property TImageListItems * Owner = {read=FOwner, nodefault};
  231. protected:
  232.     /* !! TDragControlObject.Create */ __fastcall TImageDragObject(Controls::TControl *AControl) : Controls::TDragControlObject(
  233.         AControl) { }
  234.     
  235. public:
  236.     /* !! TObject.Destroy */ __fastcall virtual ~TImageDragObject(void) { }
  237.     
  238. };
  239.  
  240. //-- var, const, procedure ---------------------------------------------------
  241. #define MaxViewableImages System::Byte(6)
  242. extern System::Boolean __fastcall EditImageList(Controls::TImageList *AImageList);
  243.  
  244. }    /* namespace Imglist */
  245. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  246. using namespace Imglist;
  247. #endif
  248. //-- end unit ----------------------------------------------------------------
  249. #endif    // imglist
  250.