home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 May / VPR9705A.ISO / VPR_DATA / PROGRAM / CBTRIAL / SETUP / DATA.Z / IMGLIST.HPP < prev    next >
C/C++ Source or Header  |  1997-02-14  |  9KB  |  225 lines

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