mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-05 01:41:35 +02:00
TCustomNotebook now allows pageclass descendents
git-svn-id: trunk@5509 -
This commit is contained in:
parent
061c085a73
commit
4caaeaba2c
223
lcl/graphics.pp
223
lcl/graphics.pp
@ -4,7 +4,7 @@
|
|||||||
graphics.pp
|
graphics.pp
|
||||||
-----------
|
-----------
|
||||||
Graphic Controls
|
Graphic Controls
|
||||||
Initial Revision : Mon Jul 26 0:02:58 1999
|
Initial Revision : Mon Jul 26 0:02:58 1999
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
@ -61,42 +61,42 @@ type
|
|||||||
TFontStylesbase = set of TFontStyle;
|
TFontStylesbase = set of TFontStyle;
|
||||||
|
|
||||||
TFontData = record
|
TFontData = record
|
||||||
Handle : HFont;
|
Handle: HFont;
|
||||||
Height : Integer;
|
Height: Integer;
|
||||||
Pitch : TFontPitch;
|
Pitch: TFontPitch;
|
||||||
Style : TFontStylesBase;
|
Style: TFontStylesBase;
|
||||||
CharSet : TFontCharSet;
|
CharSet: TFontCharSet;
|
||||||
Name : TFontDataName;
|
Name: TFontDataName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Reflects text style when drawn in a rectangle }
|
{ Reflects text style when drawn in a rectangle }
|
||||||
|
|
||||||
TTextLayout = (tlTop, tlCenter, tlBottom);
|
TTextLayout = (tlTop, tlCenter, tlBottom);
|
||||||
TTextStyle = packed record
|
TTextStyle = packed record
|
||||||
Alignment : TAlignment; // TextRect Only : horizontal alignment
|
Alignment : TAlignment; // TextRect Only: horizontal alignment
|
||||||
|
|
||||||
Layout : TTextLayout; // TextRect Only : vertical alignment
|
Layout : TTextLayout; // TextRect Only: vertical alignment
|
||||||
|
|
||||||
SingleLine : boolean; // If WordBreak is false then process #13, #10 as
|
SingleLine: boolean; // If WordBreak is false then process #13, #10 as
|
||||||
// standard chars and perform no Line breaking.
|
// standard chars and perform no Line breaking.
|
||||||
|
|
||||||
Clipping : boolean; // TextRect Only : Clip Text to passed Rectangle
|
Clipping : boolean; // TextRect Only: Clip Text to passed Rectangle
|
||||||
|
|
||||||
ExpandTabs : boolean; // currently ignored
|
ExpandTabs: boolean; // currently ignored
|
||||||
|
|
||||||
ShowPrefix : boolean; // TextRect Only : Process first single '&' per
|
ShowPrefix: boolean; // TextRect Only: Process first single '&' per
|
||||||
// line as an underscore and draw '&&' as '&'
|
// line as an underscore and draw '&&' as '&'
|
||||||
|
|
||||||
Wordbreak : boolean; // TextRect Only : If line of text is too long
|
Wordbreak : boolean; // TextRect Only: If line of text is too long
|
||||||
// too fit between left and right boundaries
|
// too fit between left and right boundaries
|
||||||
// try to break into multiple lines between
|
// try to break into multiple lines between
|
||||||
// words
|
// words
|
||||||
|
|
||||||
Opaque : boolean; // TextRect : Fills background with current Brush
|
Opaque : boolean; // TextRect: Fills background with current Brush
|
||||||
// TextOut : Fills background with current
|
// TextOut : Fills background with current
|
||||||
// foreground color
|
// foreground color
|
||||||
|
|
||||||
SystemFont : Boolean; // Use the system font instead of Canvas Font
|
SystemFont: Boolean; // Use the system font instead of Canvas Font
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TPenStyle = (psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear,
|
TPenStyle = (psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear,
|
||||||
@ -107,10 +107,10 @@ type
|
|||||||
);
|
);
|
||||||
|
|
||||||
TPenData = record
|
TPenData = record
|
||||||
Handle : HPen;
|
Handle: HPen;
|
||||||
Color : TColor;
|
Color: TColor;
|
||||||
Width : Integer;
|
Width: Integer;
|
||||||
Style : TPenStyle;
|
Style: TPenStyle;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TBrushStyle = (bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal,
|
TBrushStyle = (bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal,
|
||||||
@ -357,7 +357,7 @@ const
|
|||||||
Height: 0;
|
Height: 0;
|
||||||
Pitch: fpDefault;
|
Pitch: fpDefault;
|
||||||
Style: [];
|
Style: [];
|
||||||
Charset : DEFAULT_CHARSET;
|
Charset: DEFAULT_CHARSET;
|
||||||
Name: 'default'
|
Name: 'default'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -399,7 +399,7 @@ type
|
|||||||
|
|
||||||
TFont = class(TGraphicsObject)
|
TFont = class(TGraphicsObject)
|
||||||
private
|
private
|
||||||
FColor : TColor;
|
FColor: TColor;
|
||||||
FFontData: TFontData;
|
FFontData: TFontData;
|
||||||
FPixelsPerInch: Integer;
|
FPixelsPerInch: Integer;
|
||||||
FFontName: string;
|
FFontName: string;
|
||||||
@ -414,45 +414,45 @@ type
|
|||||||
function GetCharSet: TFontCharSet;
|
function GetCharSet: TFontCharSet;
|
||||||
function GetHandle: HFONT;
|
function GetHandle: HFONT;
|
||||||
function GetHeight: Integer;
|
function GetHeight: Integer;
|
||||||
function GetName : TFontName;
|
function GetName: TFontName;
|
||||||
function GetPitch: TFontPitch;
|
function GetPitch: TFontPitch;
|
||||||
function GetSize : Integer;
|
function GetSize: Integer;
|
||||||
function GetStyle: TFontStyles;
|
function GetStyle: TFontStyles;
|
||||||
procedure SetCharSet(const AValue: TFontCharSet);
|
procedure SetCharSet(const AValue: TFontCharSet);
|
||||||
procedure SetColor(Value : TColor);
|
procedure SetColor(Value: TColor);
|
||||||
procedure SetHandle(const Value: HFONT);
|
procedure SetHandle(const Value: HFONT);
|
||||||
procedure SetHeight(value : Integer);
|
procedure SetHeight(value: Integer);
|
||||||
procedure SetName(const AValue : TFontName);
|
procedure SetName(const AValue: TFontName);
|
||||||
procedure SetPitch(Value : TFontPitch);
|
procedure SetPitch(Value: TFontPitch);
|
||||||
procedure SetSize(value : Integer);
|
procedure SetSize(value: Integer);
|
||||||
procedure SetStyle(Value: TFontStyles);
|
procedure SetStyle(Value: TFontStyles);
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure Assign(Source : TPersistent); override;
|
procedure Assign(Source: TPersistent); override;
|
||||||
procedure Assign(const ALogFont: TLogFont);
|
procedure Assign(const ALogFont: TLogFont);
|
||||||
procedure BeginUpdate;
|
procedure BeginUpdate;
|
||||||
procedure EndUpdate;
|
procedure EndUpdate;
|
||||||
function HandleAllocated: boolean;
|
function HandleAllocated: boolean;
|
||||||
// Extra properties
|
// Extra properties
|
||||||
// TODO: implement them though GetTextMetrics, not here
|
// TODO: implement them though GetTextMetrics, not here
|
||||||
//Function GetWidth(Value : String) : Integer;
|
//Function GetWidth(Value: String): Integer;
|
||||||
// Extra properties
|
// Extra properties
|
||||||
// TODO: implement them though GetTextMetrics, not here
|
// TODO: implement them though GetTextMetrics, not here
|
||||||
//property Width : Integer read FWidth write FWidth;
|
//property Width: Integer read FWidth write FWidth;
|
||||||
//property XBias : Integer read FXBias write FXBias;
|
//property XBias: Integer read FXBias write FXBias;
|
||||||
//property YBias : Integer read FYBias write FYBias;
|
//property YBias: Integer read FYBias write FYBias;
|
||||||
//-----------------
|
//-----------------
|
||||||
property Handle : HFONT read GetHandle write SetHandle;
|
property Handle: HFONT read GetHandle write SetHandle;
|
||||||
property PixelsPerInch : Integer read FPixelsPerInch;
|
property PixelsPerInch: Integer read FPixelsPerInch;
|
||||||
published
|
published
|
||||||
property CharSet: TFontCharSet read GetCharSet write SetCharSet default DEFAULT_CHARSET;
|
property CharSet: TFontCharSet read GetCharSet write SetCharSet default DEFAULT_CHARSET;
|
||||||
property Color : TColor read FColor write SetColor default clWindowText;
|
property Color: TColor read FColor write SetColor default clWindowText;
|
||||||
property Height : Integer read GetHeight write SetHeight;
|
property Height: Integer read GetHeight write SetHeight;
|
||||||
property Name : TFontName read GetName write SetName stored IsNameStored;
|
property Name: TFontName read GetName write SetName stored IsNameStored;
|
||||||
property Pitch: TFontPitch read GetPitch write SetPitch default fpDefault;
|
property Pitch: TFontPitch read GetPitch write SetPitch default fpDefault;
|
||||||
property Size: Integer read GetSize write SetSize stored false;
|
property Size: Integer read GetSize write SetSize stored false;
|
||||||
property Style : TFontStyles read GetStyle write SetStyle;
|
property Style: TFontStyles read GetStyle write SetStyle;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -460,16 +460,16 @@ type
|
|||||||
|
|
||||||
TPen = class(TGraphicsObject)
|
TPen = class(TGraphicsObject)
|
||||||
private
|
private
|
||||||
FPenData : TPenData;
|
FPenData: TPenData;
|
||||||
FMode : TPenMode;
|
FMode: TPenMode;
|
||||||
procedure FreeHandle;
|
procedure FreeHandle;
|
||||||
protected
|
protected
|
||||||
function GetHandle: HPEN;
|
function GetHandle: HPEN;
|
||||||
procedure SetHandle(const Value: HPEN);
|
procedure SetHandle(const Value: HPEN);
|
||||||
procedure SetColor(Value : TColor);
|
procedure SetColor(Value: TColor);
|
||||||
procedure SetMode(Value : TPenMode);
|
procedure SetMode(Value: TPenMode);
|
||||||
procedure SetStyle(Value : TPenStyle);
|
procedure SetStyle(Value: TPenStyle);
|
||||||
procedure Setwidth(value : Integer);
|
procedure Setwidth(value: Integer);
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -486,30 +486,30 @@ type
|
|||||||
{ TBrush }
|
{ TBrush }
|
||||||
|
|
||||||
TBrushData = record
|
TBrushData = record
|
||||||
Handle : HBrush;
|
Handle: HBrush;
|
||||||
Color : TColor;
|
Color: TColor;
|
||||||
Bitmap : TBitmap;
|
Bitmap: TBitmap;
|
||||||
Style : TBrushStyle;
|
Style: TBrushStyle;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TBrush = class(TGraphicsObject)
|
TBrush = class(TGraphicsObject)
|
||||||
private
|
private
|
||||||
FBrushData : TBrushData;
|
FBrushData: TBrushData;
|
||||||
procedure FreeHandle;
|
procedure FreeHandle;
|
||||||
protected
|
protected
|
||||||
function GetHandle: HBRUSH;
|
function GetHandle: HBRUSH;
|
||||||
Procedure SetBitmap(Value : TBitmap);
|
Procedure SetBitmap(Value: TBitmap);
|
||||||
Procedure SetColor(Value : TColor);
|
Procedure SetColor(Value: TColor);
|
||||||
procedure SetHandle(const Value: HBRUSH);
|
procedure SetHandle(const Value: HBRUSH);
|
||||||
Procedure SetStyle(value : TBrushStyle);
|
Procedure SetStyle(value: TBrushStyle);
|
||||||
public
|
public
|
||||||
procedure Assign(Source : TPersistent); override;
|
procedure Assign(Source: TPersistent); override;
|
||||||
constructor Create;
|
constructor Create;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
property Bitmap: TBitmap read FBrushData.Bitmap write SetBitmap;
|
property Bitmap: TBitmap read FBrushData.Bitmap write SetBitmap;
|
||||||
property Handle: HBRUSH read GetHandle write SetHandle;
|
property Handle: HBRUSH read GetHandle write SetHandle;
|
||||||
published
|
published
|
||||||
property Color : TColor read FBrushData.Color write SetColor default clWhite;
|
property Color: TColor read FBrushData.Color write SetColor default clWhite;
|
||||||
property Style: TBrushStyle read FBrushData.Style write SetStyle default bsSolid;
|
property Style: TBrushStyle read FBrushData.Style write SetStyle default bsSolid;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -517,30 +517,30 @@ type
|
|||||||
{ TRegion }
|
{ TRegion }
|
||||||
|
|
||||||
TRegionData = record
|
TRegionData = record
|
||||||
Handle : HRgn;
|
Handle: HRgn;
|
||||||
Rect : TRect;
|
Rect: TRect;
|
||||||
|
|
||||||
{Polygon Region Info - not used yet}
|
{Polygon Region Info - not used yet}
|
||||||
Polygon : PPoint;//Polygon Points
|
Polygon: PPoint;//Polygon Points
|
||||||
NumPoints : Longint;//Number of Points
|
NumPoints: Longint;//Number of Points
|
||||||
Winding : Boolean;//Use Winding mode
|
Winding: Boolean;//Use Winding mode
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TRegion = class(TGraphicsObject)
|
TRegion = class(TGraphicsObject)
|
||||||
private
|
private
|
||||||
FRegionData : TRegionData;
|
FRegionData: TRegionData;
|
||||||
procedure FreeHandle;
|
procedure FreeHandle;
|
||||||
protected
|
protected
|
||||||
function GetHandle: HRGN;
|
function GetHandle: HRGN;
|
||||||
procedure SetHandle(const Value: HRGN);
|
procedure SetHandle(const Value: HRGN);
|
||||||
procedure SetClipRect(value : TRect);
|
procedure SetClipRect(value: TRect);
|
||||||
Function GetClipRect : TRect;
|
Function GetClipRect: TRect;
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure Assign(Source: TPersistent); override;
|
procedure Assign(Source: TPersistent); override;
|
||||||
property Handle : HRGN read GetHandle write SetHandle;
|
property Handle: HRGN read GetHandle write SetHandle;
|
||||||
property ClipRect : TRect read GetClipRect write SetClipRect;
|
property ClipRect: TRect read GetClipRect write SetClipRect;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -750,7 +750,7 @@ type
|
|||||||
|
|
||||||
TCanvas = class(TPersistent)
|
TCanvas = class(TPersistent)
|
||||||
private
|
private
|
||||||
FAutoReDraw : Boolean;
|
FAutoReDraw: Boolean;
|
||||||
FState: TCanvasState;
|
FState: TCanvasState;
|
||||||
FFont: TFont;
|
FFont: TFont;
|
||||||
FSavedFontHandle: HFont;
|
FSavedFontHandle: HFont;
|
||||||
@ -776,17 +776,17 @@ type
|
|||||||
procedure DeselectHandles;
|
procedure DeselectHandles;
|
||||||
function GetCanvasClipRect: TRect;
|
function GetCanvasClipRect: TRect;
|
||||||
Function GetColor: TColor;
|
Function GetColor: TColor;
|
||||||
function GetHandle : HDC;
|
function GetHandle: HDC;
|
||||||
Function GetPenPos: TPoint;
|
Function GetPenPos: TPoint;
|
||||||
Function GetPixel(X,Y : Integer) : TColor;
|
Function GetPixel(X,Y: Integer): TColor;
|
||||||
Procedure SetAutoReDraw(Value : Boolean);
|
Procedure SetAutoReDraw(Value: Boolean);
|
||||||
Procedure SetColor(c: TColor);
|
Procedure SetColor(c: TColor);
|
||||||
Procedure SetBrush(value : TBrush);
|
Procedure SetBrush(value: TBrush);
|
||||||
Procedure SetFont(value : TFont);
|
Procedure SetFont(value: TFont);
|
||||||
Procedure SetPen(value : TPen);
|
Procedure SetPen(value: TPen);
|
||||||
Procedure SetPenPos(Value : TPoint);
|
Procedure SetPenPos(Value: TPoint);
|
||||||
Procedure SetPixel(X,Y : Integer; Value : TColor);
|
Procedure SetPixel(X,Y: Integer; Value: TColor);
|
||||||
Procedure SetRegion(value : TRegion);
|
Procedure SetRegion(value: TRegion);
|
||||||
protected
|
protected
|
||||||
procedure CreateFont; virtual;
|
procedure CreateFont; virtual;
|
||||||
procedure CreateBrush; virtual;
|
procedure CreateBrush; virtual;
|
||||||
@ -804,8 +804,8 @@ type
|
|||||||
procedure Changing; virtual;
|
procedure Changing; virtual;
|
||||||
procedure Changed; virtual;
|
procedure Changed; virtual;
|
||||||
|
|
||||||
procedure Arc(x,y,width,height,angle1,angle2 : Integer);
|
procedure Arc(x,y,width,height,angle1,angle2: Integer);
|
||||||
procedure Arc(x,y,width,height,SX,SY,EX,EY : Integer);
|
procedure Arc(x,y,width,height,SX,SY,EX,EY: Integer);
|
||||||
Procedure BrushCopy(Dest: TRect; InternalImages: TBitmap; Src: TRect;
|
Procedure BrushCopy(Dest: TRect; InternalImages: TBitmap; Src: TRect;
|
||||||
TransparentColor: TColor);
|
TransparentColor: TColor);
|
||||||
procedure Chord(x, y, width, height, angle1, angle2: Integer);
|
procedure Chord(x, y, width, height, angle1, angle2: Integer);
|
||||||
@ -815,19 +815,19 @@ type
|
|||||||
procedure StretchDraw(const DestRect: TRect; SrcGraphic: TGraphic);
|
procedure StretchDraw(const DestRect: TRect; SrcGraphic: TGraphic);
|
||||||
procedure Ellipse(const ARect: TRect);
|
procedure Ellipse(const ARect: TRect);
|
||||||
procedure Ellipse(x1, y1, x2, y2: Integer);
|
procedure Ellipse(x1, y1, x2, y2: Integer);
|
||||||
Procedure FillRect(const ARect : TRect);
|
Procedure FillRect(const ARect: TRect);
|
||||||
Procedure FillRect(X1,Y1,X2,Y2 : Integer);
|
Procedure FillRect(X1,Y1,X2,Y2: Integer);
|
||||||
procedure FloodFill(X, Y: Integer; FillColor: TColor; FillStyle: TFillStyle);
|
procedure FloodFill(X, Y: Integer; FillColor: TColor; FillStyle: TFillStyle);
|
||||||
procedure Frame3d(var ARect : TRect; const FrameWidth : integer;
|
procedure Frame3d(var ARect: TRect; const FrameWidth: integer;
|
||||||
const Style: TGraphicsBevelCut);
|
const Style: TGraphicsBevelCut);
|
||||||
procedure Frame(const ARect: TRect); // border using pen
|
procedure Frame(const ARect: TRect); // border using pen
|
||||||
procedure Frame(X1,Y1,X2,Y2 : Integer); // border using pen
|
procedure Frame(X1,Y1,X2,Y2: Integer); // border using pen
|
||||||
procedure FrameRect(const ARect: TRect); // border using brush
|
procedure FrameRect(const ARect: TRect); // border using brush
|
||||||
procedure FrameRect(X1,Y1,X2,Y2 : Integer); // border using brush
|
procedure FrameRect(X1,Y1,X2,Y2: Integer); // border using brush
|
||||||
Procedure Line(X1,Y1,X2,Y2 : Integer); // short for MoveTo();LineTo();
|
Procedure Line(X1,Y1,X2,Y2: Integer); // short for MoveTo();LineTo();
|
||||||
Procedure LineTo(X1,Y1 : Integer);
|
Procedure LineTo(X1,Y1: Integer);
|
||||||
Procedure MoveTo(X1,Y1 : Integer);
|
Procedure MoveTo(X1,Y1: Integer);
|
||||||
procedure RadialPie(x,y,width,height,angle1,angle2 : Integer);
|
procedure RadialPie(x,y,width,height,angle1,angle2: Integer);
|
||||||
procedure RadialPie(x,y,width,height,sx,sy,ex,ey: Integer);
|
procedure RadialPie(x,y,width,height,sx,sy,ex,ey: Integer);
|
||||||
procedure Pie(EllipseX1,EllipseY1,EllipseX2,EllipseY2,
|
procedure Pie(EllipseX1,EllipseY1,EllipseX2,EllipseY2,
|
||||||
StartX,StartY,EndX,EndY: Integer);
|
StartX,StartY,EndX,EndY: Integer);
|
||||||
@ -837,9 +837,9 @@ type
|
|||||||
procedure PolyBezier(const Points: array of TPoint;
|
procedure PolyBezier(const Points: array of TPoint;
|
||||||
Filled: boolean{$IFNDEF VER1_0} = False{$ENDIF};
|
Filled: boolean{$IFNDEF VER1_0} = False{$ENDIF};
|
||||||
Continuous: boolean{$IFNDEF VER1_0} = False{$ENDIF});
|
Continuous: boolean{$IFNDEF VER1_0} = False{$ENDIF});
|
||||||
{$ifdef VER1_0}
|
{$ifdef VER1_0}
|
||||||
procedure PolyBezier(const Points: array of TPoint);
|
procedure PolyBezier(const Points: array of TPoint);
|
||||||
{$endif}
|
{$endif}
|
||||||
procedure Polygon(const Points: array of TPoint;
|
procedure Polygon(const Points: array of TPoint;
|
||||||
Winding: Boolean;
|
Winding: Boolean;
|
||||||
StartIndex: Integer{$IFNDEF VER1_0} = 0{$ENDIF};
|
StartIndex: Integer{$IFNDEF VER1_0} = 0{$ENDIF};
|
||||||
@ -852,14 +852,14 @@ type
|
|||||||
NumPts: Integer {$IFNDEF VER1_0} = -1{$ENDIF});
|
NumPts: Integer {$IFNDEF VER1_0} = -1{$ENDIF});
|
||||||
procedure Polyline(Points: PPoint; NumPts: Integer);
|
procedure Polyline(Points: PPoint; NumPts: Integer);
|
||||||
procedure Polyline(const Points: array of TPoint);
|
procedure Polyline(const Points: array of TPoint);
|
||||||
Procedure Rectangle(X1,Y1,X2,Y2 : Integer);
|
Procedure Rectangle(X1,Y1,X2,Y2: Integer);
|
||||||
Procedure Rectangle(const Rect: TRect);
|
Procedure Rectangle(const Rect: TRect);
|
||||||
Procedure RoundRect(X1, Y1, X2, Y2: Integer; RX,RY : Integer);
|
Procedure RoundRect(X1, Y1, X2, Y2: Integer; RX,RY: Integer);
|
||||||
Procedure RoundRect(const Rect : TRect; RX,RY : Integer);
|
Procedure RoundRect(const Rect: TRect; RX,RY: Integer);
|
||||||
procedure TextOut(X,Y: Integer; const Text: String);
|
procedure TextOut(X,Y: Integer; const Text: String);
|
||||||
procedure TextRect(ARect: TRect; X, Y: integer; const Text : string);
|
procedure TextRect(ARect: TRect; X, Y: integer; const Text: string);
|
||||||
procedure TextRect(ARect: TRect; X, Y: integer; const Text : string;
|
procedure TextRect(ARect: TRect; X, Y: integer; const Text: string;
|
||||||
const Style : TTextStyle);
|
const Style: TTextStyle);
|
||||||
function TextExtent(const Text: string): TSize;
|
function TextExtent(const Text: string): TSize;
|
||||||
function TextHeight(const Text: string): Integer;
|
function TextHeight(const Text: string): Integer;
|
||||||
function TextWidth(const Text: string): Integer;
|
function TextWidth(const Text: string): Integer;
|
||||||
@ -870,17 +870,17 @@ type
|
|||||||
property PenPos: TPoint read GetPenPos write SetPenPos;
|
property PenPos: TPoint read GetPenPos write SetPenPos;
|
||||||
property Pixels[X, Y: Integer]: TColor read GetPixel write SetPixel;
|
property Pixels[X, Y: Integer]: TColor read GetPixel write SetPixel;
|
||||||
property Handle: HDC read GetHandle write SetHandle;
|
property Handle: HDC read GetHandle write SetHandle;
|
||||||
property TextStyle : TTextStyle read FTextStyle write FTextStyle;
|
property TextStyle: TTextStyle read FTextStyle write FTextStyle;
|
||||||
property LockCount:Integer read FLockCount;
|
property LockCount:Integer read FLockCount;
|
||||||
published
|
published
|
||||||
property AutoRedraw : Boolean read FAutoReDraw write SetAutoReDraw;
|
property AutoRedraw: Boolean read FAutoReDraw write SetAutoReDraw;
|
||||||
property Brush: TBrush read FBrush write SetBrush;
|
property Brush: TBrush read FBrush write SetBrush;
|
||||||
property CopyMode: TCopyMode read FCopyMode write FCopyMode default cmSrcCopy;
|
property CopyMode: TCopyMode read FCopyMode write FCopyMode default cmSrcCopy;
|
||||||
property Font: TFont read FFont write SetFont;
|
property Font: TFont read FFont write SetFont;
|
||||||
property Pen: TPen read FPen write SetPen;
|
property Pen: TPen read FPen write SetPen;
|
||||||
property Region: TRegion read FRegion write SetRegion;
|
property Region: TRegion read FRegion write SetRegion;
|
||||||
property Color: TColor read GetColor write SetColor;
|
property Color: TColor read GetColor write SetColor;
|
||||||
property OnChange : TNotifyEvent read FOnChange write FOnChange;
|
property OnChange: TNotifyEvent read FOnChange write FOnChange;
|
||||||
property OnChanging: TNotifyEvent read FOnChanging write FOnChanging;
|
property OnChanging: TNotifyEvent read FOnChanging write FOnChanging;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -961,7 +961,7 @@ type
|
|||||||
TBitmap = class(TGraphic)
|
TBitmap = class(TGraphic)
|
||||||
private
|
private
|
||||||
FCanvas: TCanvas;
|
FCanvas: TCanvas;
|
||||||
FImage : TBitmapImage;
|
FImage: TBitmapImage;
|
||||||
FPalette: HPALETTE;
|
FPalette: HPALETTE;
|
||||||
FPixelFormat: TPixelFormat;
|
FPixelFormat: TPixelFormat;
|
||||||
FTransparentColor: TColor;
|
FTransparentColor: TColor;
|
||||||
@ -1176,9 +1176,9 @@ function ColorToString(Color: TColor): AnsiString;
|
|||||||
function StringToColor(const S: shortstring): TColor;
|
function StringToColor(const S: shortstring): TColor;
|
||||||
procedure GetColorValues(Proc: TGetColorStringProc);
|
procedure GetColorValues(Proc: TGetColorStringProc);
|
||||||
|
|
||||||
Function Blue(rgb: TColor) : BYTE;
|
Function Blue(rgb: TColor): BYTE;
|
||||||
Function Green(rgb: TColor) : BYTE;
|
Function Green(rgb: TColor): BYTE;
|
||||||
Function Red(rgb: TColor) : BYTE;
|
Function Red(rgb: TColor): BYTE;
|
||||||
procedure RedGreenBlue(rgb: TColor; var Red, Green, Blue: Byte);
|
procedure RedGreenBlue(rgb: TColor; var Red, Green, Blue: Byte);
|
||||||
|
|
||||||
// fonts
|
// fonts
|
||||||
@ -1222,7 +1222,7 @@ function ReadXPMSize(XPM: PPChar; var Width, Height, ColorCount: integer
|
|||||||
|
|
||||||
var
|
var
|
||||||
{ Stores information about the current screen }
|
{ Stores information about the current screen }
|
||||||
ScreenInfo : TLMScreenInit;
|
ScreenInfo: TLMScreenInit;
|
||||||
|
|
||||||
const
|
const
|
||||||
FontCharsets: array[0..18] of TIdentMapEntry = (
|
FontCharsets: array[0..18] of TIdentMapEntry = (
|
||||||
@ -1251,8 +1251,8 @@ const
|
|||||||
***************************************************************************)
|
***************************************************************************)
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
function SendIntfMessage(LM_Message : integer; Sender : TObject;
|
function SendIntfMessage(LM_Message: integer; Sender: TObject;
|
||||||
Data : pointer) : integer;
|
Data: pointer): integer;
|
||||||
begin
|
begin
|
||||||
result := SendMsgToInterface(LM_Message, Sender, Data);
|
result := SendMsgToInterface(LM_Message, Sender, Data);
|
||||||
end;
|
end;
|
||||||
@ -1272,7 +1272,7 @@ type
|
|||||||
protected
|
protected
|
||||||
procedure CreateHandle; override;
|
procedure CreateHandle; override;
|
||||||
public
|
public
|
||||||
constructor Create(ABitmap : TBitmap);
|
constructor Create(ABitmap: TBitmap);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1465,17 +1465,17 @@ begin
|
|||||||
for I := Low(Colors) to High(Colors) do Proc(Colors[I].Name);
|
for I := Low(Colors) to High(Colors) do Proc(Colors[I].Name);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function Blue(rgb : TColor) : BYTE;
|
Function Blue(rgb: TColor): BYTE;
|
||||||
begin
|
begin
|
||||||
Result := (rgb shr 16) and $000000ff;
|
Result := (rgb shr 16) and $000000ff;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function Green(rgb : TColor) : BYTE;
|
Function Green(rgb: TColor): BYTE;
|
||||||
begin
|
begin
|
||||||
Result := (rgb shr 8) and $000000ff;
|
Result := (rgb shr 8) and $000000ff;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function Red(rgb : TColor) : BYTE;
|
Function Red(rgb: TColor): BYTE;
|
||||||
begin
|
begin
|
||||||
Result := rgb and $000000ff;
|
Result := rgb and $000000ff;
|
||||||
end;
|
end;
|
||||||
@ -1701,6 +1701,9 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.139 2004/05/25 21:50:32 mattias
|
||||||
|
TCustomNotebook now allows pageclass descendents
|
||||||
|
|
||||||
Revision 1.138 2004/05/23 21:30:10 mattias
|
Revision 1.138 2004/05/23 21:30:10 mattias
|
||||||
added build date to About box from vincent
|
added build date to About box from vincent
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
constructor TNBPages.Create(thePageList: TList; theNotebook: TCustomNotebook);
|
constructor TNBPages.Create(thePageList: TList; theNotebook: TCustomNotebook);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
{ Create the page list and a notebook }
|
// Create the page list and a notebook
|
||||||
fPageList := thePageList;
|
fPageList := thePageList;
|
||||||
fNotebook := theNotebook;
|
fNotebook := theNotebook;
|
||||||
end;
|
end;
|
||||||
@ -657,7 +657,7 @@ end;
|
|||||||
|
|
||||||
function TCustomNotebook.ChildClassAllowed(ChildClass: TClass): boolean;
|
function TCustomNotebook.ChildClassAllowed(ChildClass: TClass): boolean;
|
||||||
begin
|
begin
|
||||||
Result:=(ChildClass<>nil) and (ChildClass=PageClass);
|
Result:=(ChildClass<>nil) and (ChildClass.InheritsFrom(PageClass));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -792,6 +792,9 @@ end;}
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.48 2004/05/25 21:50:32 mattias
|
||||||
|
TCustomNotebook now allows pageclass descendents
|
||||||
|
|
||||||
Revision 1.47 2004/05/11 11:42:27 mattias
|
Revision 1.47 2004/05/11 11:42:27 mattias
|
||||||
replaced writeln by debugln
|
replaced writeln by debugln
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user