home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- // Graphics.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
- // From: Graphics.pas
- //----------------------------------------------------------------------------
- #ifndef GraphicsHPP
- #define GraphicsHPP
- //----------------------------------------------------------------------------
- #include <Classes.hpp>
- #include <SysUtils.hpp>
- #include <Windows.hpp>
- #include <System.hpp>
- #pragma warn -par
- #pragma warn -hid
- #pragma warn -inl
-
- namespace Graphics
- {
- //-- type declarations -------------------------------------------------------
- enum TColor {clMin=-0x7fffffff-1, clMax=0x7fffffff};
-
- class __declspec(delphiclass) EInvalidGraphic;
- class __declspec(pascalimplementation) EInvalidGraphic : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall EInvalidGraphic(const System::AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- /* Exception.CreateFmt */ __fastcall EInvalidGraphic(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EInvalidGraphic(int Ident) : Sysutils::Exception(Ident) { }
- /* Exception.CreateResFmt */ __fastcall EInvalidGraphic(int Ident, const System::TVarRec * Args, const
- int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EInvalidGraphic(const System::AnsiString Msg, int AHelpContext
- ) : Sysutils::Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EInvalidGraphic(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall EInvalidGraphic(int Ident, int AHelpContext) : Sysutils::Exception(
- Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EInvalidGraphic(int Ident, const System::TVarRec * Args
- , const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext
- ) { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EInvalidGraphic(void) { }
-
- };
-
- class __declspec(delphiclass) EInvalidGraphicOperation;
- class __declspec(pascalimplementation) EInvalidGraphicOperation : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall EInvalidGraphicOperation(const System::AnsiString Msg) : Sysutils::
- Exception(Msg) { }
- /* Exception.CreateFmt */ __fastcall EInvalidGraphicOperation(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EInvalidGraphicOperation(int Ident) : Sysutils::Exception(Ident
- ) { }
- /* Exception.CreateResFmt */ __fastcall EInvalidGraphicOperation(int Ident, const System::TVarRec *
- Args, const int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EInvalidGraphicOperation(const System::AnsiString Msg, int AHelpContext
- ) : Sysutils::Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EInvalidGraphicOperation(const System::AnsiString Msg, const
- System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size
- , AHelpContext) { }
- /* Exception.CreateResHelp */ __fastcall EInvalidGraphicOperation(int Ident, int AHelpContext) : Sysutils::
- Exception(Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EInvalidGraphicOperation(int Ident, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext
- ) { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EInvalidGraphicOperation(void) { }
-
- };
-
- struct TResData
- {
- int Handle;
- } ;
-
- enum TFontStyle { fsBold, fsItalic, fsUnderline, fsStrikeOut };
-
- typedef Set<TFontStyle, fsBold, fsStrikeOut> TFontStyles;
-
- enum TFontPitch { fpDefault, fpVariable, fpFixed };
-
- typedef SmallString<31> TFontName;
-
- typedef Byte TFontCharset;
-
- struct TFontData
- {
- HFONT Handle;
- int Height;
- TFontPitch Pitch;
- TFontStyles Style;
- TFontCharset Charset;
- TFontName Name;
- } ;
-
- typedef DummySet<TFontStyle, fsBold, fsStrikeOut> TDummyFontStyles;
-
- typedef DummySmallString<31> TDummyFontName;
-
- struct TDummyFontData
- {
- HFONT Handle;
- int Height;
- TFontPitch Pitch;
- TDummyFontStyles Style;
- TFontCharset Charset;
- TDummyFontName Name;
- } ;
-
- enum TPenStyle { psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear, psInsideFrame };
-
- enum TPenMode { pmBlack, pmWhite, pmNop, pmNot, pmCopy, pmNotCopy, pmMergePenNot, pmMaskPenNot, pmMergeNotPen,
- pmMaskNotPen, pmMerge, pmNotMerge, pmMask, pmNotMask, pmXor, pmNotXor };
-
- struct TPenData
- {
- HPEN Handle;
- TColor Color;
- int Width;
- TPenStyle Style;
- } ;
-
- enum TBrushStyle { bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross
- };
-
- class __declspec(delphiclass) TBitmap;
- class __declspec(delphiclass) TGraphic;
- class __declspec(delphiclass) TCanvas;
- class __declspec(pascalimplementation) TGraphic : public Classes::TPersistent
- {
- typedef Classes::TPersistent inherited;
-
- private:
- Classes::TNotifyEvent FOnChange;
- bool FModified;
- Byte FReserved;
- void __fastcall SetModified(bool Value);
-
- protected:
- __fastcall virtual TGraphic(void);
- void __fastcall Changed(System::TObject* Sender);
- virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
- virtual void __fastcall Draw(TCanvas* ACanvas, const Windows::TRect &Rect) = 0;
- virtual bool __fastcall Equals(TGraphic* Graphic);
- virtual bool __fastcall GetEmpty(void) = 0;
- virtual int __fastcall GetHeight(void) = 0;
- virtual int __fastcall GetWidth(void) = 0;
- virtual void __fastcall ReadData(Classes::TStream* Stream);
- virtual void __fastcall SetHeight(int Value) = 0;
- virtual void __fastcall SetWidth(int Value) = 0;
- virtual void __fastcall WriteData(Classes::TStream* Stream);
-
- public:
- virtual void __fastcall LoadFromFile(const System::AnsiString Filename);
- virtual void __fastcall SaveToFile(const System::AnsiString Filename);
- virtual void __fastcall LoadFromStream(Classes::TStream* Stream) = 0;
- virtual void __fastcall SaveToStream(Classes::TStream* Stream) = 0;
- virtual void __fastcall LoadFromClipboardFormat(Word AFormat, int AData, HPALETTE APalette) = 0;
- virtual void __fastcall SaveToClipboardFormat(Word &AFormat, int &AData, HPALETTE &APalette) = 0;
- __property bool Empty = {read=GetEmpty, nodefault};
- __property int Height = {read=GetHeight, write=SetHeight, nodefault};
- __property bool Modified = {read=FModified, write=SetModified, nodefault};
- __property int Width = {read=GetWidth, write=SetWidth, nodefault};
- __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
- public:
- /* TObject.Destroy */ __fastcall virtual ~TGraphic(void) { }
-
- };
-
- class __declspec(delphiclass) TBitmapImage;
- class __declspec(delphiclass) TInternalImage;
- class __declspec(pascalimplementation) TInternalImage : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- int FRefCount;
- Classes::TCustomMemoryStream* FMemoryImage;
- void __fastcall Reference(void);
- void __fastcall Release(void);
- virtual void __fastcall FreeHandle(void) = 0;
- public:
- /* TObject.Create */ __fastcall TInternalImage(void) : System::TObject() { }
- /* TObject.Destroy */ __fastcall virtual ~TInternalImage(void) { }
-
- };
-
- enum TDIBType { dtNone, dtWin, dtPM };
-
- class __declspec(pascalimplementation) TBitmapImage : public TInternalImage
- {
- typedef TInternalImage inherited;
-
- private:
- HBITMAP FHandle;
- HPALETTE FPalette;
- int FWidth;
- int FHeight;
- void *FDIBHeader;
- void *FDIBBits;
- bool FMonochrome;
- TDIBType FDIBType;
- virtual void __fastcall FreeHandle(void);
- public:
- /* TObject.Create */ __fastcall TBitmapImage(void) : Graphics::TInternalImage() { }
- /* TObject.Destroy */ __fastcall virtual ~TBitmapImage(void) { }
-
- };
-
- class __declspec(pascalimplementation) TBitmap : public TGraphic
- {
- typedef TGraphic inherited;
-
- private:
- TBitmapImage* FImage;
- TCanvas* FCanvas;
- bool FIgnorePalette;
- void __fastcall Changing(System::TObject* Sender);
- void __fastcall CopyImage(HBITMAP AHandle, HPALETTE APalette, int AWidth, int AHeight, bool AMonochrome
- );
- void __fastcall FreeContext(void);
- TCanvas* __fastcall GetCanvas(void);
- virtual HBITMAP __fastcall GetHandle(void);
- bool __fastcall GetMonochrome(void);
- HPALETTE __fastcall GetPalette(void);
- TColor __fastcall GetTransparentColor(void);
- void __fastcall HandleNeeded(void);
- void __fastcall ReadStream(long Size, Classes::TStream* Stream);
- void __fastcall ReadStreamDIB(Classes::TCustomMemoryStream* Image);
- void __fastcall SetHandle(HBITMAP Value);
- void __fastcall SetMonochrome(bool Value);
- void __fastcall SetPalette(HPALETTE Value);
- void __fastcall MemoryImageNeeded(void);
- void __fastcall PaletteNeeded(void);
- void __fastcall NewImage(HBITMAP NewHandle, HPALETTE NewPalette, int NewWidth, int NewHeight, bool
- NewMonochrome, Classes::TCustomMemoryStream* NewImage, TDIBType NewDIBType, void * NewDIBHeader, void *
- NewDIBBits);
- void __fastcall WriteStream(Classes::TStream* Stream, bool WriteSize);
-
- protected:
- virtual void __fastcall Draw(TCanvas* ACanvas, const Windows::TRect &Rect);
- virtual bool __fastcall GetEmpty(void);
- virtual int __fastcall GetHeight(void);
- virtual int __fastcall GetWidth(void);
- virtual void __fastcall ReadData(Classes::TStream* Stream);
- virtual void __fastcall SetWidth(int Value);
- virtual void __fastcall SetHeight(int Value);
- virtual void __fastcall WriteData(Classes::TStream* Stream);
-
- public:
- __fastcall virtual TBitmap(void);
- __fastcall virtual ~TBitmap(void);
- virtual void __fastcall Assign(Classes::TPersistent* Source);
- void __fastcall Dormant(void);
- void __fastcall FreeImage(void);
- virtual void __fastcall LoadFromClipboardFormat(Word AFormat, int AData, HPALETTE APalette);
- virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
- void __fastcall LoadFromResourceName(int Instance, const System::AnsiString ResName);
- void __fastcall LoadFromResourceID(int Instance, int ResID);
- HBITMAP __fastcall ReleaseHandle(void);
- HPALETTE __fastcall ReleasePalette(void);
- virtual void __fastcall SaveToClipboardFormat(Word &Format, int &Data, HPALETTE &APalette);
- virtual void __fastcall SaveToStream(Classes::TStream* Stream);
- __property TCanvas* Canvas = {read=GetCanvas, nodefault};
- __property HBITMAP Handle = {read=GetHandle, write=SetHandle, nodefault};
- __property bool Monochrome = {read=GetMonochrome, write=SetMonochrome, nodefault};
- __property HPALETTE Palette = {read=GetPalette, write=SetPalette, nodefault};
- __property bool IgnorePalette = {read=FIgnorePalette, write=FIgnorePalette, nodefault};
- __property TColor TransparentColor = {read=GetTransparentColor, nodefault};
- };
-
- struct TBrushData
- {
- HBRUSH Handle;
- TColor Color;
- TBitmap* Bitmap;
- TBrushStyle Style;
- } ;
-
- struct TResource;
- typedef TResource *PResource;
-
- struct TResource
- {
- TResource *Next;
- int RefCount;
- int Handle;
- Word HashCode;
- union
- {
- TBrushData Brush;
- TPenData Pen;
- TDummyFontData Font;
- TResData Data;
-
- };
- } ;
-
- class __declspec(delphiclass) TGraphicsObject;
- class __declspec(pascalimplementation) TGraphicsObject : public Classes::TPersistent
- {
- typedef Classes::TPersistent inherited;
-
- private:
- Classes::TNotifyEvent FOnChange;
- TResource *FResource;
-
- protected:
- virtual void __fastcall Changed(void);
-
- public:
- __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
- public:
- /* TObject.Create */ __fastcall TGraphicsObject(void) : Classes::TPersistent() { }
- /* TObject.Destroy */ __fastcall virtual ~TGraphicsObject(void) { }
-
- };
-
- class __declspec(delphiclass) TFont;
- class __declspec(pascalimplementation) TFont : public TGraphicsObject
- {
- typedef TGraphicsObject inherited;
-
- private:
- TColor FColor;
- int FPixelsPerInch;
- void __fastcall GetData(TFontData &FontData);
- void __fastcall SetData(const TFontData &FontData);
-
- protected:
- HFONT __fastcall GetHandle(void);
- int __fastcall GetHeight(void);
- TFontName __fastcall GetName(void);
- TFontPitch __fastcall GetPitch(void);
- int __fastcall GetSize(void);
- TFontStyles __fastcall GetStyle(void);
- TFontCharset __fastcall GetCharset(void);
- void __fastcall SetColor(TColor Value);
- void __fastcall SetHandle(HFONT Value);
- void __fastcall SetHeight(int Value);
- void __fastcall SetName(const TFontName &Value);
- void __fastcall SetPitch(TFontPitch Value);
- void __fastcall SetSize(int Value);
- void __fastcall SetStyle(TFontStyles Value);
- void __fastcall SetCharset(TFontCharset Value);
-
- public:
- __fastcall TFont(void);
- __fastcall virtual ~TFont(void);
- virtual void __fastcall Assign(Classes::TPersistent* Source);
- __property HFONT Handle = {read=GetHandle, write=SetHandle, nodefault};
- __property int PixelsPerInch = {read=FPixelsPerInch, write=FPixelsPerInch, nodefault};
-
- __published:
- __property TFontCharset Charset = {read=GetCharset, write=SetCharset, nodefault};
- __property TColor Color = {read=FColor, write=SetColor, nodefault};
- __property int Height = {read=GetHeight, write=SetHeight, nodefault};
- __property TFontName Name = {read=GetName, write=SetName};
- __property TFontPitch Pitch = {read=GetPitch, write=SetPitch, default=0};
- __property int Size = {read=GetSize, write=SetSize, stored=false, nodefault};
- __property TFontStyles Style = {read=GetStyle, write=SetStyle, nodefault};
- };
-
- class __declspec(delphiclass) TPen;
- class __declspec(pascalimplementation) TPen : public TGraphicsObject
- {
- typedef TGraphicsObject inherited;
-
- private:
- TPenMode FMode;
- void __fastcall GetData(TPenData &PenData);
- void __fastcall SetData(const TPenData &PenData);
-
- protected:
- TColor __fastcall GetColor(void);
- void __fastcall SetColor(TColor Value);
- HPEN __fastcall GetHandle(void);
- void __fastcall SetHandle(HPEN Value);
- void __fastcall SetMode(TPenMode Value);
- TPenStyle __fastcall GetStyle(void);
- void __fastcall SetStyle(TPenStyle Value);
- int __fastcall GetWidth(void);
- void __fastcall SetWidth(int Value);
-
- public:
- __fastcall TPen(void);
- __fastcall virtual ~TPen(void);
- virtual void __fastcall Assign(Classes::TPersistent* Source);
- __property HPEN Handle = {read=GetHandle, write=SetHandle, nodefault};
-
- __published:
- __property TColor Color = {read=GetColor, write=SetColor, default=0};
- __property TPenMode Mode = {read=FMode, write=SetMode, default=4};
- __property TPenStyle Style = {read=GetStyle, write=SetStyle, default=0};
- __property int Width = {read=GetWidth, write=SetWidth, default=1};
- };
-
- class __declspec(delphiclass) TBrush;
- class __declspec(pascalimplementation) TBrush : public TGraphicsObject
- {
- typedef TGraphicsObject inherited;
-
- private:
- void __fastcall GetData(TBrushData &BrushData);
- void __fastcall SetData(const TBrushData &BrushData);
-
- protected:
- TBitmap* __fastcall GetBitmap(void);
- void __fastcall SetBitmap(TBitmap* Value);
- TColor __fastcall GetColor(void);
- void __fastcall SetColor(TColor Value);
- HBRUSH __fastcall GetHandle(void);
- void __fastcall SetHandle(HBRUSH Value);
- TBrushStyle __fastcall GetStyle(void);
- void __fastcall SetStyle(TBrushStyle Value);
-
- public:
- __fastcall TBrush(void);
- __fastcall virtual ~TBrush(void);
- virtual void __fastcall Assign(Classes::TPersistent* Source);
- __property TBitmap* Bitmap = {read=GetBitmap, write=SetBitmap, nodefault};
- __property HBRUSH Handle = {read=GetHandle, write=SetHandle, nodefault};
-
- __published:
- __property TColor Color = {read=GetColor, write=SetColor, default=16777215};
- __property TBrushStyle Style = {read=GetStyle, write=SetStyle, default=0};
- };
-
- enum TFillStyle { fsSurface, fsBorder };
-
- enum TFillMode { fmAlternate, fmWinding };
-
- typedef long TCopyMode;
-
- enum TCanvasStates { csHandleValid, csFontValid, csPenValid, csBrushValid };
-
- typedef Set<TCanvasStates, csHandleValid, csBrushValid> TCanvasState;
-
- class __declspec(pascalimplementation) TCanvas : public Classes::TPersistent
- {
- typedef Classes::TPersistent inherited;
-
- private:
- HDC FHandle;
- TCanvasState State;
- TFont* FFont;
- TPen* FPen;
- TBrush* FBrush;
- POINT FPenPos;
- long FCopyMode;
- Classes::TNotifyEvent FOnChange;
- Classes::TNotifyEvent FOnChanging;
- void __fastcall CreateBrush(void);
- void __fastcall CreateFont(void);
- void __fastcall CreatePen(void);
- void __fastcall BrushChanged(System::TObject* ABrush);
- void __fastcall DeselectHandles(void);
- Windows::TRect __fastcall GetClipRect(void);
- HDC __fastcall GetHandle(void);
- POINT __fastcall GetPenPos(void);
- TColor __fastcall GetPixel(int X, int Y);
- void __fastcall FontChanged(System::TObject* AFont);
- void __fastcall PenChanged(System::TObject* APen);
- void __fastcall SetBrush(TBrush* Value);
- void __fastcall SetFont(TFont* Value);
- void __fastcall SetHandle(HDC Value);
- void __fastcall SetPen(TPen* Value);
- void __fastcall SetPenPos(const POINT &Value);
- void __fastcall SetPixel(int X, int Y, TColor Value);
-
- protected:
- virtual void __fastcall Changed(void);
- virtual void __fastcall Changing(void);
- virtual void __fastcall CreateHandle(void);
- void __fastcall RequiredState(TCanvasState ReqState);
-
- public:
- __fastcall TCanvas(void);
- __fastcall virtual ~TCanvas(void);
- void __fastcall Arc(int X1, int Y1, int X2, int Y2, int X3, int Y3, int X4, int Y4);
- void __fastcall BrushCopy(const Windows::TRect &Dest, TBitmap* Bitmap, const Windows::TRect &Source
- , TColor Color);
- void __fastcall Chord(int X1, int Y1, int X2, int Y2, int X3, int Y3, int X4, int Y4);
- void __fastcall CopyRect(const Windows::TRect &Dest, TCanvas* Canvas, const Windows::TRect &Source)
- ;
- void __fastcall Draw(int X, int Y, TGraphic* Graphic);
- void __fastcall DrawFocusRect(const Windows::TRect &Rect);
- void __fastcall Ellipse(int X1, int Y1, int X2, int Y2);
- void __fastcall FillRect(const Windows::TRect &Rect);
- void __fastcall FloodFill(int X, int Y, TColor Color, TFillStyle FillStyle);
- void __fastcall FrameRect(const Windows::TRect &Rect);
- void __fastcall LineTo(int X, int Y);
- void __fastcall MoveTo(int X, int Y);
- void __fastcall Pie(int X1, int Y1, int X2, int Y2, int X3, int Y3, int X4, int Y4);
- void __fastcall Polygon(const POINT * Points, const int Points_Size);
- void __fastcall Polyline(const POINT * Points, const int Points_Size);
- void __fastcall Rectangle(int X1, int Y1, int X2, int Y2);
- void __fastcall Refresh(void);
- void __fastcall RoundRect(int X1, int Y1, int X2, int Y2, int X3, int Y3);
- void __fastcall StretchDraw(const Windows::TRect &Rect, TGraphic* Graphic);
- int __fastcall TextHeight(const System::AnsiString Text);
- void __fastcall TextOut(int X, int Y, const System::AnsiString Text);
- void __fastcall TextRect(const Windows::TRect &Rect, int X, int Y, const System::AnsiString Text);
- int __fastcall TextWidth(const System::AnsiString Text);
- __property Windows::TRect ClipRect = {read=GetClipRect};
- __property HDC Handle = {read=GetHandle, write=SetHandle, nodefault};
- __property POINT PenPos = {read=GetPenPos, write=SetPenPos};
- __property TColor Pixels[int X][int Y] = {read=GetPixel, write=SetPixel};
- __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
- __property Classes::TNotifyEvent OnChanging = {read=FOnChanging, write=FOnChanging};
-
- __published:
- __property TBrush* Brush = {read=FBrush, write=SetBrush, nodefault};
- __property long CopyMode = {read=FCopyMode, write=FCopyMode, default=13369376};
- __property TFont* Font = {read=FFont, write=SetFont, nodefault};
- __property TPen* Pen = {read=FPen, write=SetPen, nodefault};
- };
-
- typedef System::TMetaClass*TGraphicClass;
-
- class __declspec(delphiclass) TPicture;
- class __declspec(delphiclass) TIcon;
- class __declspec(delphiclass) TMetafile;
- class __declspec(pascalimplementation) TPicture : public Classes::TPersistent
- {
- typedef Classes::TPersistent inherited;
-
- private:
- TGraphic* FGraphic;
- Classes::TNotifyEvent FOnChange;
- void __fastcall ForceType(System::TMetaClass* GraphicType);
- TBitmap* __fastcall GetBitmap(void);
- int __fastcall GetHeight(void);
- TIcon* __fastcall GetIcon(void);
- TMetafile* __fastcall GetMetafile(void);
- int __fastcall GetWidth(void);
- void __fastcall ReadData(Classes::TStream* Stream);
- void __fastcall SetBitmap(TBitmap* Value);
- void __fastcall SetGraphic(TGraphic* Value);
- void __fastcall SetIcon(TIcon* Value);
- void __fastcall SetMetafile(TMetafile* Value);
- void __fastcall WriteData(Classes::TStream* Stream);
-
- protected:
- virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
- void __fastcall Changed(System::TObject* Sender);
- virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
-
- public:
- __fastcall virtual ~TPicture(void);
- void __fastcall LoadFromFile(const System::AnsiString Filename);
- void __fastcall SaveToFile(const System::AnsiString Filename);
- void __fastcall LoadFromClipboardFormat(Word AFormat, int AData, HPALETTE APalette);
- void __fastcall SaveToClipboardFormat(Word &AFormat, int &AData, HPALETTE &APalette);
- static /* class method */ bool __fastcall SupportsClipboardFormat(const System::TMetaClass* const vmt,
- Word AFormat);
- virtual void __fastcall Assign(Classes::TPersistent* Source);
- static /* class method */ void __fastcall RegisterFileFormat(const System::TMetaClass* const vmt, const System::AnsiString
- AExtension, const System::AnsiString ADescription, System::TMetaClass* AGraphicClass);
- static /* class method */ void __fastcall RegisterFileFormatRes(const System::TMetaClass* const vmt,
- const System::AnsiString AExtension, int ADescriptionResID, System::TMetaClass* AGraphicClass);
- static /* class method */ void __fastcall RegisterClipboardFormat(const System::TMetaClass* const vmt,
- Word AFormat, System::TMetaClass* AGraphicClass);
- __property TBitmap* Bitmap = {read=GetBitmap, write=SetBitmap, nodefault};
- __property TGraphic* Graphic = {read=FGraphic, write=SetGraphic, nodefault};
- __property int Height = {read=GetHeight, nodefault};
- __property TIcon* Icon = {read=GetIcon, write=SetIcon, nodefault};
- __property TMetafile* Metafile = {read=GetMetafile, write=SetMetafile, nodefault};
- __property int Width = {read=GetWidth, nodefault};
- __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
- public:
- /* TObject.Create */ __fastcall TPicture(void) : Classes::TPersistent() { }
-
- };
-
- class __declspec(delphiclass) TMetafileCanvas;
- class __declspec(pascalimplementation) TMetafileCanvas : public TCanvas
- {
- typedef TCanvas inherited;
-
- private:
- TMetafile* FMetafile;
-
- public:
- __fastcall TMetafileCanvas(TMetafile* AMetafile, HDC ReferenceDevice);
- __fastcall TMetafileCanvas(TMetafile* AMetafile, HDC ReferenceDevice, const System::AnsiString CreatedBy
- , const System::AnsiString Description);
- __fastcall virtual ~TMetafileCanvas(void);
- };
-
- class __declspec(delphiclass) TMetafileImage;
- class __declspec(pascalimplementation) TMetafileImage : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- int FRefCount;
- int FHandle;
- int FWidth;
- int FHeight;
- HPALETTE FPalette;
- Word FInch;
- int FTempWidth;
- int FTempHeight;
- void __fastcall Reference(void);
- void __fastcall Release(void);
- public:
- /* TObject.Create */ __fastcall TMetafileImage(void) : System::TObject() { }
- /* TObject.Destroy */ __fastcall virtual ~TMetafileImage(void) { }
-
- };
-
- class __declspec(pascalimplementation) TMetafile : public TGraphic
- {
- typedef TGraphic inherited;
-
- private:
- TMetafileImage* FImage;
- bool FEnhanced;
- System::AnsiString __fastcall GetAuthor(void);
- System::AnsiString __fastcall GetDesc(void);
- int __fastcall GetHandle(void);
- Word __fastcall GetInch(void);
- int __fastcall GetMMHeight(void);
- int __fastcall GetMMWidth(void);
- HPALETTE __fastcall GetPalette(void);
- void __fastcall NewImage(void);
- void __fastcall SetHandle(int Value);
- void __fastcall SetInch(Word Value);
- void __fastcall SetMMHeight(int Value);
- void __fastcall SetMMWidth(int Value);
- void __fastcall UniqueImage(void);
-
- protected:
- virtual bool __fastcall GetEmpty(void);
- virtual int __fastcall GetHeight(void);
- virtual int __fastcall GetWidth(void);
- virtual void __fastcall Draw(TCanvas* ACanvas, const Windows::TRect &Rect);
- virtual void __fastcall ReadData(Classes::TStream* Stream);
- void __fastcall ReadEMFStream(Classes::TStream* Stream);
- void __fastcall ReadWMFStream(Classes::TStream* Stream, long Length);
- virtual void __fastcall SetHeight(int Value);
- virtual void __fastcall SetWidth(int Value);
- bool __fastcall TestEMF(Classes::TStream* Stream);
- virtual void __fastcall WriteData(Classes::TStream* Stream);
- void __fastcall WriteEMFStream(Classes::TStream* Stream);
- void __fastcall WriteWMFStream(Classes::TStream* Stream);
-
- public:
- __fastcall virtual TMetafile(void);
- __fastcall virtual ~TMetafile(void);
- void __fastcall Clear(void);
- virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
- virtual void __fastcall SaveToFile(const System::AnsiString Filename);
- virtual void __fastcall SaveToStream(Classes::TStream* Stream);
- virtual void __fastcall LoadFromClipboardFormat(Word AFormat, int AData, HPALETTE APalette);
- virtual void __fastcall SaveToClipboardFormat(Word &AFormat, int &AData, HPALETTE &APalette);
- virtual void __fastcall Assign(Classes::TPersistent* Source);
- __property System::AnsiString CreatedBy = {read=GetAuthor, nodefault};
- __property System::AnsiString Description = {read=GetDesc, nodefault};
- __property bool Enhanced = {read=FEnhanced, write=FEnhanced, default=1};
- __property int Handle = {read=GetHandle, write=SetHandle, nodefault};
- __property int MMWidth = {read=GetMMWidth, write=SetMMWidth, nodefault};
- __property int MMHeight = {read=GetMMHeight, write=SetMMHeight, nodefault};
- __property Word Inch = {read=GetInch, write=SetInch, nodefault};
- __property HPALETTE Palette = {read=GetPalette, nodefault};
- };
-
- class __declspec(delphiclass) TIconImage;
- class __declspec(pascalimplementation) TIconImage : public TInternalImage
- {
- typedef TInternalImage inherited;
-
- private:
- HICON FHandle;
- virtual void __fastcall FreeHandle(void);
- public:
- /* TObject.Create */ __fastcall TIconImage(void) : Graphics::TInternalImage() { }
- /* TObject.Destroy */ __fastcall virtual ~TIconImage(void) { }
-
- };
-
- class __declspec(pascalimplementation) TIcon : public TGraphic
- {
- typedef TGraphic inherited;
-
- private:
- TIconImage* FImage;
- HICON __fastcall GetHandle(void);
- void __fastcall HandleNeeded(void);
- void __fastcall ImageNeeded(void);
- void __fastcall NewImage(HICON NewHandle, Classes::TMemoryStream* NewImage);
- void __fastcall SetHandle(HICON Value);
-
- protected:
- virtual void __fastcall Draw(TCanvas* ACanvas, const Windows::TRect &Rect);
- virtual bool __fastcall GetEmpty(void);
- virtual int __fastcall GetHeight(void);
- virtual int __fastcall GetWidth(void);
- virtual void __fastcall SetHeight(int Value);
- virtual void __fastcall SetWidth(int Value);
- virtual void __fastcall LoadFromClipboardFormat(Word AFormat, int AData, HPALETTE APalette);
- virtual void __fastcall SaveToClipboardFormat(Word &Format, int &Data, HPALETTE &APalette);
-
- public:
- __fastcall virtual TIcon(void);
- __fastcall virtual ~TIcon(void);
- virtual void __fastcall Assign(Classes::TPersistent* Source);
- virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
- HICON __fastcall ReleaseHandle(void);
- virtual void __fastcall SaveToStream(Classes::TStream* Stream);
- __property HICON Handle = {read=GetHandle, write=SetHandle, nodefault};
- };
-
- //-- var, const, procedure ---------------------------------------------------
- #define clScrollBar (TColor)(-2147483648)
- #define clBackground (TColor)(-2147483647)
- #define clActiveCaption (TColor)(-2147483646)
- #define clInactiveCaption (TColor)(-2147483645)
- #define clMenu (TColor)(-2147483644)
- #define clWindow (TColor)(-2147483643)
- #define clWindowFrame (TColor)(-2147483642)
- #define clMenuText (TColor)(-2147483641)
- #define clWindowText (TColor)(-2147483640)
- #define clCaptionText (TColor)(-2147483639)
- #define clActiveBorder (TColor)(-2147483638)
- #define clInactiveBorder (TColor)(-2147483637)
- #define clAppWorkSpace (TColor)(-2147483636)
- #define clHighlight (TColor)(-2147483635)
- #define clHighlightText (TColor)(-2147483634)
- #define clBtnFace (TColor)(-2147483633)
- #define clBtnShadow (TColor)(-2147483632)
- #define clGrayText (TColor)(-2147483631)
- #define clBtnText (TColor)(-2147483630)
- #define clInactiveCaptionText (TColor)(-2147483629)
- #define clBtnHighlight (TColor)(-2147483628)
- #define cl3DDkShadow (TColor)(-2147483627)
- #define cl3DLight (TColor)(-2147483626)
- #define clInfoText (TColor)(-2147483625)
- #define clInfoBk (TColor)(-2147483624)
- #define clBlack (TColor)(0)
- #define clMaroon (TColor)(128)
- #define clGreen (TColor)(32768)
- #define clOlive (TColor)(32896)
- #define clNavy (TColor)(8388608)
- #define clPurple (TColor)(8388736)
- #define clTeal (TColor)(8421376)
- #define clGray (TColor)(8421504)
- #define clSilver (TColor)(12632256)
- #define clRed (TColor)(255)
- #define clLime (TColor)(65280)
- #define clYellow (TColor)(65535)
- #define clBlue (TColor)(16711680)
- #define clFuchsia (TColor)(16711935)
- #define clAqua (TColor)(16776960)
- #define clLtGray (TColor)(12632256)
- #define clDkGray (TColor)(8421504)
- #define clWhite (TColor)(16777215)
- #define clNone (TColor)(536870911)
- #define clDefault (TColor)(536870912)
- #define cmBlackness (Byte)(66)
- #define cmDstInvert (int)(5570569)
- #define cmMergeCopy (int)(12583114)
- #define cmMergePaint (int)(12255782)
- #define cmNotSrcCopy (int)(3342344)
- #define cmNotSrcErase (int)(1114278)
- #define cmPatCopy (int)(15728673)
- #define cmPatInvert (int)(5898313)
- #define cmPatPaint (int)(16452105)
- #define cmSrcAnd (int)(8913094)
- #define cmSrcCopy (int)(13369376)
- #define cmSrcErase (int)(4457256)
- #define cmSrcInvert (int)(6684742)
- #define cmSrcPaint (int)(15597702)
- #define cmWhiteness (int)(16711778)
- extern TFontData DefFontData;
- extern void __fastcall PaletteChanged(void);
- extern long __fastcall ColorToRGB(TColor Color);
- extern System::AnsiString __fastcall ColorToString(TColor Color);
- extern TColor __fastcall StringToColor(const System::AnsiString S);
- extern void __fastcall GetColorValues(Classes::TGetStrProc Proc);
- extern bool __fastcall ColorToIdent(long Color, System::AnsiString &Ident);
- extern bool __fastcall IdentToColor(const System::AnsiString Ident, long &Color);
- extern void __fastcall GetCharsetValues(Classes::TGetStrProc Proc);
- extern bool __fastcall CharsetToIdent(long Charset, System::AnsiString &Ident);
- extern bool __fastcall IdentToCharset(const System::AnsiString Ident, long &Charset);
- extern void * __fastcall MemAlloc(long Size);
- extern void __fastcall GetDIBSizes(HBITMAP Bitmap, int &InfoHeaderSize, int &ImageSize);
- extern bool __fastcall GetDIB(HBITMAP Bitmap, HPALETTE Palette, void *BitmapInfo, void *Bits);
- extern void __fastcall FreeMemoryContexts(void);
- extern HPALETTE __fastcall CopyPalette(HPALETTE Palette);
- extern System::AnsiString __fastcall GraphicFilter(System::TMetaClass* GraphicClass);
- extern System::AnsiString __fastcall GraphicExtension(System::TMetaClass* GraphicClass);
- extern TFontCharset __fastcall GetDefFontCharSet(void);
- extern void __fastcall InitGraphics(void);
- //-- template instantiations -------------------------------------------------
- template class TCanvasState ;
- template class TDummyFontStyles ;
- template class SmallString<31> ;
- template class TFontStyles ;
-
- } /* namespace Graphics */
-
- #pragma warn .par
- #pragma warn .hid
- #pragma warn .inl
-
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Graphics;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // Graphics
-