From 55408cc26442622c3bcd03bead45ac11d32cc8cb Mon Sep 17 00:00:00 2001 From: mattias Date: Fri, 28 Feb 2003 19:10:25 +0000 Subject: [PATCH] added new ... dialog git-svn-id: trunk@3885 - --- debugger/debugger.pp | 13 ++++++++++--- ide/editoroptions.pp | 29 ----------------------------- ide/mainbar.pas | 14 +++++++------- ide/project.pp | 6 +++++- ide/viewunit_dlg.lfm | 7 ++++--- ide/viewunit_dlg.pp | 6 +++++- lcl/include/customlabel.inc | 9 ++++++++- 7 files changed, 39 insertions(+), 45 deletions(-) diff --git a/debugger/debugger.pp b/debugger/debugger.pp index 42c7f4ac9c..efe3a019e6 100644 --- a/debugger/debugger.pp +++ b/debugger/debugger.pp @@ -150,7 +150,9 @@ type end; TDBGBreakPoints = class; - TDBGBreakPointsEvent = procedure(const ASender: TDBGBreakPoints; const ABreakpoint: TDBGBreakPoint) of object; + TDBGBreakPointsEvent = + procedure(const ASender: TDBGBreakPoints; + const ABreakpoint: TDBGBreakPoint) of object; TDBGBreakPointsNotification = class(TDebuggerNotification) private FOnAdd: TDBGBreakPointsEvent; @@ -213,7 +215,8 @@ type protected public constructor Create; - property Items[const AnIndex: Integer]: TDBGBreakPointGroup read GetItem write SetItem; default; + property Items[const AnIndex: Integer]: TDBGBreakPointGroup + read GetItem write SetItem; default; end; TDBGWatchClass = class of TDBGWatch; @@ -243,7 +246,8 @@ type end; TDBGWatches = class; - TDBGWatchesEvent = procedure(const ASender: TDBGWatches; const AWatch: TDBGWatch) of object; + TDBGWatchesEvent = + procedure(const ASender: TDBGWatches; const AWatch: TDBGWatch) of object; TDBGWatchesNotification = class(TDebuggerNotification) private FOnAdd: TDBGWatchesEvent; @@ -1471,6 +1475,9 @@ end; end. { ============================================================================= $Log$ + Revision 1.17 2003/02/28 19:10:25 mattias + added new ... dialog + Revision 1.16 2002/08/28 10:44:44 lazarus MG: implemented run param environment variables diff --git a/ide/editoroptions.pp b/ide/editoroptions.pp index c95de85efb..edc22c8882 100644 --- a/ide/editoroptions.pp +++ b/ide/editoroptions.pp @@ -38,34 +38,21 @@ unit EditorOptions; interface -{$define NEW_EDITOR_SYNEDIT} - uses LCLLinux, LCLType, Forms, Classes, SysUtils, ComCtrls, Buttons, StdCtrls, ExtCtrls, LazConf, FileCtrl, GraphType, Graphics, Controls, Dialogs, LResources, IDEProcs, -{$ifdef NEW_EDITOR_SYNEDIT} SynEdit, SynEditHighlighter, SynEditAutoComplete, SynEditKeyCmds, SynHighlighterPas, SynHighlighterHTML, SynHighlighterCPP, SynHighlighterXML, SynHighlighterLFM, SynHighlighterPerl, SynHighlighterJava, -{$else} - mwCustomEdit, mwPasSyn, mwHighlighter, -{$endif} Laz_XMLCfg, CodeTemplateDialog, KeyMapping, InputHistory, IDEOptionDefs, LazarusIDEStrConsts; type -{$ifdef NEW_EDITOR_SYNEDIT} TPreviewEditor = TSynEdit; TPreviewPasSyn = TSynPasSyn; TCustomSyn = TSynCustomHighlighter; TSynHighlightElement = TSynHighlighterAttributes; -{$else} - TPreviewEditor = TmwCustomEdit; - TPreviewPasSyn = TmwPasSyn; - TCustomSyn = TmwCustomHighlighter; - TSynHighlightElement = TmwHighlightAttributes; -{$endif} TCustomSynClass = class of TCustomSyn; TLazSyntaxHighlighter = @@ -2177,7 +2164,6 @@ var a:integer; // GeneralCheckBoxOnClick begin if FormCreating then exit; - {$IFDEF NEW_EDITOR_SYNEDIT} // general SetOption(AltSetsColumnModeCheckBox,eoAltSetsColumnMode); SetOption(AutoIndentCheckBox,eoAutoIndent); @@ -2196,13 +2182,9 @@ begin SetOption(SmartTabsCheckBox,eoSmartTabs); SetOption(TabsToSpacesCheckBox,eoTabsToSpaces); SetOption(TrimTrailingSpacesCheckBox,eoTrimTrailingSpaces); - {$ELSE} - - {$ENDIF} for a:=Low(PreviewEdits) to High(PreviewEdits) do begin if PreviewEdits[a]<>nil then begin - {$IFDEF NEW_EDITOR_SYNEDIT} // general if Sender=UseSyntaxHighlightCheckBox then if UseSyntaxHighlightCheckBox.Checked then @@ -2213,9 +2195,6 @@ begin if (a in [1,2]) then PreviewEdits[a].Gutter.Visible:=VisibleGutterCheckBox.Checked; PreviewEdits[a].Gutter.ShowLineNumbers:=ShowLineNumbersCheckBox.Checked; - {$ELSE} - - {$ENDIF} end; end; if CurHighlightElement<>nil then begin @@ -2308,24 +2287,16 @@ begin if Sender=GutterColorButton then begin for a:=Low(PreviewEdits) to High(PreviewEdits) do begin if PreviewEdits[a]<>nil then begin - {$IFDEF NEW_EDITOR_SYNEDIT} PreviewEdits[a].Gutter.Color:=GutterColorButton.ButtonColor; PreviewEdits[a].Invalidate; - {$ELSE} - PreviewEdits[a].GutterColor:=GutterColorButton.ButtonColor; - {$ENDIF} end; end; end; if Sender=RightMarginColorButton then begin for a:=Low(PreviewEdits) to High(PreviewEdits) do begin if PreviewEdits[a]<>nil then begin - {$IFDEF NEW_EDITOR_SYNEDIT} PreviewEdits[a].RightEdgeColor:=RightMarginColorButton.ButtonColor; PreviewEdits[a].Invalidate; - {$ELSE} - - {$ENDIF} end; end; end; diff --git a/ide/mainbar.pas b/ide/mainbar.pas index 2f278ab5d9..7d6ba44f2e 100644 --- a/ide/mainbar.pas +++ b/ide/mainbar.pas @@ -217,7 +217,7 @@ type itmGotoIncludeDirective: TMenuItem; itmViewInspector: TMenuItem; - itmViewProject: TMenuItem; + itmViewProjectExplorer: TMenuItem; itmViewUnits : TMenuItem; itmViewCodeExplorer : TMenuItem; itmViewForms : TMenuItem; @@ -427,7 +427,6 @@ begin itmFileNewOther.Name:='itmFileNewOther'; itmFileNewOther.Caption := lisMenuNewOther; itmFileNewOther.Graphic:=LoadPixmap('menu_new'); - itmFileNewOther.Enabled:=false; mnuFile.Add(itmFileNewOther); mnuFile.Add(CreateMenuSeparator); @@ -797,10 +796,11 @@ begin itmViewInspector.Caption := lisMenuViewObjectInspector; mnuView.Add(itmViewInspector); - itmViewProject := TMenuItem.Create(Self); - itmViewProject.Name:='itmViewProject'; - itmViewProject.Caption := lisMenuViewProjectExplorer; - mnuView.Add(itmViewProject); + itmViewProjectExplorer := TMenuItem.Create(Self); + itmViewProjectExplorer.Name:='itmViewProject'; + itmViewProjectExplorer.Caption := lisMenuViewProjectExplorer; + itmViewProjectExplorer.Enabled := false; + mnuView.Add(itmViewProjectExplorer); mnuView.Add(CreateMenuSeparator); @@ -1169,7 +1169,7 @@ begin itmGotoIncludeDirective.ShortCut:=CommandToShortCut(ecGotoIncludeDirective); itmViewInspector.ShortCut:=CommandToShortCut(ecToggleObjectInsp); - itmViewProject.ShortCut:=CommandToShortCut(ecToggleProjectExpl); + itmViewProjectExplorer.ShortCut:=CommandToShortCut(ecToggleProjectExpl); itmViewUnits.ShortCut:=CommandToShortCut(ecViewUnits); itmViewCodeExplorer.ShortCut:=CommandToShortCut(ecToggleCodeExpl); itmViewUnitDependencies.ShortCut:=CommandToShortCut(ecViewUnitDependencies); diff --git a/ide/project.pp b/ide/project.pp index b0d49d7b78..ce427b0594 100644 --- a/ide/project.pp +++ b/ide/project.pp @@ -68,6 +68,7 @@ type nuEmpty, // no code nuUnit, // unit nuForm, // unit with form + nuText, nuCustomProgram // program ); @@ -412,7 +413,7 @@ const ); UnitTypeDefaultExt: array[TNewUnitType] of string = ( - '.pas', '.pas', '.pas', '.pas' + '.pas', '.pas', '.pas', '.txt', '.pas' ); DefaultTargetFileExt : string = {$IFDEF win32}'.exe'{$ELSE}''{$ENDIF}; @@ -2240,6 +2241,9 @@ end. { $Log$ + Revision 1.94 2003/02/28 19:10:25 mattias + added new ... dialog + Revision 1.93 2003/02/28 15:38:00 mattias bookmarks are now saved also for closed files and merged when possible diff --git a/ide/viewunit_dlg.lfm b/ide/viewunit_dlg.lfm index fbf6225900..4ce662194c 100644 --- a/ide/viewunit_dlg.lfm +++ b/ide/viewunit_dlg.lfm @@ -1,9 +1,10 @@ object VIEWUNITS1: TVIEWUNITS1 CAPTION = 'View Project Units' - COLOR = -2147483633 CLIENTHEIGHT = 200 CLIENTWIDTH = 325 POSITION = poscreencenter + HORZSCROLLBAR.PAGE = 326 + VERTSCROLLBAR.PAGE = 201 LEFT = 477 HEIGHT = 200 TOP = 412 @@ -38,9 +39,9 @@ object VIEWUNITS1: TVIEWUNITS1 end object Listbox1: TLISTBOX ANCHORS = [aktop, akleft] - BORDERSTYLE = bssingle - TABORDER = 3 ONCLICK = LISTBOX1CLICK + TABORDER = 3 + TOPINDEX = -1 LEFT = 10 HEIGHT = 145 TOP = 45 diff --git a/ide/viewunit_dlg.pp b/ide/viewunit_dlg.pp index d1710d2cbb..0f62212ea4 100644 --- a/ide/viewunit_dlg.pp +++ b/ide/viewunit_dlg.pp @@ -116,7 +116,8 @@ end; { TViewUnits } constructor TViewUnits.Create(AOwner: TComponent); -var Pad : Integer; +var + Pad : Integer; begin inherited Create(AOwner); @@ -246,6 +247,9 @@ initialization end. { $Log$ + Revision 1.14 2003/02/28 19:10:25 mattias + added new ... dialog + Revision 1.13 2002/10/14 08:27:37 lazarus MG: view units/forms dialog size is now saved diff --git a/lcl/include/customlabel.inc b/lcl/include/customlabel.inc index 9a9e418c1b..1a5ad6ad28 100644 --- a/lcl/include/customlabel.inc +++ b/lcl/include/customlabel.inc @@ -46,6 +46,10 @@ begin Result := Caption; end; +{------------------------------------------------------------------------------ + procedure TCustomLabel.Notification(AComponent : TComponent; + Operation : TOperation); + ------------------------------------------------------------------------------} procedure TCustomLabel.Notification(AComponent : TComponent; Operation : TOperation); begin inherited Notification(AComponent, Operation); @@ -75,7 +79,7 @@ var R : TRect; DC : hDC; begin - If AutoSizing or not AutoSize then + If AutoSizing or (not AutoSize) or (Caption='') then Exit; if (not HandleAllocated) or (csLoading in ComponentState) then exit; AutoSizing := True; @@ -170,6 +174,9 @@ end; { ============================================================================= $Log$ + Revision 1.9 2003/02/28 19:10:25 mattias + added new ... dialog + Revision 1.8 2002/10/16 17:06:33 lazarus MG: fixed handle allocating in TLabel