fixed compiler options interface double variables

git-svn-id: trunk@6133 -
This commit is contained in:
mattias 2004-10-12 08:23:20 +00:00
parent 09f9e53b4f
commit 6a9d72cbda
9 changed files with 180 additions and 169 deletions

View File

@ -175,96 +175,12 @@ type
fInheritedOptParseStamps: integer;
fInheritedOptGraphStamps: integer;
fLoaded: Boolean;
FModified: boolean;
fOptionsString: String;
FParsedOpts: TParsedCompilerOptions;
fTargetFilename: string;
FWin32GraphicApp: boolean;
fXMLFile: String;
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
fCompilerPath: String;
fExecuteBefore: TCompilationTool;
@ -341,7 +257,7 @@ type
property XMLConfigFile: TXMLConfig read FXMLConfig write FXMLConfig;
property Loaded: Boolean read fLoaded write fLoaded;
// search paths:
{ // search paths:
property IncludeFiles: String read fIncludeFiles write SetIncludeFiles;
property Libraries: String read fLibraries write SetLibraries;
property OtherUnitFiles: String read fOtherUnitFiles write SetOtherUnitFiles;
@ -428,7 +344,7 @@ type
property AdditionalConfigFile: Boolean read fAdditionalConfigFile
write fAdditionalConfigFile;
property ConfigFilePath: String read fConfigFilePath write fConfigFilePath;
property CustomOptions: string read fCustomOptions write SetCustomOptions;
property CustomOptions: string read fCustomOptions write SetCustomOptions;}
// compilation
property CompilerPath: String read fCompilerPath write SetCompilerPath;
@ -2174,7 +2090,7 @@ begin
fStackChecks := CompOpts.fStackChecks;
FEmulatedFloatOpcodes := CompOpts.fEmulatedFloatOpcodes;
fHeapSize := CompOpts.fHeapSize;
fVerifyObjMethodCall := CompOpts.fVerifyObjMethodCall;
fEmulatedFloatOpcodes := CompOpts.fEmulatedFloatOpcodes;
fGenerate := CompOpts.fGenerate;
fTargetProc := CompOpts.fTargetProc;
fTargetCPU := CompOpts.fTargetCPU;
@ -2265,7 +2181,7 @@ begin
and (fStackChecks = CompOpts.fStackChecks)
and (FEmulatedFloatOpcodes = CompOpts.FEmulatedFloatOpcodes)
and (fHeapSize = CompOpts.fHeapSize)
and (fVerifyObjMethodCall = CompOpts.fVerifyObjMethodCall)
and (fEmulatedFloatOpcodes = CompOpts.fEmulatedFloatOpcodes)
and (fGenerate = CompOpts.fGenerate)
and (fTargetProc = CompOpts.fTargetProc)
and (fTargetCPU = CompOpts.fTargetCPU)

View File

@ -2514,6 +2514,7 @@ end;
procedure TProject.SetCompilerOptions(const AValue: TProjectCompilerOptions);
begin
if fCompilerOptions=AValue then exit;
fCompilerOptions:=AValue;
inherited SetLazCompilerOptions(AValue);
end;
@ -3129,6 +3130,9 @@ end.
{
$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
added compiler options to IDEIntf and made Win32GraphicApp default for application projects

View File

@ -45,77 +45,93 @@ type
TLazCompilerOptions = class(TPersistent)
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;
fOptLevel: Integer;
fOtherUnitFiles: String;
fOverflowChecks: Boolean;
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;
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;
fShowAllProcsOnError: Boolean;
fShowDebugInfo: Boolean;
fShowUsedFiles: Boolean;
fShowTriedFiles: Boolean;
fShowDefMacros: Boolean;
fShowCompProc: Boolean;
fShowCond: Boolean;
fShowDebugInfo: Boolean;
fShowDefMacros: Boolean;
fShowErrors: Boolean;
fShowGenInfo: Boolean;
fShowHints: Boolean;
fShowHintsForUnusedUnitsInMainSrc: Boolean;
fShowLineNum: Boolean;
fShowNotes: Boolean;
fShowNothing: Boolean;
fShowTriedFiles: 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;
fShowHintsForUnusedUnitsInMainSrc: Boolean;
fWriteFPCLogo: Boolean;
fStopAfterErrCount: integer;
// Other:
fDontUseConfigFile: Boolean;
fAdditionalConfigFile: Boolean;
fConfigFilePath: String;
fCustomOptions: string;
protected
procedure SetBaseDirectory(const AValue: string); virtual; abstract;
procedure SetCompilerPath(const AValue: String); virtual; abstract;

View File

@ -159,6 +159,10 @@ const
type
{$IFNDEF TRANSLATESTRING}
TTranslateString = string;//for backward compatibility
{$ENDIF}
TWinControl = class;
TControl = class;
TWinControlClass = class of TWinControl;
@ -197,7 +201,7 @@ type
TAlignSet = set of TAlign;
TAnchorKind = (akTop, akLeft, akRight, akBottom);
TAnchors = set of TAnchorKind;
TCaption = String;
TCaption = TTranslateString;
TCursor = -32768..32767;
TFormStyle = (fsNormal, fsMDIChild, fsMDIFORM, fsStayOnTop, fsSplash);
@ -721,7 +725,7 @@ type
FHelpContext: THelpContext;
FHelpKeyword: String;
FHelpType: THelpType;
FHint: String;
FHint: TTranslateString;
FHostDockSite: TWinControl;
FIsControl: Boolean;
fLastAlignedBounds: TRect;
@ -945,7 +949,7 @@ type
procedure SetAction(Value: TBasicAction); virtual;
procedure SetColor(Value: TColor); 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 SetParent(NewParent: TWinControl); virtual;
Procedure SetParentComponent(NewParentComponent: TComponent); override;
@ -1113,7 +1117,7 @@ type
property Cursor: TCursor read FCursor write SetCursor default crDefault;
property Left: Integer read FLeft write SetLeft;
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 Width: Integer read FWidth write SetWidth;
property HelpType: THelpType read FHelpType write FHelpType default htContext;
@ -2387,6 +2391,9 @@ end.
{ =============================================================================
$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
implemented Rename Identifier

View File

@ -307,7 +307,6 @@ type
FTempText : string;
FDrawingActiveRecord: Boolean;
FEditingColumn: Integer;
FEditingField: TField;
function GetCurrentField: TField;
function GetDataSource: TDataSource;
procedure OnRecordChanged(Field:TField);
@ -1469,6 +1468,7 @@ begin
inherited PrepareCanvas(aCol, aRow, aState);
// we get the default canvas values
// now, modify canvas according to column values
ForTitle:=false;
TheAlignment := GetColumnAlignment(ACol, ForTitle);
case TheAlignment of
taRightJustify: Canvas.TextStyle.Alignment := Classes.taRightJustify;
@ -2703,6 +2703,9 @@ end.
{
$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
Fix fpc 1.0.x compilation.

View File

@ -179,7 +179,7 @@ begin
if HandleAllocated and (not fValueNeedsUpdate) then begin
FValue := TWSCustomSpinEditClass(WidgetSetClass).GetValue(Self);
end;
GetValue := fValue;
Result := fValue;
end;
{-----------------------------------------------------------------------------}
@ -203,7 +203,7 @@ begin
fMinValue := 0;
fMaxValue := 100;
SetInitialBounds(1,1,50,20);
SetInitialBounds(0,0,50,20);
end;
{-----------------------------------------------------------------------------}
@ -212,6 +212,11 @@ begin
inherited Destroy;
end;
procedure TCustomSpinEdit.DestroyComponent;
begin
GetValue;
end;
procedure TCustomSpinEdit.SelectAll;
begin
if Text <> '' then begin

View File

@ -30,9 +30,9 @@ uses
{$IFDEF gtk2}
glib2, gdk2pixbuf, gdk2, gtk2, Pango,
{$ELSE}
glib, gdk, gtk, {$Ifndef NoGdkPixbufLib}gdkpixbuf,{$EndIf} GtkFontCache,
glib, gdk, gtk,
{$ENDIF}
Spin, WSSpin, WSLCLClasses, LCLType;
Spin, GtkProc, GtkWSStdCtrls, WSSpin, WSLCLClasses, LCLType;
type
@ -42,29 +42,86 @@ type
private
protected
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;
end;
{ TGtkWSSpinEdit }
TGtkWSSpinEdit = class(TWSSpinEdit)
private
protected
public
end;
function GetGtkSpinEntry(Spin: PGtkSpinButton): PGtkEntry;
function GetSpinGtkEntry(Spin: TCustomSpinEdit): PGtkEntry;
function GetGtkSpinEditable(Spin: PGtkSpinButton): PGtkOldEditable;
function GetSpinGtkEditable(Spin: TCustomSpinEdit): PGtkOldEditable;
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 }
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
AnAdjustment: PGtkAdjustment;
wHandle: HWND;
begin
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)
or (AnAdjustment^.upper<>ACustomSpinEdit.MaxValue) then
begin

View File

@ -265,6 +265,8 @@ type
public
end;
function WidgetGetSelStart(const Widget: PGtkWidget): integer;
procedure WidgetSetSelLength(const Widget: PGtkWidget; NewLength: integer);
implementation

View File

@ -75,6 +75,7 @@ type
public
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
procedure DestroyComponent; override;
procedure SelectAll;
procedure ClearSelection; virtual;
procedure CopyToClipboard; virtual;