mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 21:39:11 +02:00
fixed compiler options interface double variables
git-svn-id: trunk@6133 -
This commit is contained in:
parent
09f9e53b4f
commit
6a9d72cbda
@ -175,96 +175,12 @@ type
|
|||||||
fInheritedOptParseStamps: integer;
|
fInheritedOptParseStamps: integer;
|
||||||
fInheritedOptGraphStamps: integer;
|
fInheritedOptGraphStamps: integer;
|
||||||
fLoaded: Boolean;
|
fLoaded: Boolean;
|
||||||
FModified: boolean;
|
|
||||||
fOptionsString: String;
|
fOptionsString: String;
|
||||||
FParsedOpts: TParsedCompilerOptions;
|
FParsedOpts: TParsedCompilerOptions;
|
||||||
fTargetFilename: string;
|
fTargetFilename: string;
|
||||||
FWin32GraphicApp: boolean;
|
|
||||||
fXMLFile: String;
|
fXMLFile: String;
|
||||||
FXMLConfig: TXMLConfig;
|
FXMLConfig: TXMLConfig;
|
||||||
|
|
||||||
// Paths:
|
|
||||||
fIncludeFiles: String;
|
|
||||||
fLibraries: String;
|
|
||||||
fOtherUnitFiles: String;
|
|
||||||
FObjectPath: string;
|
|
||||||
FSrcPath: string;
|
|
||||||
fUnitOutputDir: string;
|
|
||||||
fDebugPath: string;
|
|
||||||
fLCLWidgetType: string;
|
|
||||||
|
|
||||||
// Parsing:
|
|
||||||
// assembler style
|
|
||||||
fAssemblerStyle: Integer;
|
|
||||||
// symantec checking
|
|
||||||
fD2Ext: Boolean;
|
|
||||||
fCStyleOp: Boolean;
|
|
||||||
fIncludeAssertionCode: Boolean;
|
|
||||||
fDelphiCompat: Boolean;
|
|
||||||
fAllowLabel: Boolean;
|
|
||||||
fUseAnsiStr: Boolean;
|
|
||||||
fCPPInline: Boolean;
|
|
||||||
fCMacros: Boolean;
|
|
||||||
fTPCompat: Boolean;
|
|
||||||
fGPCCompat: Boolean;
|
|
||||||
fInitConst: Boolean;
|
|
||||||
fStaticKwd: Boolean;
|
|
||||||
|
|
||||||
// Code generation:
|
|
||||||
fUnitStyle: Integer;
|
|
||||||
fIOChecks: Boolean;
|
|
||||||
fRangeChecks: Boolean;
|
|
||||||
fOverflowChecks: Boolean;
|
|
||||||
fStackChecks: Boolean;
|
|
||||||
FEmulatedFloatOpcodes: boolean;
|
|
||||||
fHeapSize: LongInt;
|
|
||||||
fVerifyObjMethodCall: boolean;
|
|
||||||
fGenerate: TCompilationGenerateCode;
|
|
||||||
fTargetProc: Integer;
|
|
||||||
fTargetCPU: string;
|
|
||||||
fVarsInReg: Boolean;
|
|
||||||
fUncertainOpt: Boolean;
|
|
||||||
fOptLevel: Integer;
|
|
||||||
fTargetOS: String;
|
|
||||||
|
|
||||||
// Linking:
|
|
||||||
fGenDebugInfo: Boolean;
|
|
||||||
fGenDebugDBX: Boolean;
|
|
||||||
fUseLineInfoUnit: Boolean;
|
|
||||||
fUseHeaptrc: Boolean;
|
|
||||||
fUseValgrind: Boolean;
|
|
||||||
fGenGProfCode: Boolean;
|
|
||||||
fStripSymbols: Boolean;
|
|
||||||
fLinkStyle: Integer;
|
|
||||||
fPassLinkerOpt: Boolean;
|
|
||||||
fLinkerOptions: String;
|
|
||||||
|
|
||||||
// Messages:
|
|
||||||
fShowErrors: Boolean;
|
|
||||||
fShowWarn: Boolean;
|
|
||||||
fShowNotes: Boolean;
|
|
||||||
fShowHints: Boolean;
|
|
||||||
fShowGenInfo: Boolean;
|
|
||||||
fShowLineNum: Boolean;
|
|
||||||
fShowAll: Boolean;
|
|
||||||
fShowAllProcsOnError: Boolean;
|
|
||||||
fShowDebugInfo: Boolean;
|
|
||||||
fShowUsedFiles: Boolean;
|
|
||||||
fShowTriedFiles: Boolean;
|
|
||||||
fShowDefMacros: Boolean;
|
|
||||||
fShowCompProc: Boolean;
|
|
||||||
fShowCond: Boolean;
|
|
||||||
fShowNothing: Boolean;
|
|
||||||
fShowHintsForUnusedUnitsInMainSrc: Boolean;
|
|
||||||
fWriteFPCLogo: Boolean;
|
|
||||||
fStopAfterErrCount: integer;
|
|
||||||
|
|
||||||
// Other:
|
|
||||||
fDontUseConfigFile: Boolean;
|
|
||||||
fAdditionalConfigFile: Boolean;
|
|
||||||
fConfigFilePath: String;
|
|
||||||
fCustomOptions: string;
|
|
||||||
|
|
||||||
// Compilation
|
// Compilation
|
||||||
fCompilerPath: String;
|
fCompilerPath: String;
|
||||||
fExecuteBefore: TCompilationTool;
|
fExecuteBefore: TCompilationTool;
|
||||||
@ -341,7 +257,7 @@ type
|
|||||||
property XMLConfigFile: TXMLConfig read FXMLConfig write FXMLConfig;
|
property XMLConfigFile: TXMLConfig read FXMLConfig write FXMLConfig;
|
||||||
property Loaded: Boolean read fLoaded write fLoaded;
|
property Loaded: Boolean read fLoaded write fLoaded;
|
||||||
|
|
||||||
// search paths:
|
{ // search paths:
|
||||||
property IncludeFiles: String read fIncludeFiles write SetIncludeFiles;
|
property IncludeFiles: String read fIncludeFiles write SetIncludeFiles;
|
||||||
property Libraries: String read fLibraries write SetLibraries;
|
property Libraries: String read fLibraries write SetLibraries;
|
||||||
property OtherUnitFiles: String read fOtherUnitFiles write SetOtherUnitFiles;
|
property OtherUnitFiles: String read fOtherUnitFiles write SetOtherUnitFiles;
|
||||||
@ -428,7 +344,7 @@ type
|
|||||||
property AdditionalConfigFile: Boolean read fAdditionalConfigFile
|
property AdditionalConfigFile: Boolean read fAdditionalConfigFile
|
||||||
write fAdditionalConfigFile;
|
write fAdditionalConfigFile;
|
||||||
property ConfigFilePath: String read fConfigFilePath write fConfigFilePath;
|
property ConfigFilePath: String read fConfigFilePath write fConfigFilePath;
|
||||||
property CustomOptions: string read fCustomOptions write SetCustomOptions;
|
property CustomOptions: string read fCustomOptions write SetCustomOptions;}
|
||||||
|
|
||||||
// compilation
|
// compilation
|
||||||
property CompilerPath: String read fCompilerPath write SetCompilerPath;
|
property CompilerPath: String read fCompilerPath write SetCompilerPath;
|
||||||
@ -2174,7 +2090,7 @@ begin
|
|||||||
fStackChecks := CompOpts.fStackChecks;
|
fStackChecks := CompOpts.fStackChecks;
|
||||||
FEmulatedFloatOpcodes := CompOpts.fEmulatedFloatOpcodes;
|
FEmulatedFloatOpcodes := CompOpts.fEmulatedFloatOpcodes;
|
||||||
fHeapSize := CompOpts.fHeapSize;
|
fHeapSize := CompOpts.fHeapSize;
|
||||||
fVerifyObjMethodCall := CompOpts.fVerifyObjMethodCall;
|
fEmulatedFloatOpcodes := CompOpts.fEmulatedFloatOpcodes;
|
||||||
fGenerate := CompOpts.fGenerate;
|
fGenerate := CompOpts.fGenerate;
|
||||||
fTargetProc := CompOpts.fTargetProc;
|
fTargetProc := CompOpts.fTargetProc;
|
||||||
fTargetCPU := CompOpts.fTargetCPU;
|
fTargetCPU := CompOpts.fTargetCPU;
|
||||||
@ -2265,7 +2181,7 @@ begin
|
|||||||
and (fStackChecks = CompOpts.fStackChecks)
|
and (fStackChecks = CompOpts.fStackChecks)
|
||||||
and (FEmulatedFloatOpcodes = CompOpts.FEmulatedFloatOpcodes)
|
and (FEmulatedFloatOpcodes = CompOpts.FEmulatedFloatOpcodes)
|
||||||
and (fHeapSize = CompOpts.fHeapSize)
|
and (fHeapSize = CompOpts.fHeapSize)
|
||||||
and (fVerifyObjMethodCall = CompOpts.fVerifyObjMethodCall)
|
and (fEmulatedFloatOpcodes = CompOpts.fEmulatedFloatOpcodes)
|
||||||
and (fGenerate = CompOpts.fGenerate)
|
and (fGenerate = CompOpts.fGenerate)
|
||||||
and (fTargetProc = CompOpts.fTargetProc)
|
and (fTargetProc = CompOpts.fTargetProc)
|
||||||
and (fTargetCPU = CompOpts.fTargetCPU)
|
and (fTargetCPU = CompOpts.fTargetCPU)
|
||||||
|
@ -2514,6 +2514,7 @@ end;
|
|||||||
|
|
||||||
procedure TProject.SetCompilerOptions(const AValue: TProjectCompilerOptions);
|
procedure TProject.SetCompilerOptions(const AValue: TProjectCompilerOptions);
|
||||||
begin
|
begin
|
||||||
|
if fCompilerOptions=AValue then exit;
|
||||||
fCompilerOptions:=AValue;
|
fCompilerOptions:=AValue;
|
||||||
inherited SetLazCompilerOptions(AValue);
|
inherited SetLazCompilerOptions(AValue);
|
||||||
end;
|
end;
|
||||||
@ -3129,6 +3130,9 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.169 2004/10/12 08:23:20 mattias
|
||||||
|
fixed compiler options interface double variables
|
||||||
|
|
||||||
Revision 1.168 2004/10/09 13:24:18 mattias
|
Revision 1.168 2004/10/09 13:24:18 mattias
|
||||||
added compiler options to IDEIntf and made Win32GraphicApp default for application projects
|
added compiler options to IDEIntf and made Win32GraphicApp default for application projects
|
||||||
|
|
||||||
|
@ -45,77 +45,93 @@ type
|
|||||||
|
|
||||||
TLazCompilerOptions = class(TPersistent)
|
TLazCompilerOptions = class(TPersistent)
|
||||||
private
|
private
|
||||||
fAdditionalConfigFile: Boolean;
|
|
||||||
fAllowLabel: Boolean;
|
|
||||||
fAssemblerStyle: Integer;
|
|
||||||
fCMacros: Boolean;
|
|
||||||
fConfigFilePath: String;
|
|
||||||
fCPPInline: Boolean;
|
|
||||||
fCStyleOp: Boolean;
|
|
||||||
fCustomOptions: string;
|
|
||||||
fD2Ext: Boolean;
|
|
||||||
FDebugPath: string;
|
|
||||||
fDelphiCompat: Boolean;
|
|
||||||
fDontUseConfigFile: Boolean;
|
|
||||||
FEmulatedFloatOpcodes: boolean;
|
|
||||||
fGenDebugDBX: Boolean;
|
|
||||||
fGenDebugInfo: Boolean;
|
|
||||||
fGenerate: TCompilationGenerateCode;
|
|
||||||
fGenGProfCode: Boolean;
|
|
||||||
fGPCCompat: Boolean;
|
|
||||||
fHeapSize: Integer;
|
|
||||||
fIncludeAssertionCode: Boolean;
|
|
||||||
fIncludeFiles: String;
|
|
||||||
fInitConst: Boolean;
|
|
||||||
fIOChecks: Boolean;
|
|
||||||
fLCLWidgetType: string;
|
|
||||||
fLibraries: String;
|
|
||||||
fLinkerOptions: String;
|
|
||||||
fLinkStyle: Integer;
|
|
||||||
FModified: boolean;
|
|
||||||
FObjectPath: string;
|
|
||||||
FOnModified: TNotifyEvent;
|
FOnModified: TNotifyEvent;
|
||||||
fOptLevel: Integer;
|
|
||||||
fOtherUnitFiles: String;
|
|
||||||
fOverflowChecks: Boolean;
|
|
||||||
fOwner: TObject;
|
fOwner: TObject;
|
||||||
fPassLinkerOpt: Boolean;
|
protected
|
||||||
|
FModified: boolean;
|
||||||
|
|
||||||
|
// Paths:
|
||||||
|
fIncludeFiles: String;
|
||||||
|
fLibraries: String;
|
||||||
|
fOtherUnitFiles: String;
|
||||||
|
FObjectPath: string;
|
||||||
|
FSrcPath: string;
|
||||||
|
fUnitOutputDir: string;
|
||||||
|
fDebugPath: string;
|
||||||
|
fLCLWidgetType: string;
|
||||||
|
|
||||||
|
// Parsing:
|
||||||
|
// assembler style
|
||||||
|
fAssemblerStyle: Integer;
|
||||||
|
// symantec checking
|
||||||
|
fD2Ext: Boolean;
|
||||||
|
fCStyleOp: Boolean;
|
||||||
|
fIncludeAssertionCode: Boolean;
|
||||||
|
fDelphiCompat: Boolean;
|
||||||
|
fAllowLabel: Boolean;
|
||||||
|
fUseAnsiStr: Boolean;
|
||||||
|
fCPPInline: Boolean;
|
||||||
|
fCMacros: Boolean;
|
||||||
|
fTPCompat: Boolean;
|
||||||
|
fGPCCompat: Boolean;
|
||||||
|
fInitConst: Boolean;
|
||||||
|
fStaticKwd: Boolean;
|
||||||
|
|
||||||
|
// Code generation:
|
||||||
|
fUnitStyle: Integer;
|
||||||
|
fIOChecks: Boolean;
|
||||||
fRangeChecks: Boolean;
|
fRangeChecks: Boolean;
|
||||||
|
fOverflowChecks: Boolean;
|
||||||
|
fStackChecks: Boolean;
|
||||||
|
FEmulatedFloatOpcodes: boolean;
|
||||||
|
fHeapSize: LongInt;
|
||||||
|
fVerifyObjMethodCall: boolean;
|
||||||
|
fGenerate: TCompilationGenerateCode;
|
||||||
|
fTargetProc: Integer;
|
||||||
|
fTargetCPU: string;
|
||||||
|
fVarsInReg: Boolean;
|
||||||
|
fUncertainOpt: Boolean;
|
||||||
|
fOptLevel: Integer;
|
||||||
|
fTargetOS: String;
|
||||||
|
|
||||||
|
// Linking:
|
||||||
|
fGenDebugInfo: Boolean;
|
||||||
|
fGenDebugDBX: Boolean;
|
||||||
|
fUseLineInfoUnit: Boolean;
|
||||||
|
fUseHeaptrc: Boolean;
|
||||||
|
fUseValgrind: Boolean;
|
||||||
|
fGenGProfCode: Boolean;
|
||||||
|
fStripSymbols: Boolean;
|
||||||
|
fLinkStyle: Integer;
|
||||||
|
fPassLinkerOpt: Boolean;
|
||||||
|
fLinkerOptions: String;
|
||||||
|
FWin32GraphicApp: boolean;
|
||||||
|
|
||||||
|
// Messages:
|
||||||
|
fShowErrors: Boolean;
|
||||||
|
fShowWarn: Boolean;
|
||||||
|
fShowNotes: Boolean;
|
||||||
|
fShowHints: Boolean;
|
||||||
|
fShowGenInfo: Boolean;
|
||||||
|
fShowLineNum: Boolean;
|
||||||
fShowAll: Boolean;
|
fShowAll: Boolean;
|
||||||
fShowAllProcsOnError: Boolean;
|
fShowAllProcsOnError: Boolean;
|
||||||
|
fShowDebugInfo: Boolean;
|
||||||
|
fShowUsedFiles: Boolean;
|
||||||
|
fShowTriedFiles: Boolean;
|
||||||
|
fShowDefMacros: Boolean;
|
||||||
fShowCompProc: Boolean;
|
fShowCompProc: Boolean;
|
||||||
fShowCond: Boolean;
|
fShowCond: Boolean;
|
||||||
fShowDebugInfo: Boolean;
|
|
||||||
fShowDefMacros: Boolean;
|
|
||||||
fShowErrors: Boolean;
|
|
||||||
fShowGenInfo: Boolean;
|
|
||||||
fShowHints: Boolean;
|
|
||||||
fShowHintsForUnusedUnitsInMainSrc: Boolean;
|
|
||||||
fShowLineNum: Boolean;
|
|
||||||
fShowNotes: Boolean;
|
|
||||||
fShowNothing: Boolean;
|
fShowNothing: Boolean;
|
||||||
fShowTriedFiles: Boolean;
|
fShowHintsForUnusedUnitsInMainSrc: Boolean;
|
||||||
fShowUsedFiles: Boolean;
|
|
||||||
fShowWarn: Boolean;
|
|
||||||
FSrcPath: string;
|
|
||||||
fStackChecks: Boolean;
|
|
||||||
fStaticKwd: Boolean;
|
|
||||||
fStopAfterErrCount: integer;
|
|
||||||
fStripSymbols: Boolean;
|
|
||||||
fTargetCPU: string;
|
|
||||||
fTargetOS: string;
|
|
||||||
fTargetProc: Integer;
|
|
||||||
fTPCompat: Boolean;
|
|
||||||
fUncertainOpt: Boolean;
|
|
||||||
fUnitOutputDir: string;
|
|
||||||
fUnitStyle: Integer;
|
|
||||||
fUseAnsiStr: Boolean;
|
|
||||||
fUseHeaptrc: Boolean;
|
|
||||||
fUseLineInfoUnit: Boolean;
|
|
||||||
fUseValgrind: Boolean;
|
|
||||||
fVarsInReg: Boolean;
|
|
||||||
FWin32GraphicApp: boolean;
|
|
||||||
fWriteFPCLogo: Boolean;
|
fWriteFPCLogo: Boolean;
|
||||||
|
fStopAfterErrCount: integer;
|
||||||
|
|
||||||
|
// Other:
|
||||||
|
fDontUseConfigFile: Boolean;
|
||||||
|
fAdditionalConfigFile: Boolean;
|
||||||
|
fConfigFilePath: String;
|
||||||
|
fCustomOptions: string;
|
||||||
protected
|
protected
|
||||||
procedure SetBaseDirectory(const AValue: string); virtual; abstract;
|
procedure SetBaseDirectory(const AValue: string); virtual; abstract;
|
||||||
procedure SetCompilerPath(const AValue: String); virtual; abstract;
|
procedure SetCompilerPath(const AValue: String); virtual; abstract;
|
||||||
|
@ -159,6 +159,10 @@ const
|
|||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
{$IFNDEF TRANSLATESTRING}
|
||||||
|
TTranslateString = string;//for backward compatibility
|
||||||
|
{$ENDIF}
|
||||||
TWinControl = class;
|
TWinControl = class;
|
||||||
TControl = class;
|
TControl = class;
|
||||||
TWinControlClass = class of TWinControl;
|
TWinControlClass = class of TWinControl;
|
||||||
@ -197,7 +201,7 @@ type
|
|||||||
TAlignSet = set of TAlign;
|
TAlignSet = set of TAlign;
|
||||||
TAnchorKind = (akTop, akLeft, akRight, akBottom);
|
TAnchorKind = (akTop, akLeft, akRight, akBottom);
|
||||||
TAnchors = set of TAnchorKind;
|
TAnchors = set of TAnchorKind;
|
||||||
TCaption = String;
|
TCaption = TTranslateString;
|
||||||
TCursor = -32768..32767;
|
TCursor = -32768..32767;
|
||||||
|
|
||||||
TFormStyle = (fsNormal, fsMDIChild, fsMDIFORM, fsStayOnTop, fsSplash);
|
TFormStyle = (fsNormal, fsMDIChild, fsMDIFORM, fsStayOnTop, fsSplash);
|
||||||
@ -721,7 +725,7 @@ type
|
|||||||
FHelpContext: THelpContext;
|
FHelpContext: THelpContext;
|
||||||
FHelpKeyword: String;
|
FHelpKeyword: String;
|
||||||
FHelpType: THelpType;
|
FHelpType: THelpType;
|
||||||
FHint: String;
|
FHint: TTranslateString;
|
||||||
FHostDockSite: TWinControl;
|
FHostDockSite: TWinControl;
|
||||||
FIsControl: Boolean;
|
FIsControl: Boolean;
|
||||||
fLastAlignedBounds: TRect;
|
fLastAlignedBounds: TRect;
|
||||||
@ -945,7 +949,7 @@ type
|
|||||||
procedure SetAction(Value: TBasicAction); virtual;
|
procedure SetAction(Value: TBasicAction); virtual;
|
||||||
procedure SetColor(Value: TColor); virtual;
|
procedure SetColor(Value: TColor); virtual;
|
||||||
procedure SetEnabled(Value: Boolean); virtual;
|
procedure SetEnabled(Value: Boolean); virtual;
|
||||||
procedure SetHint(const Value: String); virtual;
|
procedure SetHint(const Value: TTranslateString); virtual;
|
||||||
procedure SetName(const Value: TComponentName); override;
|
procedure SetName(const Value: TComponentName); override;
|
||||||
procedure SetParent(NewParent: TWinControl); virtual;
|
procedure SetParent(NewParent: TWinControl); virtual;
|
||||||
Procedure SetParentComponent(NewParentComponent: TComponent); override;
|
Procedure SetParentComponent(NewParentComponent: TComponent); override;
|
||||||
@ -1113,7 +1117,7 @@ type
|
|||||||
property Cursor: TCursor read FCursor write SetCursor default crDefault;
|
property Cursor: TCursor read FCursor write SetCursor default crDefault;
|
||||||
property Left: Integer read FLeft write SetLeft;
|
property Left: Integer read FLeft write SetLeft;
|
||||||
property Height: Integer read FHeight write SetHeight;
|
property Height: Integer read FHeight write SetHeight;
|
||||||
property Hint: String read FHint write SetHint;
|
property Hint: TTranslateString read FHint write SetHint;
|
||||||
property Top: Integer read FTop write SetTop;
|
property Top: Integer read FTop write SetTop;
|
||||||
property Width: Integer read FWidth write SetWidth;
|
property Width: Integer read FWidth write SetWidth;
|
||||||
property HelpType: THelpType read FHelpType write FHelpType default htContext;
|
property HelpType: THelpType read FHelpType write FHelpType default htContext;
|
||||||
@ -2387,6 +2391,9 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.250 2004/10/12 08:23:20 mattias
|
||||||
|
fixed compiler options interface double variables
|
||||||
|
|
||||||
Revision 1.249 2004/09/25 15:05:38 mattias
|
Revision 1.249 2004/09/25 15:05:38 mattias
|
||||||
implemented Rename Identifier
|
implemented Rename Identifier
|
||||||
|
|
||||||
|
@ -307,7 +307,6 @@ type
|
|||||||
FTempText : string;
|
FTempText : string;
|
||||||
FDrawingActiveRecord: Boolean;
|
FDrawingActiveRecord: Boolean;
|
||||||
FEditingColumn: Integer;
|
FEditingColumn: Integer;
|
||||||
FEditingField: TField;
|
|
||||||
function GetCurrentField: TField;
|
function GetCurrentField: TField;
|
||||||
function GetDataSource: TDataSource;
|
function GetDataSource: TDataSource;
|
||||||
procedure OnRecordChanged(Field:TField);
|
procedure OnRecordChanged(Field:TField);
|
||||||
@ -1469,6 +1468,7 @@ begin
|
|||||||
inherited PrepareCanvas(aCol, aRow, aState);
|
inherited PrepareCanvas(aCol, aRow, aState);
|
||||||
// we get the default canvas values
|
// we get the default canvas values
|
||||||
// now, modify canvas according to column values
|
// now, modify canvas according to column values
|
||||||
|
ForTitle:=false;
|
||||||
TheAlignment := GetColumnAlignment(ACol, ForTitle);
|
TheAlignment := GetColumnAlignment(ACol, ForTitle);
|
||||||
case TheAlignment of
|
case TheAlignment of
|
||||||
taRightJustify: Canvas.TextStyle.Alignment := Classes.taRightJustify;
|
taRightJustify: Canvas.TextStyle.Alignment := Classes.taRightJustify;
|
||||||
@ -2703,6 +2703,9 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.21 2004/10/12 08:23:20 mattias
|
||||||
|
fixed compiler options interface double variables
|
||||||
|
|
||||||
Revision 1.20 2004/10/09 18:08:52 vincents
|
Revision 1.20 2004/10/09 18:08:52 vincents
|
||||||
Fix fpc 1.0.x compilation.
|
Fix fpc 1.0.x compilation.
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ begin
|
|||||||
if HandleAllocated and (not fValueNeedsUpdate) then begin
|
if HandleAllocated and (not fValueNeedsUpdate) then begin
|
||||||
FValue := TWSCustomSpinEditClass(WidgetSetClass).GetValue(Self);
|
FValue := TWSCustomSpinEditClass(WidgetSetClass).GetValue(Self);
|
||||||
end;
|
end;
|
||||||
GetValue := fValue;
|
Result := fValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{-----------------------------------------------------------------------------}
|
{-----------------------------------------------------------------------------}
|
||||||
@ -203,7 +203,7 @@ begin
|
|||||||
fMinValue := 0;
|
fMinValue := 0;
|
||||||
fMaxValue := 100;
|
fMaxValue := 100;
|
||||||
|
|
||||||
SetInitialBounds(1,1,50,20);
|
SetInitialBounds(0,0,50,20);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{-----------------------------------------------------------------------------}
|
{-----------------------------------------------------------------------------}
|
||||||
@ -212,6 +212,11 @@ begin
|
|||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomSpinEdit.DestroyComponent;
|
||||||
|
begin
|
||||||
|
GetValue;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomSpinEdit.SelectAll;
|
procedure TCustomSpinEdit.SelectAll;
|
||||||
begin
|
begin
|
||||||
if Text <> '' then begin
|
if Text <> '' then begin
|
||||||
|
@ -30,9 +30,9 @@ uses
|
|||||||
{$IFDEF gtk2}
|
{$IFDEF gtk2}
|
||||||
glib2, gdk2pixbuf, gdk2, gtk2, Pango,
|
glib2, gdk2pixbuf, gdk2, gtk2, Pango,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
glib, gdk, gtk, {$Ifndef NoGdkPixbufLib}gdkpixbuf,{$EndIf} GtkFontCache,
|
glib, gdk, gtk,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Spin, WSSpin, WSLCLClasses, LCLType;
|
Spin, GtkProc, GtkWSStdCtrls, WSSpin, WSLCLClasses, LCLType;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -42,29 +42,86 @@ type
|
|||||||
private
|
private
|
||||||
protected
|
protected
|
||||||
public
|
public
|
||||||
|
class function GetSelStart(const ACustomSpinEdit: TCustomSpinEdit): integer; override;
|
||||||
|
class function GetSelLength(const ACustomSpinEdit: TCustomSpinEdit): integer; override;
|
||||||
|
class function GetValue(const ACustomSpinEdit: TCustomSpinEdit): single; override;
|
||||||
|
|
||||||
|
class procedure SetSelStart(const ACustomSpinEdit: TCustomSpinEdit; NewStart: integer); override;
|
||||||
|
class procedure SetSelLength(const ACustomSpinEdit: TCustomSpinEdit; NewLength: integer); override;
|
||||||
|
|
||||||
class procedure UpdateControl(const ACustomSpinEdit: TCustomSpinEdit); override;
|
class procedure UpdateControl(const ACustomSpinEdit: TCustomSpinEdit); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TGtkWSSpinEdit }
|
function GetGtkSpinEntry(Spin: PGtkSpinButton): PGtkEntry;
|
||||||
|
function GetSpinGtkEntry(Spin: TCustomSpinEdit): PGtkEntry;
|
||||||
TGtkWSSpinEdit = class(TWSSpinEdit)
|
function GetGtkSpinEditable(Spin: PGtkSpinButton): PGtkOldEditable;
|
||||||
private
|
function GetSpinGtkEditable(Spin: TCustomSpinEdit): PGtkOldEditable;
|
||||||
protected
|
|
||||||
public
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
function GetGtkSpinEntry(Spin: PGtkSpinButton): PGtkEntry;
|
||||||
|
begin
|
||||||
|
Result:=PGtkEntry(@(Spin^.entry));
|
||||||
|
end;
|
||||||
|
|
||||||
|
function GetSpinGtkEntry(Spin: TCustomSpinEdit): PGtkEntry;
|
||||||
|
begin
|
||||||
|
Result:=GetGtkSpinEntry(PGtkSpinButton(Spin.Handle));
|
||||||
|
end;
|
||||||
|
|
||||||
|
function GetGtkSpinEditable(Spin: PGtkSpinButton): PGtkOldEditable;
|
||||||
|
begin
|
||||||
|
Result:=PGtkOldEditable(@(Spin^.entry));
|
||||||
|
end;
|
||||||
|
|
||||||
|
function GetSpinGtkEditable(Spin: TCustomSpinEdit): PGtkOldEditable;
|
||||||
|
begin
|
||||||
|
Result:=GetGtkSpinEditable(PGtkSpinButton(Spin.Handle));
|
||||||
|
end;
|
||||||
|
|
||||||
{ TGtkWSCustomSpinEdit }
|
{ TGtkWSCustomSpinEdit }
|
||||||
|
|
||||||
procedure TGtkWSCustomSpinEdit.UpdateControl(const ACustomSpinEdit: TCustomSpinEdit);
|
function TGtkWSCustomSpinEdit.GetSelStart(const ACustomSpinEdit: TCustomSpinEdit
|
||||||
|
): integer;
|
||||||
|
begin
|
||||||
|
Result := WidgetGetSelStart(PGtkWidget(GetSpinGtkEntry(ACustomSpinEdit)));
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TGtkWSCustomSpinEdit.GetSelLength(
|
||||||
|
const ACustomSpinEdit: TCustomSpinEdit): integer;
|
||||||
|
begin
|
||||||
|
with GetSpinGtkEditable(ACustomSpinEdit)^ do
|
||||||
|
Result := Abs(integer(selection_end_pos)-integer(selection_start_pos));
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TGtkWSCustomSpinEdit.GetValue(const ACustomSpinEdit: TCustomSpinEdit
|
||||||
|
): single;
|
||||||
|
begin
|
||||||
|
Result:=gtk_spin_button_get_value_as_float(
|
||||||
|
PGtkSpinButton(ACustomSpinEdit.Handle));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGtkWSCustomSpinEdit.SetSelStart(
|
||||||
|
const ACustomSpinEdit: TCustomSpinEdit; NewStart: integer);
|
||||||
|
begin
|
||||||
|
gtk_editable_set_position(GetSpinGtkEditable(ACustomSpinEdit), NewStart);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGtkWSCustomSpinEdit.SetSelLength(
|
||||||
|
const ACustomSpinEdit: TCustomSpinEdit; NewLength: integer);
|
||||||
|
begin
|
||||||
|
WidgetSetSelLength(PGtkWidget(GetSpinGtkEntry(ACustomSpinEdit)),NewLength);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGtkWSCustomSpinEdit.UpdateControl(
|
||||||
|
const ACustomSpinEdit: TCustomSpinEdit);
|
||||||
var
|
var
|
||||||
AnAdjustment: PGtkAdjustment;
|
AnAdjustment: PGtkAdjustment;
|
||||||
wHandle: HWND;
|
wHandle: HWND;
|
||||||
begin
|
begin
|
||||||
wHandle := ACustomSpinEdit.Handle;
|
wHandle := ACustomSpinEdit.Handle;
|
||||||
AnAdjustment:=gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(Pointer(wHandle)));
|
AnAdjustment:=
|
||||||
|
gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(Pointer(wHandle)));
|
||||||
if (AnAdjustment^.lower<>ACustomSpinEdit.MinValue)
|
if (AnAdjustment^.lower<>ACustomSpinEdit.MinValue)
|
||||||
or (AnAdjustment^.upper<>ACustomSpinEdit.MaxValue) then
|
or (AnAdjustment^.upper<>ACustomSpinEdit.MaxValue) then
|
||||||
begin
|
begin
|
||||||
|
@ -265,6 +265,8 @@ type
|
|||||||
public
|
public
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function WidgetGetSelStart(const Widget: PGtkWidget): integer;
|
||||||
|
procedure WidgetSetSelLength(const Widget: PGtkWidget; NewLength: integer);
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -75,6 +75,7 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create(TheOwner: TComponent); override;
|
constructor Create(TheOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
procedure DestroyComponent; override;
|
||||||
procedure SelectAll;
|
procedure SelectAll;
|
||||||
procedure ClearSelection; virtual;
|
procedure ClearSelection; virtual;
|
||||||
procedure CopyToClipboard; virtual;
|
procedure CopyToClipboard; virtual;
|
||||||
|
Loading…
Reference in New Issue
Block a user