home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
cb
/
setup
/
cbuilder
/
data.z
/
IMGLIST.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-28
|
9KB
|
225 lines
//----------------------------------------------------------------------------
// imglist.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: imglist.pas
//----------------------------------------------------------------------------
#ifndef imglistHPP
#define imglistHPP
//----------------------------------------------------------------------------
#include <Dialogs.hpp>
#include <Classes.hpp>
#include <Controls.hpp>
#include <ExtCtrls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Graphics.hpp>
#include <SysUtils.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Imglist
{
//-- type declarations -------------------------------------------------------
enum TImageOperation { ioCrop, ioStretch, ioCenter };
class __declspec(delphiclass) TImageInfo;
class __declspec(delphiclass) TImageListItems;
struct TSlotInfo
{
Extctrls::TPanel* Panel;
Extctrls::TImage* Image;
} ;
class __declspec(pascalimplementation) TImageListItems : public Forms::TForm
{
typedef Forms::TForm inherited;
__published:
Stdctrls::TButton* OK;
Stdctrls::TButton* Cancel;
Stdctrls::TGroupBox* MainGroup;
Extctrls::TPanel* PSlot0;
Extctrls::TImage* ISlot0;
Extctrls::TPanel* PSlot1;
Extctrls::TImage* ISlot1;
Extctrls::TPanel* PSlot2;
Extctrls::TImage* ISlot2;
Extctrls::TPanel* PSlot3;
Extctrls::TImage* ISlot3;
Extctrls::TPanel* PSlot4;
Extctrls::TImage* ISlot4;
Stdctrls::TScrollBar* ScrollBar;
Stdctrls::TGroupBox* ImageGroup;
Extctrls::TPanel* Panel4;
Extctrls::TImage* MainImage;
Extctrls::TPanel* PSlot5;
Extctrls::TImage* ISlot5;
Dialogs::TOpenDialog* OpenDialog;
Extctrls::TPanel* ThumbPanel;
Extctrls::TRadioGroup* OptionsGroup;
Stdctrls::TButton* Apply;
Stdctrls::TComboBox* TransparentColor;
Stdctrls::TLabel* Label1;
Stdctrls::TLabel* Label2;
Stdctrls::TComboBox* FillColor;
Stdctrls::TButton* Add;
Stdctrls::TButton* Delete;
Stdctrls::TButton* Clear;
Stdctrls::TButton* Help;
void __fastcall AddClick(System::TObject* Sender);
void __fastcall DeleteClick(System::TObject* Sender);
void __fastcall ClearClick(System::TObject* Sender);
void __fastcall FormCreate(System::TObject* Sender);
void __fastcall ScrollBarChange(System::TObject* Sender);
void __fastcall PSlotEnter(System::TObject* Sender);
void __fastcall ISlot0Click(System::TObject* Sender);
void __fastcall ISlot1Click(System::TObject* Sender);
void __fastcall ISlot2Click(System::TObject* Sender);
void __fastcall ISlot3Click(System::TObject* Sender);
void __fastcall ISlot4Click(System::TObject* Sender);
void __fastcall ISlot5Click(System::TObject* Sender);
void __fastcall FormDestroy(System::TObject* Sender);
void __fastcall OptionsGroupClick(System::TObject* Sender);
void __fastcall ApplyClick(System::TObject* Sender);
void __fastcall TransparentColorChange(System::TObject* Sender);
void __fastcall FillColorChange(System::TObject* Sender);
void __fastcall ISlotStartDrag(System::TObject* Sender, Controls::TDragObject* &DragObject);
void __fastcall ISlotEndDrag(System::TObject* Sender, System::TObject* Target, int X, int Y);
void __fastcall ISlotDragOver(System::TObject* Sender, System::TObject* Source, int X, int Y, Controls::TDragState
State, bool &Accept);
void __fastcall ISlotDragDrop(System::TObject* Sender, System::TObject* Source, int X, int Y);
void __fastcall ISlotMouseDown(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState
Shift, int X, int Y);
void __fastcall TransparentColorExit(System::TObject* Sender);
void __fastcall FillColorExit(System::TObject* Sender);
private:
Classes::TList* FInfoList;
Controls::TImageList* FImageList;
Graphics::TBitmap* FImageBitmap;
int FIndex;
Controls::TImageList* FComponentList;
TSlotInfo FImages[6];
Controls::TImageList* FDragImageList;
Graphics::TColor FOldBkColor;
Graphics::TColor FOldBlendColor;
TDrawingStyle FOldDrawingStyle;
TImageType FOldImageType;
void __fastcall AddColor(const System::AnsiString S);
void __fastcall ClearBitmap(Graphics::TBitmap* Value, Graphics::TColor Color);
void __fastcall ClearWithFill(Graphics::TBitmap* Bitmap, int Index);
void __fastcall DrawFocus(Extctrls::TPanel* Panel);
int __fastcall GetImageIndex(Extctrls::TImage* Value);
TImageInfo* __fastcall GetImageInfo(int Index);
Extctrls::TPanel* __fastcall GetPanelFromImage(Extctrls::TImage* Value);
int __fastcall GetPanelIndex(Extctrls::TPanel* Value);
void __fastcall KillFocus(void);
void __fastcall PaintImageAt(int Index, int Position);
void __fastcall PaintThumbNail(Word Start);
void __fastcall SetStates(void);
public:
void __fastcall AddBitmap(void);
void __fastcall Center(int Index);
void __fastcall Crop(int Index);
void __fastcall ChangeImage(int Index);
void __fastcall RemoveBitmap(int Index);
void __fastcall Stretch(int Index);
__property Controls::TImageList* DragImageList = {read=FDragImageList, write=FDragImageList, nodefault
};
__property Graphics::TBitmap* ImageBitmap = {read=FImageBitmap, nodefault};
__property int Index = {read=FIndex, nodefault};
__property Classes::TList* InfoList = {read=FInfoList, nodefault};
__property Controls::TImageList* ImageList = {read=FImageList, nodefault};
__property TImageInfo* Items[int Index] = {read=GetImageInfo};
__property Controls::TImageList* ComponentList = {read=FComponentList, nodefault};
public:
/* TForm.Create */ __fastcall virtual TImageListItems(Classes::TComponent* AOwner) : Forms::TForm(AOwner
) { }
/* TForm.CreateNew */ __fastcall TImageListItems(Classes::TComponent* AOwner, int Dummy) : Forms::TForm(
AOwner, Dummy) { }
/* TForm.Destroy */ __fastcall virtual ~TImageListItems(void) { }
public:
/* TWinControl.CreateParented */ __fastcall TImageListItems(HWND ParentWindow) : Forms::TForm(ParentWindow
) { }
};
class __declspec(pascalimplementation) TImageInfo : public System::TObject
{
typedef System::TObject inherited;
private:
TImageOperation FOperation;
Classes::TList* FOwner;
TImageListItems* FOwnerForm;
bool FCanChangeTransparent;
bool FCanChangeFill;
Graphics::TBitmap* FBitmap;
Graphics::TColor FTransparentColor;
Graphics::TColor FFillColor;
void __fastcall Center(void);
void __fastcall Crop(void);
int __fastcall GetIndex(void);
void __fastcall SetOperation(TImageOperation Value);
void __fastcall SetFillColor(Graphics::TColor Value);
void __fastcall SetTransparentColor(Graphics::TColor Value);
void __fastcall Stretch(void);
public:
__fastcall TImageInfo(Classes::TList* AOwner, TImageListItems* AOwnerForm);
__fastcall virtual ~TImageInfo(void);
void __fastcall Change(void);
void __fastcall ChangeImage(void);
__property Graphics::TBitmap* Bitmap = {read=FBitmap, nodefault};
__property bool CanChangeFill = {read=FCanChangeFill, nodefault};
__property bool CanChangeTransparent = {read=FCanChangeTransparent, nodefault};
__property Graphics::TColor FillColor = {read=FFillColor, write=SetFillColor, nodefault};
__property int Index = {read=GetIndex, nodefault};
__property TImageOperation Operation = {read=FOperation, write=SetOperation, nodefault};
__property Classes::TList* Owner = {read=FOwner, nodefault};
__property TImageListItems* OwnerForm = {read=FOwnerForm, nodefault};
__property Graphics::TColor TransparentColor = {read=FTransparentColor, write=SetTransparentColor,
nodefault};
};
class __declspec(delphiclass) TImageDragObject;
class __declspec(pascalimplementation) TImageDragObject : public Controls::TDragControlObject
{
typedef Controls::TDragControlObject inherited;
private:
TImageListItems* FOwner;
public:
virtual Controls::TCustomImageList* __fastcall GetDragImages(void);
__property TImageListItems* Owner = {read=FOwner, nodefault};
protected:
/* TDragControlObject.Create */ __fastcall TImageDragObject(Controls::TControl* AControl) : Controls::
TDragControlObject(AControl) { }
public:
/* TObject.Destroy */ __fastcall virtual ~TImageDragObject(void) { }
};
//-- var, const, procedure ---------------------------------------------------
#define MaxViewableImages (Byte)(6)
extern bool __fastcall EditImageList(Controls::TImageList* AImageList);
} /* namespace Imglist */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Imglist;
#endif
//-- end unit ----------------------------------------------------------------
#endif // imglist