mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-07 17:58:16 +02:00
IDE: less hints, initialize vars, use unused parameters
git-svn-id: trunk@44457 -
This commit is contained in:
parent
914882e83c
commit
d841be9240
@ -89,6 +89,7 @@ var
|
||||
strItem: string;
|
||||
canAdd: boolean;
|
||||
begin
|
||||
strItem:='';
|
||||
if not InputQuery(cgCheckGroupEditor, clbAdd, strItem) then
|
||||
Exit;
|
||||
canAdd := True;
|
||||
|
@ -82,6 +82,7 @@ procedure TCheckListBoxEditorDlg.actAddExecute(Sender: TObject);
|
||||
var
|
||||
strItem: string;
|
||||
begin
|
||||
strItem:='';
|
||||
if InputQuery(clbCheckListBoxEditor, clbAdd, strItem) then
|
||||
begin
|
||||
FCheck.Items.Add(strItem);
|
||||
|
@ -38,7 +38,7 @@ type
|
||||
protected
|
||||
procedure UpdateCaption;
|
||||
procedure UpdateButtons;
|
||||
procedure PersistentAdded(APersistent: TPersistent; Select: boolean);
|
||||
procedure PersistentAdded({%H-}APersistent: TPersistent; {%H-}Select: boolean);
|
||||
procedure ComponentRenamed(AComponent: TComponent);
|
||||
procedure PersistentDeleting(APersistent: TPersistent);
|
||||
procedure RefreshPropertyValues;
|
||||
|
@ -37,12 +37,12 @@ type
|
||||
procedure DisplayColumn(Value : Integer);
|
||||
procedure SetColumns(const AValue: TListColumns);
|
||||
protected
|
||||
procedure AddButtonOnClick(sender : TObject);
|
||||
procedure DeleteButtonOnClick(sender : TObject);
|
||||
procedure MoveUpButtonOnClick(sender : TObject);
|
||||
procedure MoveDownButtonOnClick(sender : TObject);
|
||||
procedure AlignmentRadioGroupOnClick(sender : TObject);
|
||||
procedure ColumnsListBoxOnClick(sender : TObject);
|
||||
procedure AddButtonOnClick({%H-}sender : TObject);
|
||||
procedure DeleteButtonOnClick({%H-}sender : TObject);
|
||||
procedure MoveUpButtonOnClick({%H-}sender : TObject);
|
||||
procedure MoveDownButtonOnClick({%H-}sender : TObject);
|
||||
procedure AlignmentRadioGroupOnClick({%H-}sender : TObject);
|
||||
procedure ColumnsListBoxOnClick({%H-}sender : TObject);
|
||||
Procedure CaptionEditOnChange(Sender : TObject);
|
||||
Procedure WidthEditOnChange(Sender : TObject);
|
||||
Procedure cbVisibleOnClick(Sender : TObject);
|
||||
|
@ -195,17 +195,17 @@ type
|
||||
procedure DoChange; virtual;
|
||||
procedure DoBeginUpdate; virtual;
|
||||
procedure DoEndUpdate(Changed: boolean); virtual;
|
||||
procedure OnPageAddedComponent(Component: TRegisteredComponent); virtual;
|
||||
procedure OnPageRemovedComponent(Page: TBaseComponentPage;
|
||||
Component: TRegisteredComponent); virtual;
|
||||
procedure OnComponentVisibleChanged(AComponent: TRegisteredComponent); virtual;
|
||||
procedure OnPageVisibleChanged(APage: TBaseComponentPage); virtual;
|
||||
procedure OnPageAddedComponent({%H-}Component: TRegisteredComponent); virtual;
|
||||
procedure OnPageRemovedComponent({%H-}Page: TBaseComponentPage;
|
||||
{%H-}Component: TRegisteredComponent); virtual;
|
||||
procedure OnComponentVisibleChanged({%H-}AComponent: TRegisteredComponent); virtual;
|
||||
procedure OnPageVisibleChanged({%H-}APage: TBaseComponentPage); virtual;
|
||||
procedure Update; virtual;
|
||||
procedure UpdateVisible(AComponent: TRegisteredComponent); virtual;
|
||||
function GetSelected: TRegisteredComponent; virtual;
|
||||
procedure SetBaseComponentPageClass(const AValue: TBaseComponentPageClass); virtual;
|
||||
procedure SetRegisteredComponentClass(const AValue: TRegisteredComponentClass); virtual;
|
||||
procedure SetSelected(const AValue: TRegisteredComponent); virtual;
|
||||
procedure SetSelected(const AValue: TRegisteredComponent); virtual; abstract;
|
||||
function SortPagesDefaultOrder: Boolean;
|
||||
public
|
||||
constructor Create;
|
||||
@ -231,7 +231,7 @@ type
|
||||
procedure UpdateVisible; virtual;
|
||||
procedure IterateRegisteredClasses(Proc: TGetComponentClassEvent);
|
||||
procedure RegisterCustomIDEComponents(
|
||||
const RegisterProc: RegisterUnitComponentProc); virtual;
|
||||
const RegisterProc: RegisterUnitComponentProc); virtual; abstract;
|
||||
procedure RemoveAllHandlersOfObject(AnObject: TObject);
|
||||
procedure AddHandlerUpdateVisible(
|
||||
const OnUpdateCompVisibleEvent: TUpdateCompVisibleEvent;
|
||||
@ -324,8 +324,6 @@ begin
|
||||
end;
|
||||
|
||||
destructor TCompPaletteOptions.Destroy;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
ClearComponentPages;
|
||||
FComponentPages.Free;
|
||||
@ -408,8 +406,7 @@ end;
|
||||
function TCompPaletteOptions.Save: boolean;
|
||||
var
|
||||
CompList: TStringList;
|
||||
Path, SubPath, CompPath, ss: String;
|
||||
PageCount, CompCount: Integer;
|
||||
Path, SubPath, CompPath: String;
|
||||
i, j: Integer;
|
||||
begin
|
||||
Result:=False;
|
||||
@ -668,7 +665,7 @@ procedure TBaseComponentPalette.AddHandler(HandlerType: TComponentPaletteHandler
|
||||
begin
|
||||
if FHandlers[HandlerType]=nil then
|
||||
FHandlers[HandlerType]:=TMethodList.Create;
|
||||
FHandlers[HandlerType].Add(AMethod);
|
||||
FHandlers[HandlerType].Add(AMethod,AsLast);
|
||||
end;
|
||||
|
||||
function TBaseComponentPalette.GetSelected: TRegisteredComponent;
|
||||
@ -689,11 +686,6 @@ begin
|
||||
UpdateVisible;
|
||||
end;
|
||||
|
||||
procedure TBaseComponentPalette.SetSelected(const AValue: TRegisteredComponent);
|
||||
begin
|
||||
// ignore
|
||||
end;
|
||||
|
||||
procedure TBaseComponentPalette.DoChange;
|
||||
begin
|
||||
if FUpdateLock>0 then
|
||||
@ -993,12 +985,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TBaseComponentPalette.RegisterCustomIDEComponents(
|
||||
const RegisterProc: RegisterUnitComponentProc);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TBaseComponentPalette.RemoveAllHandlersOfObject(AnObject: TObject);
|
||||
var
|
||||
HandlerType: TComponentPaletteHandlerType;
|
||||
@ -1010,7 +996,7 @@ end;
|
||||
procedure TBaseComponentPalette.AddHandlerUpdateVisible(
|
||||
const OnUpdateCompVisibleEvent: TUpdateCompVisibleEvent; AsLast: boolean);
|
||||
begin
|
||||
AddHandler(cphtUpdateVisible,TMethod(OnUpdateCompVisibleEvent));
|
||||
AddHandler(cphtUpdateVisible,TMethod(OnUpdateCompVisibleEvent),AsLast);
|
||||
end;
|
||||
|
||||
procedure TBaseComponentPalette.RemoveHandlerUpdateVisible(
|
||||
|
@ -20,7 +20,7 @@ type
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure MoveUpBtnClick(Sender: TObject);
|
||||
procedure MoveDownBtnClick(Sender: TObject);
|
||||
procedure StringGrid1ButtonClick(Sender: TObject; aCol, aRow: Integer);
|
||||
procedure StringGrid1ButtonClick(Sender: TObject; {%H-}aCol, {%H-}aRow: Integer);
|
||||
procedure StringGrid1Click(Sender: TObject);
|
||||
procedure StringGrid1EditingDone(Sender: TObject);
|
||||
private
|
||||
|
@ -42,10 +42,10 @@ type
|
||||
procedure BAddClick(Sender: TObject);
|
||||
procedure BClearClick(Sender: TObject);
|
||||
procedure BDeleteClick(Sender: TObject);
|
||||
procedure LBComponentsSelectionChange(Sender: TObject; User: boolean);
|
||||
procedure LBComponentsSelectionChange(Sender: TObject; {%H-}User: boolean);
|
||||
procedure LBPropertiesDblClick(Sender: TObject);
|
||||
procedure SelectPropertiesFormClose(Sender: TObject;
|
||||
var CloseAction: TCloseAction);
|
||||
var {%H-}CloseAction: TCloseAction);
|
||||
procedure SelectPropertiesFormCreate(Sender: TObject);
|
||||
private
|
||||
FSelectedComponent : TComponent;
|
||||
|
@ -17,8 +17,8 @@ interface
|
||||
|
||||
uses
|
||||
Classes, TypInfo, SysUtils, LCLProc, Forms, Controls, LCLType, GraphType,
|
||||
FileUtil, Graphics, StdCtrls, Buttons, ComCtrls, Menus, ExtCtrls, Dialogs,
|
||||
LCLIntf, ExtDlgs, PropEdits, PropEditUtils, ImgList, Math,
|
||||
FileUtil, Graphics, Buttons, Menus, ExtCtrls, Dialogs,
|
||||
LCLIntf, PropEdits, PropEditUtils, ImgList, Math,
|
||||
GraphicPropEdit; // defines TGraphicPropertyEditorForm
|
||||
|
||||
type
|
||||
@ -59,7 +59,7 @@ type
|
||||
function OrdValueToVisualValue(OrdValue: longint): string; override;
|
||||
procedure GetValues(Proc: TGetStrProc); override;
|
||||
procedure SetValue(const NewValue: ansistring); override;
|
||||
procedure ListMeasureWidth(const CurValue: ansistring; Index: integer;
|
||||
procedure ListMeasureWidth(const {%H-}CurValue: ansistring; {%H-}Index: integer;
|
||||
ACanvas: TCanvas; var AWidth: Integer); override;
|
||||
procedure ListDrawValue(const CurValue: ansistring; Index: integer;
|
||||
ACanvas: TCanvas; const ARect:TRect; AState: TPropEditDrawState); override;
|
||||
@ -73,8 +73,8 @@ type
|
||||
TBrushStylePropertyEditor = class(TEnumPropertyEditor)
|
||||
public
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
procedure ListMeasureWidth(const CurValue: ansistring; Index:integer;
|
||||
ACanvas: TCanvas; var AWidth: Integer); override;
|
||||
procedure ListMeasureWidth(const {%H-}CurValue: ansistring; {%H-}Index:integer;
|
||||
{%H-}ACanvas: TCanvas; var AWidth: Integer); override;
|
||||
procedure ListDrawValue(const CurValue: ansistring; Index:integer;
|
||||
ACanvas: TCanvas; const ARect: TRect; AState: TPropEditDrawState); override;
|
||||
procedure PropDrawValue(ACanvas: TCanvas; const ARect: TRect;
|
||||
@ -87,9 +87,9 @@ type
|
||||
TPenStylePropertyEditor = class(TEnumPropertyEditor)
|
||||
public
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
procedure ListMeasureWidth(const CurValue: ansistring; Index:integer;
|
||||
ACanvas: TCanvas; var AWidth: Integer); override;
|
||||
procedure ListDrawValue(const CurValue: ansistring; Index:integer;
|
||||
procedure ListMeasureWidth(const {%H-}CurValue: ansistring; {%H-}Index:integer;
|
||||
{%H-}ACanvas: TCanvas; var AWidth: Integer); override;
|
||||
procedure ListDrawValue(const CurValue: ansistring; {%H-}Index:integer;
|
||||
ACanvas: TCanvas; const ARect: TRect; AState: TPropEditDrawState); override;
|
||||
procedure PropDrawValue(ACanvas: TCanvas; const ARect: TRect;
|
||||
AState:TPropEditDrawState); override;
|
||||
@ -136,7 +136,7 @@ type
|
||||
public
|
||||
function GetAttributes: TPropertyAttributes; override;
|
||||
procedure GetValues(Proc: TGetStrProc); override;
|
||||
procedure ListMeasureHeight(const AValue: ansistring; Index:integer;
|
||||
procedure ListMeasureHeight(const {%H-}AValue: ansistring; {%H-}Index:integer;
|
||||
ACanvas:TCanvas; var AHeight: Integer); override;
|
||||
procedure ListDrawValue(const CurValue: ansistring; Index:integer;
|
||||
ACanvas: TCanvas; const ARect: TRect; AState: TPropEditDrawState); override;
|
||||
|
@ -37,7 +37,7 @@ type
|
||||
public
|
||||
constructor Create(TheNode: THelpNode; const RegularExpression,
|
||||
TheModifierStr: string);
|
||||
function MessageMatches(const TheMessage: string; MessageParts: TStrings
|
||||
function MessageMatches(const TheMessage: string; {%H-}MessageParts: TStrings
|
||||
): boolean; override;
|
||||
property Expression: string read FExpression write FExpression;
|
||||
property ModifierStr: string read FModifierStr write FModifierStr;
|
||||
|
@ -134,7 +134,7 @@ type
|
||||
procedure Setup(ADialog: TAbstractOptionsEditorDialog); virtual; abstract;
|
||||
procedure ReadSettings(AOptions: TAbstractIDEOptions); virtual; abstract;
|
||||
procedure WriteSettings(AOptions: TAbstractIDEOptions); virtual; abstract;
|
||||
procedure RestoreSettings(AOptions: TAbstractIDEOptions); virtual;
|
||||
procedure RestoreSettings({%H-}AOptions: TAbstractIDEOptions); virtual;
|
||||
class function SupportedOptionsClass: TAbstractIDEOptionsClass; virtual; abstract;
|
||||
class function DefaultCollapseChildNodes: Boolean; virtual;
|
||||
function FindOptionControl(AClass: TControlClass): TControl;
|
||||
@ -544,7 +544,7 @@ var
|
||||
Result:=False; // ToDo...
|
||||
end;
|
||||
|
||||
function SearchMemo(AControl: TCustomMemo): Boolean;
|
||||
function SearchMemo({%H-}AControl: TCustomMemo): Boolean;
|
||||
begin
|
||||
Result:=False; // Memo.Caption returns all the lines, skip.
|
||||
end;
|
||||
|
@ -17,7 +17,7 @@ unit IDEWindowIntf;
|
||||
interface
|
||||
|
||||
uses
|
||||
Math, types, Classes, SysUtils, LCLProc, LazConfigStorage, Forms, Controls;
|
||||
Math, Classes, SysUtils, LCLProc, LazConfigStorage, Forms, Controls;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// layout settings of modal forms (dialogs) in the IDE
|
||||
@ -89,7 +89,7 @@ type
|
||||
TIDEDialogLayoutStorage = class(TComponent)
|
||||
protected
|
||||
procedure OnCreateForm(Sender: TObject);
|
||||
procedure OnCloseForm(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure OnCloseForm(Sender: TObject; var {%H-}CloseAction: TCloseAction);
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
@ -209,7 +209,7 @@ type
|
||||
function GetFormCaption: string;
|
||||
function GetFormID: string;
|
||||
procedure SetForm(const AValue: TCustomForm);
|
||||
procedure OnFormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure OnFormClose(Sender: TObject; var {%H-}CloseAction: TCloseAction);
|
||||
protected
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
public
|
||||
@ -436,7 +436,7 @@ type
|
||||
procedure MakeIDEWindowDockable(AControl: TWinControl); virtual; abstract; // make AControl dockable, it can be docked and other dockable windows can be docked to it, this does not make it visible
|
||||
procedure MakeIDEWindowDockSite(AForm: TCustomForm; ASides: TDockSides = [alBottom]); virtual; abstract; // make AForm a dock site, AForm can not be docked, its Parent must be kept nil, this does not make it visible
|
||||
procedure ShowForm(AForm: TCustomForm; BringToFront: boolean); virtual; abstract; // make a form visible, set BringToFront=true if form should be shown on active screen and on front of other windows, normally this focus the form
|
||||
function AddableInWindowMenu(AForm: TCustomForm): boolean; virtual;
|
||||
function AddableInWindowMenu({%H-}AForm: TCustomForm): boolean; virtual;
|
||||
procedure CloseAll; virtual; // close all forms, called after IDE has saved all and shuts down
|
||||
property HideSimpleLayoutOptions: boolean read FHideSimpleLayoutOptions;
|
||||
end;
|
||||
@ -1315,11 +1315,13 @@ begin
|
||||
iwpdUseWindowSetting:
|
||||
f := WindowPlacement in [iwpRestoreWindowGeometry, iwpRestoreWindowSize];
|
||||
end;
|
||||
if f then
|
||||
if f then begin
|
||||
j:=-1;
|
||||
if Creator.OnGetDividerSize(fForm, FDividers[i].Id, j) then
|
||||
FDividers[i].Size := j
|
||||
else
|
||||
FDividers[i].Size := -1; // Default / Not Changed / Unavailable
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -43,8 +43,8 @@ type
|
||||
procedure BtnLoadClick(Sender: TObject);
|
||||
procedure BtnSaveClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure StringGridPrepareCanvas(sender: TObject; Col, Row: Integer;
|
||||
aState: TGridDrawState);
|
||||
procedure StringGridPrepareCanvas({%H-}sender: TObject; Col, Row: Integer;
|
||||
{%H-}aState: TGridDrawState);
|
||||
procedure SwapRowCol(Sender:TObject);
|
||||
private
|
||||
FModified: Boolean;
|
||||
|
@ -29,13 +29,13 @@ type
|
||||
property GraphTimeStamp: integer read FGraphTimeStamp;
|
||||
procedure IncreaseBaseStamp;
|
||||
procedure IncreaseGraphStamp;
|
||||
function StrHasMacros(const s: string): boolean; virtual;
|
||||
function SubstituteMacros(var s: string): boolean; virtual;
|
||||
function IsMacro(const Name: string): boolean; virtual;
|
||||
function StrHasMacros(const s: string): boolean; virtual; abstract;
|
||||
function SubstituteMacros(var s: string): boolean; virtual; abstract;
|
||||
function IsMacro(const Name: string): boolean; virtual; abstract;
|
||||
// file utility functions
|
||||
function CreateAbsoluteSearchPath(var SearchPath: string;
|
||||
const BaseDirectory: string): boolean;
|
||||
procedure Add(NewMacro: TTransferMacro);virtual;
|
||||
procedure Add(NewMacro: TTransferMacro); virtual; abstract;
|
||||
end;
|
||||
|
||||
var
|
||||
@ -49,7 +49,6 @@ implementation
|
||||
const
|
||||
MaxStamp = $7fffffff;
|
||||
MinStamp = -$7fffffff;
|
||||
InvalidStamp = MinStamp-1;
|
||||
|
||||
procedure RenameIDEMacroInString(var s: string; const OldName, NewName: string);
|
||||
var
|
||||
@ -103,22 +102,6 @@ begin
|
||||
FGraphTimeStamp:=MinStamp;
|
||||
end;
|
||||
|
||||
function TIDEMacros.StrHasMacros(const s: string): boolean;
|
||||
begin
|
||||
Result:=false;
|
||||
end;
|
||||
|
||||
function TIDEMacros.SubstituteMacros(var s: string): boolean;
|
||||
begin
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
function TIDEMacros.IsMacro(const Name: string): boolean;
|
||||
begin
|
||||
if Name='' then ;
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
function TIDEMacros.CreateAbsoluteSearchPath(var SearchPath: string;
|
||||
const BaseDirectory: string): boolean;
|
||||
var
|
||||
@ -131,9 +114,5 @@ begin
|
||||
SearchPath:=MinimizeSearchPath(LazFileUtils.CreateAbsoluteSearchPath(SearchPath,BaseDir));
|
||||
end;
|
||||
|
||||
procedure TIDEMacros.Add(NewMacro: TTransferMacro);
|
||||
Begin
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -16,7 +16,7 @@ unit NewItemIntf;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, ObjInspStrConsts;
|
||||
Classes, SysUtils;
|
||||
|
||||
type
|
||||
// Flags/Options for the items
|
||||
@ -49,7 +49,7 @@ type
|
||||
function Description: string; virtual;
|
||||
function IndexOfTemplate(const TemplateName: string): integer; virtual;
|
||||
function FindTemplateByName(const TemplateName: string): TNewIDEItemTemplate; virtual;
|
||||
function IndexOfCategory(const CategoryName: string): integer; virtual;
|
||||
function IndexOfCategory(const {%H-}CategoryName: string): integer; virtual;
|
||||
function FindCategoryByName(const CategoryName: string): TNewIDEItemCategory; virtual;
|
||||
public
|
||||
property Count: integer read GetCount;
|
||||
|
@ -16,7 +16,7 @@ unit PackageIntf;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, contnrs, LCLProc, Forms, LazConfigStorage, AvgLvlTree,
|
||||
Classes, SysUtils, contnrs, LCLProc, Forms, LazConfigStorage,
|
||||
NewItemIntf, CompOptsIntf, IDEOptionsIntf;
|
||||
|
||||
const
|
||||
@ -732,7 +732,7 @@ procedure TPackageEditingInterface.AddHandler(HandlerType: TPkgIntfHandlerType;
|
||||
begin
|
||||
if FHandlers[HandlerType]=nil then
|
||||
FHandlers[HandlerType]:=TMethodList.Create;
|
||||
FHandlers[HandlerType].Add(AMethod);
|
||||
FHandlers[HandlerType].Add(AMethod,AsLast);
|
||||
end;
|
||||
|
||||
procedure TPackageEditingInterface.RemoveHandler(
|
||||
@ -767,7 +767,7 @@ end;
|
||||
procedure TPackageEditingInterface.AddHandlerOnGraphChanged(
|
||||
const OnGraphChanged: TNotifyEvent; AsLast: boolean);
|
||||
begin
|
||||
AddHandler(pihtGraphChanged,TMethod(OnGraphChanged));
|
||||
AddHandler(pihtGraphChanged,TMethod(OnGraphChanged),AsLast);
|
||||
end;
|
||||
|
||||
procedure TPackageEditingInterface.RemoveHandlerOnGraphChanged(
|
||||
@ -779,7 +779,7 @@ end;
|
||||
procedure TPackageEditingInterface.AddHandlerOnPackageFileLoaded(
|
||||
const OnPkgLoaded: TNotifyEvent; AsLast: boolean);
|
||||
begin
|
||||
AddHandler(pihtPackageFileLoaded,TMethod(OnPkgLoaded));
|
||||
AddHandler(pihtPackageFileLoaded,TMethod(OnPkgLoaded),AsLast);
|
||||
end;
|
||||
|
||||
procedure TPackageEditingInterface.RemoveHandlerOnPackageFileLoaded(
|
||||
|
@ -115,15 +115,15 @@ type
|
||||
constructor Create; virtual;
|
||||
function GetLocalizedName: string; virtual;
|
||||
function GetLocalizedDescription: string; virtual;
|
||||
function GetResourceSource(const ResourceName: string): string; virtual;
|
||||
function GetResourceSource(const {%H-}ResourceName: string): string; virtual;
|
||||
procedure Release;
|
||||
procedure Reference;
|
||||
function CheckOwner(Quiet: boolean): TModalResult; virtual;
|
||||
function CreateSource(const Filename, SourceName,
|
||||
ResourceName: string): string; virtual;
|
||||
function CheckOwner({%H-}Quiet: boolean): TModalResult; virtual;
|
||||
function CreateSource(const {%H-}aFilename, {%H-}aSourceName,
|
||||
{%H-}aResourceName: string): string; virtual;
|
||||
procedure UpdateDefaultPascalFileExtension(const DefPasExt: string); virtual;
|
||||
function Init(var NewFilename: string; NewOwner: TObject;
|
||||
var NewSource: string; Quiet: boolean): TModalResult; virtual;
|
||||
function Init(var {%H-}NewFilename: string; {%H-}NewOwner: TObject;
|
||||
var {%H-}NewSource: string; {%H-}Quiet: boolean): TModalResult; virtual;
|
||||
public
|
||||
property Owner: TObject read FOwner write SetOwner; // project, package or nil
|
||||
property Name: string read FName write SetName;
|
||||
@ -164,16 +164,16 @@ type
|
||||
TFileDescPascalUnit = class(TProjectFileDescriptor)
|
||||
public
|
||||
constructor Create; override;
|
||||
function CreateSource(const Filename, SourceName,
|
||||
ResourceName: string): string; override;
|
||||
function CreateSource(const aFilename, aSourceName,
|
||||
aResourceName: string): string; override;
|
||||
function GetLocalizedName: string; override;
|
||||
function GetLocalizedDescription: string; override;
|
||||
function GetUnitDirectives: string; virtual;
|
||||
function GetInterfaceUsesSection: string; virtual;
|
||||
function GetInterfaceSource(const Filename, SourceName,
|
||||
ResourceName: string): string; virtual;
|
||||
function GetImplementationSource(const Filename, SourceName,
|
||||
ResourceName: string): string; virtual;
|
||||
function GetInterfaceSource(const {%H-}aFilename, {%H-}aSourceName,
|
||||
{%H-}aResourceName: string): string; virtual;
|
||||
function GetImplementationSource(const {%H-}aFilename, {%H-}aSourceName,
|
||||
{%H-}aResourceName: string): string; virtual;
|
||||
function CheckOwner(Quiet: boolean): TModalResult; override;
|
||||
class function CompilerOptionsToUnitDirectives(CompOpts: TLazCompilerOptions): string;
|
||||
end;
|
||||
@ -190,10 +190,10 @@ type
|
||||
constructor Create; override;
|
||||
|
||||
function GetInterfaceUsesSection: string; override;
|
||||
function GetInterfaceSource(const Filename, SourceName,
|
||||
function GetInterfaceSource(const {%H-}Filename, {%H-}SourceName,
|
||||
ResourceName: string): string; override;
|
||||
function GetImplementationSource(const Filename, SourceName,
|
||||
ResourceName: string): string; override;
|
||||
function GetImplementationSource(const Filename, {%H-}SourceName,
|
||||
{%H-}ResourceName: string): string; override;
|
||||
|
||||
property DeclareClassVariable: Boolean read FDeclareClassVariable write FDeclareClassVariable;
|
||||
end;
|
||||
@ -293,7 +293,7 @@ type
|
||||
procedure Reference;
|
||||
function InitDescriptor: TModalResult; // called while old project is still there, you can start a dialog to ask for settings
|
||||
function InitProject(AProject: TLazProject): TModalResult; virtual; // called after old project was closed and new was created, you must now setup global flags and compiler options
|
||||
function CreateStartFiles(AProject: TLazProject): TModalResult; virtual; // called after all global settings are done, you can now create and open files
|
||||
function CreateStartFiles({%H-}AProject: TLazProject): TModalResult; virtual; // called after all global settings are done, you can now create and open files
|
||||
public
|
||||
property Name: string read FName write SetName;
|
||||
property VisibleInNewDialog: boolean read FVisibleInNewDialog
|
||||
@ -414,7 +414,7 @@ type
|
||||
procedure SetTitle(const AValue: String); virtual;
|
||||
procedure SetUseManifest(AValue: boolean); virtual; abstract;
|
||||
public
|
||||
constructor Create(ProjectDescription: TProjectDescriptor); virtual;
|
||||
constructor Create({%H-}ProjectDescription: TProjectDescriptor); virtual;
|
||||
destructor Destroy; override;
|
||||
procedure Clear; virtual;
|
||||
function IsVirtual: boolean; virtual; abstract;
|
||||
@ -784,8 +784,8 @@ begin
|
||||
Result:=mrOk;
|
||||
end;
|
||||
|
||||
function TProjectFileDescriptor.CreateSource(const Filename, SourceName,
|
||||
ResourceName: string): string;
|
||||
function TProjectFileDescriptor.CreateSource(const aFilename, aSourceName,
|
||||
aResourceName: string): string;
|
||||
begin
|
||||
Result:='';
|
||||
end;
|
||||
@ -817,14 +817,14 @@ begin
|
||||
IsPascalUnit:=true;
|
||||
end;
|
||||
|
||||
function TFileDescPascalUnit.CreateSource(const Filename, SourceName,
|
||||
ResourceName: string): string;
|
||||
function TFileDescPascalUnit.CreateSource(const aFilename, aSourceName,
|
||||
aResourceName: string): string;
|
||||
var
|
||||
LE: string;
|
||||
begin
|
||||
LE:=LineEnding;
|
||||
Result:=
|
||||
'unit '+SourceName+';'+LE
|
||||
'unit '+aSourceName+';'+LE
|
||||
+LE
|
||||
+GetUnitDirectives+LE
|
||||
+LE
|
||||
@ -833,10 +833,10 @@ begin
|
||||
+'uses'+LE
|
||||
+' '+GetInterfaceUsesSection+';'+LE
|
||||
+LE
|
||||
+GetInterfaceSource(Filename,SourceName,ResourceName)
|
||||
+GetInterfaceSource(aFilename,aSourceName,aResourceName)
|
||||
+'implementation'+LE
|
||||
+LE
|
||||
+GetImplementationSource(Filename,SourceName,ResourceName)
|
||||
+GetImplementationSource(aFilename,aSourceName,aResourceName)
|
||||
+'end.'+LE
|
||||
+LE;
|
||||
end;
|
||||
@ -863,14 +863,14 @@ begin
|
||||
Result:='Classes, SysUtils';
|
||||
end;
|
||||
|
||||
function TFileDescPascalUnit.GetInterfaceSource(const Filename, SourceName,
|
||||
ResourceName: string): string;
|
||||
function TFileDescPascalUnit.GetInterfaceSource(const aFilename, aSourceName,
|
||||
aResourceName: string): string;
|
||||
begin
|
||||
Result:='';
|
||||
end;
|
||||
|
||||
function TFileDescPascalUnit.GetImplementationSource(const Filename,
|
||||
SourceName, ResourceName: string): string;
|
||||
function TFileDescPascalUnit.GetImplementationSource(const aFilename,
|
||||
aSourceName, aResourceName: string): string;
|
||||
begin
|
||||
Result:='';
|
||||
end;
|
||||
|
@ -25,8 +25,8 @@ type
|
||||
public
|
||||
constructor Create; virtual;
|
||||
|
||||
procedure DoAfterBuild(AResources: TAbstractProjectResources; AReason: TCompileReason; SaveToTestDir: boolean); virtual;
|
||||
procedure DoBeforeBuild(AResources: TAbstractProjectResources; AReason: TCompileReason; SaveToTestDir: boolean); virtual;
|
||||
procedure DoAfterBuild({%H-}AResources: TAbstractProjectResources; {%H-}AReason: TCompileReason; {%H-}SaveToTestDir: boolean); virtual;
|
||||
procedure DoBeforeBuild({%H-}AResources: TAbstractProjectResources; {%H-}AReason: TCompileReason; {%H-}SaveToTestDir: boolean); virtual;
|
||||
function UpdateResources(AResources: TAbstractProjectResources; const MainFilename: string): Boolean; virtual; abstract;
|
||||
procedure WriteToProjectFile(AConfig: {TXMLConfig}TObject; Path: String); virtual; abstract;
|
||||
procedure ReadFromProjectFile(AConfig: {TXMLConfig}TObject; Path: String); virtual; abstract;
|
||||
|
@ -85,6 +85,7 @@ begin
|
||||
OldText := Memo.Lines.Text;
|
||||
end;
|
||||
|
||||
NewSortedText:='';
|
||||
if ShowSortSelectionDialogFunc(OldText, nil, NewSortedText) <> mrOk then Exit;
|
||||
if SortOnlySelection then
|
||||
Memo.SelText := NewSortedText
|
||||
|
@ -892,7 +892,7 @@ end;
|
||||
procedure TComponentPalette.RegisterCustomIDEComponents(
|
||||
const RegisterProc: RegisterUnitComponentProc);
|
||||
begin
|
||||
inherited RegisterCustomIDEComponents(RegisterProc);
|
||||
//inherited RegisterCustomIDEComponents(RegisterProc);
|
||||
{$IFDEF CustomIDEComps}
|
||||
CustomIDEComps.RegisterCustomComponents(RegisterProc);
|
||||
{$ENDIF}
|
||||
|
@ -1,24 +1,24 @@
|
||||
object CompPaletteOptionsFrame: TCompPaletteOptionsFrame
|
||||
Left = 0
|
||||
Height = 458
|
||||
Height = 411
|
||||
Top = 0
|
||||
Width = 814
|
||||
ClientHeight = 458
|
||||
ClientWidth = 814
|
||||
Width = 511
|
||||
ClientHeight = 411
|
||||
ClientWidth = 511
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
DesignLeft = 309
|
||||
DesignTop = 530
|
||||
DesignLeft = 520
|
||||
DesignTop = 374
|
||||
object PagesGroupBox: TGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 458
|
||||
Height = 411
|
||||
Top = 0
|
||||
Width = 227
|
||||
Align = alLeft
|
||||
Anchors = []
|
||||
Caption = 'PagesGroupBox'
|
||||
ClientHeight = 439
|
||||
ClientHeight = 394
|
||||
ClientWidth = 223
|
||||
TabOrder = 0
|
||||
object PagesListBox: TListBox
|
||||
@ -27,7 +27,7 @@ object CompPaletteOptionsFrame: TCompPaletteOptionsFrame
|
||||
AnchorSideRight.Control = PageMoveUpBtn
|
||||
AnchorSideBottom.Control = AddPageButton
|
||||
Left = 1
|
||||
Height = 400
|
||||
Height = 354
|
||||
Top = 1
|
||||
Width = 188
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
@ -39,7 +39,9 @@ object CompPaletteOptionsFrame: TCompPaletteOptionsFrame
|
||||
OnDragOver = PagesListBoxDragOver
|
||||
OnKeyDown = PagesListBoxKeyDown
|
||||
OnSelectionChange = PagesListBoxSelectionChange
|
||||
ScrollWidth = 186
|
||||
TabOrder = 0
|
||||
TopIndex = -1
|
||||
end
|
||||
object AddPageButton: TBitBtn
|
||||
AnchorSideLeft.Control = PagesListBox
|
||||
@ -47,9 +49,9 @@ object CompPaletteOptionsFrame: TCompPaletteOptionsFrame
|
||||
AnchorSideBottom.Control = PagesGroupBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 1
|
||||
Height = 26
|
||||
Top = 407
|
||||
Width = 54
|
||||
Height = 27
|
||||
Top = 361
|
||||
Width = 46
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
@ -63,10 +65,10 @@ object CompPaletteOptionsFrame: TCompPaletteOptionsFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = AddPageButton
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 64
|
||||
Height = 26
|
||||
Top = 407
|
||||
Width = 110
|
||||
Left = 56
|
||||
Height = 27
|
||||
Top = 361
|
||||
Width = 99
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 9
|
||||
BorderSpacing.Bottom = 6
|
||||
@ -107,14 +109,14 @@ object CompPaletteOptionsFrame: TCompPaletteOptionsFrame
|
||||
end
|
||||
object ComponentsGroupBox: TGroupBox
|
||||
Left = 232
|
||||
Height = 458
|
||||
Height = 411
|
||||
Top = 0
|
||||
Width = 582
|
||||
Width = 279
|
||||
Align = alClient
|
||||
Anchors = []
|
||||
Caption = 'ComponentsGroupBox'
|
||||
ClientHeight = 439
|
||||
ClientWidth = 578
|
||||
ClientHeight = 394
|
||||
ClientWidth = 275
|
||||
TabOrder = 1
|
||||
object ComponentsListView: TListView
|
||||
AnchorSideLeft.Control = ComponentsGroupBox
|
||||
@ -123,9 +125,9 @@ object CompPaletteOptionsFrame: TCompPaletteOptionsFrame
|
||||
AnchorSideBottom.Control = ComponentsGroupBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 1
|
||||
Height = 437
|
||||
Height = 392
|
||||
Top = 1
|
||||
Width = 543
|
||||
Width = 240
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Right = 5
|
||||
BorderSpacing.Around = 1
|
||||
@ -171,7 +173,7 @@ object CompPaletteOptionsFrame: TCompPaletteOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ComponentsGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 550
|
||||
Left = 247
|
||||
Height = 26
|
||||
Top = 102
|
||||
Width = 22
|
||||
@ -186,7 +188,7 @@ object CompPaletteOptionsFrame: TCompPaletteOptionsFrame
|
||||
AnchorSideLeft.Control = CompMoveUpBtn
|
||||
AnchorSideTop.Control = CompMoveUpBtn
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 550
|
||||
Left = 247
|
||||
Height = 26
|
||||
Top = 135
|
||||
Width = 22
|
||||
@ -199,7 +201,7 @@ object CompPaletteOptionsFrame: TCompPaletteOptionsFrame
|
||||
end
|
||||
object Splitter1: TSplitter
|
||||
Left = 227
|
||||
Height = 458
|
||||
Height = 411
|
||||
Top = 0
|
||||
Width = 5
|
||||
Anchors = [akLeft]
|
||||
|
Loading…
Reference in New Issue
Block a user