MG: moved TColor definition to graphtype.pp and registered TColor names

git-svn-id: trunk@1823 -
This commit is contained in:
lazarus 2002-08-06 09:32:48 +00:00
parent 923b351f88
commit 0c9f57bd32
5 changed files with 29 additions and 13 deletions

View File

@ -35,7 +35,7 @@ interface
{$DEFINE VerboseDesigner}
uses
Classes, LCLType, LCLLinux, Forms, Controls, LMessages, Graphics,
Classes, LCLType, LCLLinux, Forms, Controls, LMessages, GraphType, Graphics,
ControlSelection, CustomFormEditor, FormEditor, UnitEditor, CompReg, Menus,
AlignCompsDlg, SizeCompsDlg, ScaleCompsDlg, ExtCtrls, EnvironmentOpts;

View File

@ -36,7 +36,7 @@ unit Dialogs;
interface
uses Classes, Forms, Controls, VCLGlobals, LMessages, Graphics;
uses Classes, Forms, Controls, VCLGlobals, LMessages, GraphType, Graphics;
//type
// TDialogButtons = (mbYes, mbNo, mbOK, mbCancel, mbAbort, mbRetry,
@ -313,6 +313,9 @@ end.
{ =============================================================================
$Log$
Revision 1.17 2002/08/06 09:32:48 lazarus
MG: moved TColor definition to graphtype.pp and registered TColor names
Revision 1.16 2002/07/29 13:39:06 lazarus
MG: removed ambigious TBitmap from LCLType and added Escape key to MessageDlgs

View File

@ -641,8 +641,8 @@ type
// Color / Identifier mapping
TGetColorStringProc = procedure(const s:ansistring) of object;
function ColorToIdent(Color: Longint; var Ident: AnsiString): Boolean;
function IdentToColor(const Ident: shortstring; var Color: Longint): Boolean;
function ColorToIdent(Color: Longint; var Ident: String): Boolean;
function IdentToColor(const Ident: string; var Color: Longint): Boolean;
function ColorToRGB(Color: TColor): Longint;
function ColorToString(Color: TColor): AnsiString;
function StringToColor(const S: shortstring): TColor;
@ -684,7 +684,8 @@ const // New TFont instances are initialized with the values in this structure:
implementation
uses Controls, ClipBrd;
uses
Controls, ClipBrd, TypInfo;
const
GraphicsFinalized: boolean = false;
@ -754,12 +755,12 @@ const
(Value: clInfoBk; Name: 'clInfoBk'),
(Value: clNone; Name: 'clNone'));
function ColorToIdent(Color: Longint; var Ident: AnsiString): Boolean;
function ColorToIdent(Color: Longint; var Ident: String): Boolean;
begin
Result := IntToIdent(Color, Ident, Colors);
end;
function IdentToColor(const Ident: shortstring; var Color: Longint): Boolean;
function IdentToColor(const Ident: string; var Color: Longint): Boolean;
begin
Result := IdentToInt(Ident, Color, Colors);
end;
@ -806,7 +807,9 @@ end;
{$I canvas.inc}
{$I pixmap.inc}
initialization
RegisterIntegerConsts(TypeInfo(TColor), @IdentToColor, @ColorToIdent);
finalization
GraphicsFinalized:=true;
@ -819,6 +822,9 @@ end.
{ =============================================================================
$Log$
Revision 1.35 2002/08/06 09:32:48 lazarus
MG: moved TColor definition to graphtype.pp and registered TColor names
Revision 1.34 2002/06/08 17:16:02 lazarus
MG: added close buttons and images to TNoteBook and close buttons to source editor

View File

@ -28,15 +28,18 @@ unit GraphType;
interface
uses Classes, LCLType;
uses
Classes, LCLType;
{$ifdef Trace}
{$ASSERTIONS ON}
{$endif}
type
TColor = longint; //Also defined in LMessages.pp
PColor = ^TColor;
// don't define TColor as longint, or else the RTTI can't distinguish them
TColor = -$7FFFFFFF-1..$7FFFFFFF;
TFontPitch = (fpDefault, fpVariable, fpFixed);
TFontName = string;
TFontCharSet = 0..255;
@ -145,6 +148,9 @@ end.
{ =============================================================================
$Log$
Revision 1.5 2002/08/06 09:32:48 lazarus
MG: moved TColor definition to graphtype.pp and registered TColor names
Revision 1.4 2002/06/04 15:17:21 lazarus
MG: improved TFont for XLFD font names

View File

@ -29,7 +29,7 @@ unit lMessages;
interface
uses Classes, vclGlobals, LCLType;
uses Classes, vclGlobals, LCLType, GraphType;
const
@ -335,8 +335,6 @@ const
type
TColor = LongInt; //Also defined in graphics.pp
UINT = LongWord;
BOOL = Boolean;
@ -842,6 +840,9 @@ end.
{
$Log$
Revision 1.27 2002/08/06 09:32:48 lazarus
MG: moved TColor definition to graphtype.pp and registered TColor names
Revision 1.26 2002/06/08 17:16:02 lazarus
MG: added close buttons and images to TNoteBook and close buttons to source editor