mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 05:17:24 +01:00
gtk: rearrange TGtkDeviceContext members
git-svn-id: trunk@20057 -
This commit is contained in:
parent
1eb5c2a539
commit
a533bd1614
@ -305,7 +305,7 @@ type
|
|||||||
procedure SetSelectedColors(AValue: TDevContextSelectedColorsType);
|
procedure SetSelectedColors(AValue: TDevContextSelectedColorsType);
|
||||||
|
|
||||||
function GetGC: pgdkGC;
|
function GetGC: pgdkGC;
|
||||||
private
|
|
||||||
// winapi
|
// winapi
|
||||||
function GetROP2: Integer;
|
function GetROP2: Integer;
|
||||||
procedure SetROP2(AROP: Integer);
|
procedure SetROP2(AROP: Integer);
|
||||||
@ -316,40 +316,49 @@ type
|
|||||||
procedure CreateBrush; virtual;
|
procedure CreateBrush; virtual;
|
||||||
procedure CreatePen; virtual;
|
procedure CreatePen; virtual;
|
||||||
procedure CreateBitmap; virtual;
|
procedure CreateBitmap; virtual;
|
||||||
protected
|
|
||||||
// winapi
|
// winapi
|
||||||
function SelectBitmap(AGdiObject: PGdiObject): PGdiObject; virtual;
|
function SelectBitmap(AGdiObject: PGdiObject): PGdiObject; virtual;
|
||||||
function SelectPen(AGdiObject: PGdiObject): PGdiObject; virtual;
|
function SelectPen(AGdiObject: PGdiObject): PGdiObject; virtual;
|
||||||
public
|
public
|
||||||
|
{$ifdef TraceGdiCalls}
|
||||||
|
StackAddrs: TCallBacksArray;
|
||||||
|
{$endif}
|
||||||
|
PenPos: TPoint;
|
||||||
|
CurrentTextColor: TGDIColor;
|
||||||
|
CurrentBackColor: TGDIColor;
|
||||||
|
DCTextMetric: TDevContextTextMetric; // only valid if dcfTextMetricsValid set
|
||||||
|
PaintRectangle: TRect;// set during paint, BeginPaint/EndPaint
|
||||||
|
SavedContext: TGtkDeviceContext; // linked list of saved DCs
|
||||||
|
|
||||||
constructor Create; virtual;
|
constructor Create; virtual;
|
||||||
procedure CreateGDIObject(AGDIType: TGDIType);
|
procedure CreateGDIObject(AGDIType: TGDIType);
|
||||||
procedure SelectBrushProps; virtual;
|
procedure SelectBrushProps; virtual;
|
||||||
procedure SelectTextProps; virtual;
|
procedure SelectTextProps; virtual;
|
||||||
procedure SelectPenProps; virtual;
|
procedure SelectPenProps; virtual;
|
||||||
procedure SelectRegion;
|
procedure SelectRegion;
|
||||||
function GetFunction: TGdkFunction; virtual; abstract;
|
|
||||||
public
|
|
||||||
// device handles
|
// device handles
|
||||||
|
|
||||||
procedure SetWidget(AWidget: PGtkWidget; AWindow: PGdkWindow;
|
procedure SetWidget(AWidget: PGtkWidget; AWindow: PGdkWindow;
|
||||||
AWithChildWindows: Boolean; ADoubleBuffer: PGdkDrawable = nil);
|
AWithChildWindows: Boolean; ADoubleBuffer: PGdkDrawable = nil);
|
||||||
property Drawable: PGDKDrawable read FDrawable;
|
|
||||||
property Widget: PGtkWidget read FWidget; // the owner
|
|
||||||
|
|
||||||
property GC: pgdkGC read GetGC write FGC;
|
|
||||||
function HasGC: Boolean;
|
function HasGC: Boolean;
|
||||||
procedure ResetGCClipping;
|
procedure ResetGCClipping;
|
||||||
|
procedure Clear;
|
||||||
|
function GetFont: PGdiObject;
|
||||||
|
function GetBrush: PGdiObject;
|
||||||
|
function GetPen: PGdiObject;
|
||||||
|
function GetBitmap: PGdiObject;
|
||||||
|
function GetFunction: TGdkFunction; virtual; abstract;
|
||||||
|
function IsNullBrush: boolean;
|
||||||
|
function IsNullPen: boolean;
|
||||||
|
function SelectObject(AGdiObject: PGdiObject): PGdiObject;
|
||||||
|
procedure SetTextMetricsValid(AValid: Boolean); // temp helper, to allow flag manipulation
|
||||||
|
// help functions
|
||||||
|
function CopyDataFrom(ASource: TGtkDeviceContext; AClearSource, AMoveGDIOwnerShip, ARestore: Boolean): Boolean;
|
||||||
|
function FillRect(ARect: TRect; ABrush: HBrush; SkipRop: Boolean): Boolean;
|
||||||
|
|
||||||
// origins
|
// origins
|
||||||
property Origin: TPoint read FOrigin write FOrigin;
|
property Origin: TPoint read FOrigin write FOrigin;
|
||||||
PenPos: TPoint;
|
|
||||||
|
|
||||||
property Offset: TPoint read GetOffset;
|
property Offset: TPoint read GetOffset;
|
||||||
|
|
||||||
{$ifdef TraceGdiCalls}
|
|
||||||
StackAddrs: TCallBacksArray;
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
// drawing settings
|
// drawing settings
|
||||||
property CurrentBitmap: PGdiObject read FCurrentBitmap write SetCurrentBitmap;
|
property CurrentBitmap: PGdiObject read FCurrentBitmap write SetCurrentBitmap;
|
||||||
property CurrentFont: PGdiObject read FCurrentFont write SetCurrentFont;
|
property CurrentFont: PGdiObject read FCurrentFont write SetCurrentFont;
|
||||||
@ -359,35 +368,15 @@ type
|
|||||||
property ClipRegion: PGdiObject read FClipRegion write SetClipRegion;
|
property ClipRegion: PGdiObject read FClipRegion write SetClipRegion;
|
||||||
property GCValues: TGdkGCValues read FGCValues;
|
property GCValues: TGdkGCValues read FGCValues;
|
||||||
property GDIObjects[ID: TGDIType]: PGdiObject read GetGDIObjects write SetGDIObjects;
|
property GDIObjects[ID: TGDIType]: PGdiObject read GetGDIObjects write SetGDIObjects;
|
||||||
CurrentTextColor: TGDIColor;
|
|
||||||
CurrentBackColor: TGDIColor;
|
|
||||||
DCTextMetric: TDevContextTextMetric; // only valid if dcfTextMetricsValid set
|
|
||||||
PaintRectangle: TRect;// set during paint, BeginPaint/EndPaint
|
|
||||||
|
|
||||||
// control
|
// control
|
||||||
property SelectedColors: TDevContextSelectedColorsType read FSelectedColors write SetSelectedColors;
|
property SelectedColors: TDevContextSelectedColorsType read FSelectedColors write SetSelectedColors;
|
||||||
SavedContext: TGtkDeviceContext; // linked list of saved DCs
|
|
||||||
property Flags: TDeviceContextsFlags read FFlags write FFlags;
|
property Flags: TDeviceContextsFlags read FFlags write FFlags;
|
||||||
procedure SetTextMetricsValid(AValid: Boolean); // temp helper, to allow flag manipulation
|
|
||||||
property OwnedGDIObjects[ID: TGDIType]: PGdiObject read GetOwnedGDIObjects write SetOwnedGDIObjects;
|
property OwnedGDIObjects[ID: TGDIType]: PGdiObject read GetOwnedGDIObjects write SetOwnedGDIObjects;
|
||||||
|
property Drawable: PGDKDrawable read FDrawable;
|
||||||
procedure Clear;
|
property Widget: PGtkWidget read FWidget; // the owner
|
||||||
function GetFont: PGdiObject;
|
property GC: pgdkGC read GetGC write FGC;
|
||||||
function GetBrush: PGdiObject;
|
|
||||||
function GetPen: PGdiObject;
|
|
||||||
function GetBitmap: PGdiObject;
|
|
||||||
|
|
||||||
function IsNullBrush: boolean;
|
|
||||||
function IsNullPen: boolean;
|
|
||||||
|
|
||||||
function CopyDataFrom(ASource: TGtkDeviceContext; AClearSource, AMoveGDIOwnerShip, ARestore: Boolean): Boolean;
|
|
||||||
function FillRect(ARect: TRect; ABrush: HBrush; SkipRop: Boolean): Boolean;
|
|
||||||
public
|
|
||||||
// winapi
|
// winapi
|
||||||
function SelectObject(AGdiObject: PGdiObject): PGdiObject;
|
|
||||||
|
|
||||||
property ROP2: Integer read GetRop2 write SetRop2;
|
property ROP2: Integer read GetRop2 write SetRop2;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// memory system for TDeviceContext(s) ---------------------------------------------
|
// memory system for TDeviceContext(s) ---------------------------------------------
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user