added new ... dialog

git-svn-id: trunk@3885 -
This commit is contained in:
mattias 2003-02-28 19:10:25 +00:00
parent e105af18d2
commit 55408cc264
7 changed files with 39 additions and 45 deletions

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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