#ifndef TCUSTOMIMAGELIST_H #define TCUSTOMIMAGELIST_H #include #include #include class TCustomImageList : public TComponent { /* TDrawingStyle = (dsFocus, dsSelected, dsNormal, dsTransparent); TImageType = (itImage, itMask); TResType = (rtBitmap, rtCursor, rtIcon); TOverlay = 0..3; TLoadResource = (lrDefaultColor, lrDefaultSize, lrFromFile, lrMap3DColors, lrTransparent, lrMonoChrome); TLoadResources = set of TLoadResource; TCustomImageList = class(TComponent) */ private: vector images; /* FHeight: Integer; FWidth: Integer; FAllocBy: Integer; FHandle: HImageList; FDrawingStyle: TDrawingStyle; FMasked: Boolean; FShareImages: Boolean; FImageType: TImageType; FBkColor: TColor; FBlendColor: TColor; FClients: TList; FBitmap: TBitmap; FMonoBitmap: TBitmap; FChanged: Boolean; FUpdateCount: Integer; FOnChange: TNotifyEvent; procedure AssignTo(Dest: TPersistent); override; procedure BeginUpdate; procedure EndUpdate; procedure InitBitmap; procedure CheckImage(Image: TGraphic); procedure CopyImages(Value: HImageList); procedure CreateImageList; function Equal(IL: TCustomImageList): Boolean; procedure FreeHandle; function GetCount: Integer; function GetBitmapHandle(Bitmap: HBITMAP): HBITMAP; function GetBkColor: TColor; function GetHandle: HImageList; function GetImageHandle(Image, ImageDDB: TBitmap): HBITMAP; procedure InsertImage(Index: Integer; Image, Mask: TBitmap; MaskColor: TColor); procedure ReadData(Stream: TStream); procedure SetBkColor(Value: TColor); procedure SetDrawingStyle(Value: TDrawingStyle); procedure SetHandle(Value: HImageList); procedure SetHeight(Value: Integer); procedure SetNewDimensions(Value: HImageList); procedure SetWidth(Value: Integer); procedure WriteData(Stream: TStream); procedure ReadD2Stream(Stream: TStream); procedure ReadD3Stream(Stream: TStream); protected procedure Change; dynamic; procedure DefineProperties(Filer: TFiler); override; procedure DoDraw(Index: Integer; Canvas: TCanvas; X, Y: Integer; Style: Cardinal; Enabled: Boolean); virtual; procedure GetImages(Index: Integer; Image, Mask: TBitmap); procedure HandleNeeded; procedure Initialize; virtual; */ public: TCustomImageList(TComponent *AOwner); TCustomImageList(int AWidth, int AHeight); virtual ~TCustomImageList(); // int Add(TBitmap *Image, TBitmap *Mask); int Add(gchar **xpm_data, GtkWidget *canvas); // procedure GetBitmap(Index: Integer; Image: TBitmap); // void GetBitmap(int Index, TBitmap *); GtkPixmap *GetPixmap(int Index); /* procedure Assign(Source: TPersistent); override; function AddIcon(Image: TIcon): Integer; procedure AddImages(Value: TCustomImageList); function AddMasked(Image: TBitmap; MaskColor: TColor): Integer; procedure Clear; procedure Delete(Index: Integer); procedure Draw(Canvas: TCanvas; X, Y, Index: Integer; Enabled: Boolean=True); procedure DrawOverlay(Canvas: TCanvas; X, Y: Integer; ImageIndex: Integer; Overlay: TOverlay; Enabled: Boolean=True); function FileLoad(ResType: TResType; Name: string; MaskColor: TColor): Boolean; function GetHotSpot: TPoint; virtual; procedure GetIcon(Index: Integer; Image: TIcon); function GetImageBitmap: HBITMAP; function GetMaskBitmap: HBITMAP; function GetResource(ResType: TResType; Name: string; Width: Integer; LoadFlags: TLoadResources; MaskColor: TColor): Boolean; function GetInstRes(Instance: THandle; ResType: TResType; Name: string; Width: Integer; LoadFlags: TLoadResources; MaskColor: TColor): Boolean; function HandleAllocated: Boolean; procedure Insert(Index: Integer; Image, Mask: TBitmap); procedure InsertIcon(Index: Integer; Image: TIcon); procedure InsertMasked(Index: Integer; Image: TBitmap; MaskColor: TColor); procedure Move(CurIndex, NewIndex: Integer); function Overlay(ImageIndex: Integer; Overlay: TOverlay): Boolean; procedure RegisterChanges(Value: TChangeLink); function ResourceLoad(ResType: TResType; Name: string; MaskColor: TColor): Boolean; function ResInstLoad(Instance: THandle; ResType: TResType; Name: string; MaskColor: TColor): Boolean; procedure Replace(Index: Integer; Image, Mask: TBitmap); procedure ReplaceIcon(Index: Integer; Image: TIcon); procedure ReplaceMasked(Index: Integer; NewImage: TBitmap; MaskColor: TColor); procedure UnRegisterChanges(Value: TChangeLink); property Count: Integer read GetCount; property Handle: HImageList read GetHandle write SetHandle; public property AllocBy: Integer read FAllocBy write FAllocBy default 4; property BlendColor: TColor read FBlendColor write FBlendColor default clNone; property BkColor: TColor read GetBkColor write SetBkColor default clNone; property DrawingStyle: TDrawingStyle read FDrawingStyle write SetDrawingStyle default dsNormal; property Height: Integer read FHeight write SetHeight default 16; property ImageType: TImageType read FImageType write FImageType default itImage; property Masked: Boolean read FMasked write FMasked default True; property ShareImages: Boolean read FShareImages write FShareImages default False; property Width: Integer read FWidth write SetWidth default 16; property OnChange: TNotifyEvent read FOnChange write FOnChange; end; */ }; #endif