{ fpGUI - Free Pascal GUI Library GFX_xxx - Template for new targets Copyright (C) 2006 - 2007 See the file AUTHORS.txt, included in this distribution, for details of the copyright. See the file COPYING.modifiedLGPL, included in this distribution, for details about redistributing fpGUI. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. } unit GFX_xxx; {$ifdef fpc} {$mode delphi}{$H+} {$endif} interface uses SysUtils, Classes, GfxBase; type ExxxError = class(EGfxError); { TxxxFont } TxxxFont = class(TFCustomFont) public class function GetDefaultFontName(const AFontClass: TGfxFontClass): String; override; constructor Create(const Descriptor: String); destructor Destroy; override; end; { TxxxCanvas } TxxxCanvas = class(TFCustomCanvas) protected function DoExcludeClipRect(const ARect: TRect): Boolean; override; function DoIntersectClipRect(const ARect: TRect): Boolean; override; function DoUnionClipRect(const ARect: TRect): Boolean; override; function DoGetClipRect: TRect; override; procedure DoDrawArc(const ARect: TRect; StartAngle, EndAngle: Single); override; procedure DoDrawCircle(const ARect: TRect); override; procedure DoDrawLine(const AFrom, ATo: TPoint); override; procedure DoDrawPoint(const APoint: TPoint); override; procedure DoFillRect(const ARect: TRect); override; procedure DoTextOut(const APosition: TPoint; const AText: String); override; procedure DoCopyRect(ASource: TFCustomCanvas; const ASourceRect: TRect; const ADestPos: TPoint); override; procedure DoMaskedCopyRect(ASource, AMask: TFCustomCanvas; const ASourceRect: TRect; const AMaskPos, ADestPos: TPoint); override; procedure DoDrawImageRect(AImage: TFCustomBitmap; ASourceRect: TRect; const ADestPos: TPoint); override; public constructor Create(AHandle: HDC); destructor Destroy; override; function MapColor(const AColor: TGfxColor): TGfxPixel; override; function FontCellHeight: Integer; override; function TextExtent(const AText: String): TSize; override; procedure SaveState; override; procedure RestoreState; override; procedure EmptyClipRect; override; procedure DoSetColor(AColor: TGfxPixel); override; procedure SetFont(AFont: TFCustomFont); override; procedure SetLineStyle(ALineStyle: TGfxLineStyle); override; end; TxxxWindowCanvas = class(TxxxCanvas) public constructor Create(AWnd: HWND); destructor Destroy; override; end; TxxxBitmapCanvas = class(TxxxCanvas) public constructor Create(ABitmap: HBITMAP; AWidth, AHeight: Integer); destructor Destroy; override; end; { TxxxBitmap } TxxxBitmap = class(TFCustomBitmap) private IsLocked: Boolean; public constructor Create(AWidth, AHeight: Integer; APixelFormat: TGfxPixelFormat); override; destructor Destroy; override; procedure Lock(out AData: Pointer; out AStride: LongWord); override; procedure Unlock; override; end; { TxxxScreen } TxxxScreen = class(TFCustomScreen) public constructor Create; override; end; { TxxxApplication } TxxxApplication = class(TFCustomApplication) private public { default methods } constructor Create; override; destructor Destroy; override; procedure AddWindow(AWindow: TFCustomWindow); override; procedure Initialize(ADisplayName: String = ''); override; procedure Run; override; procedure Quit; override; end; { TxxxWindow } TxxxWindow = class(TFCustomWindow) protected function GetTitle: String; override; procedure SetTitle(const ATitle: String); override; procedure DoSetCursor; override; function GetHandle: PtrUInt; override; public { Constructors / Destructors } constructor Create(AParent: TFCustomWindow; AWindowOptions: TFWindowOptions); override; destructor Destroy; override; { Widget controling methods } procedure SetPosition(const APosition: TPoint); override; procedure SetSize(const ASize: TSize); override; procedure SetMinMaxSize(const AMinSize, AMaxSize: TSize); override; procedure SetClientSize(const ASize: TSize); override; procedure SetMinMaxClientSize(const AMinSize, AMaxSize: TSize); override; procedure Show; override; procedure Invalidate; override; procedure CaptureMouse; override; procedure ReleaseMouse; override; { Event processing methods } procedure EvCreate; override; procedure EvFocusIn; override; procedure EvFocusOut; override; procedure EvHide; override; procedure EvKeyPressed(AKey: Word); override; procedure EvKeyReleased(AKey: Word); override; procedure EvKeyChar(AKeyChar: Char); override; procedure EvMouseEnter(const AMousePos: TPoint); override; procedure EvMouseLeave; override; procedure EvMousePressed(AButton: TMouseButton; const AMousePos: TPoint); override; procedure EvMouseReleased(AButton: TMouseButton; const AMousePos: TPoint); override; procedure EvMouseMove(const AMousePos: TPoint); override; procedure EvMouseWheel(AWheelDelta: Single; const AMousePos: TPoint); override; procedure EvPaint; override; procedure EvMove; override; procedure EvResize; override; procedure EvShow; override; end; implementation uses fpgfx; end.