educationlaz: added options to control shown speedbuttons on IDE bar, and objectinspector pages, from Michael Kuhardt

git-svn-id: trunk@24748 -
This commit is contained in:
mattias 2010-04-20 17:29:32 +00:00
parent 9a52809123
commit 458cb4762c
20 changed files with 412 additions and 104 deletions

3
.gitattributes vendored
View File

@ -725,6 +725,8 @@ components/education/edumenu.pas svneol=native#text/plain
components/education/edunewprogram.lfm svneol=native#text/plain components/education/edunewprogram.lfm svneol=native#text/plain
components/education/edunewprogram.lrs svneol=native#text/plain components/education/edunewprogram.lrs svneol=native#text/plain
components/education/edunewprogram.pas svneol=native#text/plain components/education/edunewprogram.pas svneol=native#text/plain
components/education/eduoipages.lfm svneol=native#text/plain
components/education/eduoipages.pas svneol=native#text/plain
components/education/eduoptions.pas svneol=native#text/plain components/education/eduoptions.pas svneol=native#text/plain
components/education/eduoptionsdlg.lfm svneol=native#text/plain components/education/eduoptionsdlg.lfm svneol=native#text/plain
components/education/eduoptionsdlg.lrs svneol=native#text/plain components/education/eduoptionsdlg.lrs svneol=native#text/plain
@ -735,6 +737,7 @@ components/education/edupkgsystem.pas svneol=native#text/plain
components/education/edupropsevents.lfm svneol=native#text/plain components/education/edupropsevents.lfm svneol=native#text/plain
components/education/edupropsevents.lrs svneol=native#text/plain components/education/edupropsevents.lrs svneol=native#text/plain
components/education/edupropsevents.pas svneol=native#text/plain components/education/edupropsevents.pas svneol=native#text/plain
components/education/eduspeedbuttons.lfm svneol=native#text/plain
components/externhelp/README.txt svneol=native#text/plain components/externhelp/README.txt svneol=native#text/plain
components/externhelp/externhelp.lpk svneol=native#text/plain components/externhelp/externhelp.lpk svneol=native#text/plain
components/externhelp/externhelp.pas svneol=native#text/plain components/externhelp/externhelp.pas svneol=native#text/plain

View File

@ -15,7 +15,7 @@
<Description Value="IDE package for training, courses and education."/> <Description Value="IDE package for training, courses and education."/>
<License Value="LGPL-2 or any later"/> <License Value="LGPL-2 or any later"/>
<Version Major="1" Release="1"/> <Version Major="1" Release="1"/>
<Files Count="8"> <Files Count="15">
<Item1> <Item1>
<Filename Value="eduenvoptsframe.pas"/> <Filename Value="eduenvoptsframe.pas"/>
<HasRegisterProc Value="True"/> <HasRegisterProc Value="True"/>
@ -54,6 +54,37 @@
<HasRegisterProc Value="True"/> <HasRegisterProc Value="True"/>
<UnitName Value="EduPropsEvents"/> <UnitName Value="EduPropsEvents"/>
</Item8> </Item8>
<Item9>
<Filename Value="eduoipages.lfm"/>
<Type Value="LFM"/>
</Item9>
<Item10>
<Filename Value="eduoipages.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="EduOIPages"/>
</Item10>
<Item11>
<Filename Value="eduoptionsdlg.lfm"/>
<Type Value="LFM"/>
</Item11>
<Item12>
<Filename Value="eduoptionsdlg.lrs"/>
<Type Value="LRS"/>
</Item12>
<Item13>
<Filename Value="eduoptionsdlg.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="EduOptionsDlg"/>
</Item13>
<Item14>
<Filename Value="eduspeedbuttons.lfm"/>
<Type Value="LFM"/>
</Item14>
<Item15>
<Filename Value="eduspeedbuttons.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="EduSpeedButtons"/>
</Item15>
</Files> </Files>
<i18n> <i18n>
<EnableI18N Value="True"/> <EnableI18N Value="True"/>

View File

@ -1,4 +1,4 @@
{ This file was automatically created by Lazarus. do not edit! { This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package. This source is only used to compile and install the package.
} }
@ -8,7 +8,8 @@ interface
uses uses
EduEnvOptsFrame, EduOptions, EduPkgSystem, EduCompPalette, EduMenu, EduEnvOptsFrame, EduOptions, EduPkgSystem, EduCompPalette, EduMenu,
EduNewProgram, EduPropsEvents, LazarusPackageIntf; EduNewProgram, EduPropsEvents, EduOIPages, EduOptionsDlg, EduSpeedButtons,
LazarusPackageIntf;
implementation implementation
@ -20,6 +21,9 @@ begin
RegisterUnit('EduMenu', @EduMenu.Register); RegisterUnit('EduMenu', @EduMenu.Register);
RegisterUnit('EduNewProgram', @EduNewProgram.Register); RegisterUnit('EduNewProgram', @EduNewProgram.Register);
RegisterUnit('EduPropsEvents', @EduPropsEvents.Register); RegisterUnit('EduPropsEvents', @EduPropsEvents.Register);
RegisterUnit('EduOIPages', @EduOIPages.Register);
RegisterUnit('EduOptionsDlg', @EduOptionsDlg.Register);
RegisterUnit('EduSpeedButtons', @EduSpeedButtons.Register);
end; end;
initialization initialization

View File

@ -5,8 +5,8 @@ inherited EduCompPaletteFrame: TEduCompPaletteFrame
ClientWidth = 480 ClientWidth = 480
OnClick = FrameClick OnClick = FrameClick
TabOrder = 0 TabOrder = 0
DesignLeft = 906 DesignLeft = 286
DesignTop = 133 DesignTop = 126
object ComponentsGroupBox: TGroupBox[0] object ComponentsGroupBox: TGroupBox[0]
AnchorSideTop.Control = Owner AnchorSideTop.Control = Owner
AnchorSideBottom.Control = Owner AnchorSideBottom.Control = Owner

View File

@ -90,7 +90,8 @@ procedure Register;
begin begin
EduComponentPaletteOptions:=TEduComponentPaletteOptions.Create; EduComponentPaletteOptions:=TEduComponentPaletteOptions.Create;
EducationOptions.Root.Add(EduComponentPaletteOptions); EducationOptions.Root.Add(EduComponentPaletteOptions);
RegisterIDEOptionsEditor(EduOptionID,TEduCompPaletteFrame,EduOptionCompPaletteID); EduOptionCompPaletteID:=RegisterIDEOptionsEditor(EduOptionID,
TEduCompPaletteFrame,EduOptionCompPaletteID)^.Index;
end; end;
{ TEduCompPaletteFrame } { TEduCompPaletteFrame }
@ -343,7 +344,7 @@ end;
class function TEduCompPaletteFrame.SupportedOptionsClass: TAbstractIDEOptionsClass; class function TEduCompPaletteFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
begin begin
Result:=TEduOptions; Result:=EducationIDEOptionsClass;
end; end;
procedure TEduCompPaletteFrame.WriteSettings(AOptions: TAbstractIDEOptions); procedure TEduCompPaletteFrame.WriteSettings(AOptions: TAbstractIDEOptions);
@ -434,8 +435,6 @@ begin
end; end;
end; end;
initialization {$R *.lfm}
{$I educomppalette.lrs}
end. end.

View File

@ -72,8 +72,9 @@ procedure Register;
begin begin
EduGeneralOptions:=TEduGeneralOptions.Create; EduGeneralOptions:=TEduGeneralOptions.Create;
EducationOptions.Root.Add(EduGeneralOptions); EducationOptions.Root.Add(EduGeneralOptions);
RegisterIDEOptionsGroup(EduOptionID,TEduOptions); EduOptionID:=RegisterIDEOptionsGroup(EduOptionID,TEduOptions)^.Index;
RegisterIDEOptionsEditor(EduOptionID,TEduEnvFrame,EduOptionGeneralID); EduOptionGeneralID:=RegisterIDEOptionsEditor(EduOptionID,TEduEnvFrame,
EduOptionGeneralID)^.Index;
LazarusIDE.AddHandlerOnProjectOpened(@EducationOptions.OnProjectOpened); LazarusIDE.AddHandlerOnProjectOpened(@EducationOptions.OnProjectOpened);
end; end;
@ -109,11 +110,13 @@ end;
procedure TEduEnvFrame.ReadSettings(AOptions: TAbstractIDEOptions); procedure TEduEnvFrame.ReadSettings(AOptions: TAbstractIDEOptions);
begin begin
EnableCheckBox.Checked:=EducationOptions.Enabled; EnableCheckBox.Checked:=EducationOptions.Enabled;
//OnLoadIDEOptions(Self,EducationOptions);
end; end;
procedure TEduEnvFrame.WriteSettings(AOptions: TAbstractIDEOptions); procedure TEduEnvFrame.WriteSettings(AOptions: TAbstractIDEOptions);
begin begin
EducationOptions.Enabled:=EnableCheckBox.Checked; EducationOptions.Enabled:=EnableCheckBox.Checked;
//OnSaveIDEOptions(Self,EducationOptions);
if EducationOptions.Save<>mrOk then if EducationOptions.Save<>mrOk then
DebugLn(['TEduEnvFrame.WriteSettings Failed']); DebugLn(['TEduEnvFrame.WriteSettings Failed']);
EducationOptions.Apply; EducationOptions.Apply;
@ -121,7 +124,7 @@ end;
class function TEduEnvFrame.SupportedOptionsClass: TAbstractIDEOptionsClass; class function TEduEnvFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
begin begin
Result := nil; Result := EducationIDEOptionsClass;
end; end;
{ TEduGeneralOptions } { TEduGeneralOptions }
@ -148,8 +151,6 @@ begin
Result:=inherited Save(Config); Result:=inherited Save(Config);
end; end;
initialization {$R *.lfm}
{$I eduenvoptsframe.lrs}
end. end.

View File

@ -93,7 +93,8 @@ procedure Register;
begin begin
EduMenuOptions:=TEduMenuOptions.Create; EduMenuOptions:=TEduMenuOptions.Create;
EducationOptions.Root.Add(EduMenuOptions); EducationOptions.Root.Add(EduMenuOptions);
RegisterIDEOptionsEditor(EduOptionID,TEduMenuFrame,EduOptionMenuID); EduOptionMenuID:=RegisterIDEOptionsEditor(EduOptionID,TEduMenuFrame,
EduOptionMenuID)^.Index;
end; end;
{ TEduMenuFrame } { TEduMenuFrame }
@ -309,7 +310,7 @@ end;
class function TEduMenuFrame.SupportedOptionsClass: TAbstractIDEOptionsClass; class function TEduMenuFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
begin begin
Result:=TEduOptions; Result:=EducationIDEOptionsClass;
end; end;
procedure TEduMenuFrame.WriteSettings(AOptions: TAbstractIDEOptions); procedure TEduMenuFrame.WriteSettings(AOptions: TAbstractIDEOptions);
@ -439,8 +440,6 @@ begin
ApplyRecursive(IDEMenuRoots[i]); ApplyRecursive(IDEMenuRoots[i]);
end; end;
initialization {$R *.lfm}
{$I edumenu.lrs}
end. end.

View File

@ -4,8 +4,8 @@ inherited EduNewPrgFrame: TEduNewPrgFrame
ClientHeight = 320 ClientHeight = 320
ClientWidth = 453 ClientWidth = 453
TabOrder = 0 TabOrder = 0
DesignLeft = 795 DesignLeft = 539
DesignTop = 54 DesignTop = 23
object SrcGroupBox: TGroupBox[0] object SrcGroupBox: TGroupBox[0]
Left = 6 Left = 6
Height = 262 Height = 262
@ -30,7 +30,6 @@ inherited EduNewPrgFrame: TEduNewPrgFrame
ParentColor = False ParentColor = False
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
BookMarkOptions.OnChange = nil
Gutter.Width = 61 Gutter.Width = 61
Gutter.MouseActions = < Gutter.MouseActions = <
item item

View File

@ -127,7 +127,8 @@ procedure Register;
begin begin
EduNewPrgOptions:=TEduNewPrgOptions.Create; EduNewPrgOptions:=TEduNewPrgOptions.Create;
EducationOptions.Root.Add(EduNewPrgOptions); EducationOptions.Root.Add(EduNewPrgOptions);
RegisterIDEOptionsEditor(EduOptionID,TEduNewPrgFrame,EduOptionNewPrgID); EduOptionNewPrgID:=RegisterIDEOptionsEditor(EduOptionID,TEduNewPrgFrame,
EduOptionNewPrgID)^.Index;
FileDescSingleFileProgram:=TFileDescSingleFileProgram.Create; FileDescSingleFileProgram:=TFileDescSingleFileProgram.Create;
RegisterProjectFileDescriptor(FileDescSingleFileProgram,FileDescGroupName); RegisterProjectFileDescriptor(FileDescSingleFileProgram,FileDescGroupName);
@ -317,7 +318,7 @@ end;
class function TEduNewPrgFrame.SupportedOptionsClass: TAbstractIDEOptionsClass; class function TEduNewPrgFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
begin begin
Result:=TEduOptions; Result:=EducationIDEOptionsClass;
end; end;
procedure TEduNewPrgFrame.WriteSettings(AOptions: TAbstractIDEOptions); procedure TEduNewPrgFrame.WriteSettings(AOptions: TAbstractIDEOptions);
@ -363,8 +364,6 @@ begin
Result:=ersASimpleProgramOnlyOneFileIsCreatedAndAddedToTheCur; Result:=ersASimpleProgramOnlyOneFileIsCreatedAndAddedToTheCur;
end; end;
initialization {$R *.lfm}
{$I edunewprogram.lrs}
end. end.

View File

@ -0,0 +1,48 @@
inherited EduOIPagesFrame: TEduOIPagesFrame
Height = 393
Width = 456
ClientHeight = 393
ClientWidth = 456
TabOrder = 0
DesignLeft = 792
DesignTop = 2
object OptsPanel: TPanel[0]
Left = 8
Height = 152
Top = 8
Width = 440
Align = alCustom
ChildSizing.Layout = cclTopToBottomThenLeftToRight
ChildSizing.ControlsPerLine = 2
ClientHeight = 152
ClientWidth = 440
TabOrder = 0
object grpBoxOIPages: TGroupBox
Left = 40
Height = 96
Top = 16
Width = 272
Align = alCustom
Caption = 'grpBoxOIPages'
ClientHeight = 78
ClientWidth = 268
TabOrder = 0
object ckBoxFavs: TCheckBox
Left = 22
Height = 17
Top = 16
Width = 71
Caption = 'ckBoxFavs'
TabOrder = 0
end
object ckBoxRestricted: TCheckBox
Left = 22
Height = 17
Top = 48
Width = 97
Caption = 'ckBoxRestricted'
TabOrder = 1
end
end
end
end

View File

@ -0,0 +1,159 @@
{
*****************************************************************************
* *
* This file is part of the EducationLaz package *
* *
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
* for details about the copyright. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* *
*****************************************************************************
Author: Michael Kuhardt
Abstract:
Frame to setup pages for ObjectInspector
}
unit EduOIPages;
{$mode objfpc}{$H+}
interface
uses
Classes, LResources, Forms, StdCtrls, ExtCtrls, LazConfigStorage, IDEOptionsIntf, EduOptions,
ObjectInspector, ObjInspStrConsts;
type
{ TEduPropsEventsOptions }
TEduOIPagesOptions = class(TEduOptionsNode)
private
FOIPageFavs: boolean;
FOIPageRestricted: boolean;
public
constructor Create; override;
destructor Destroy; override;
function Load(Config: TConfigStorage): TModalResult; override;
function Save(Config: TConfigStorage): TModalResult; override;
procedure Apply(Enable: boolean); override;
property OIPageFavs: boolean read FOIPageFavs write FOIPageFavs;
property OIPageRestricted: boolean read FOIPageRestricted write FOIPageRestricted;
end;
{ TEduOIPagesFrame }
TEduOIPagesFrame = class(TAbstractIDEOptionsEditor)
ckBoxRestricted: TCheckBox;
ckBoxFavs: TCheckBox;
grpBoxOIPages: TGroupBox;
OptsPanel: TPanel;
public
function GetTitle: String; override;
procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
procedure WriteSettings(AOptions: TAbstractIDEOptions); override;
end;
var
EduOIPagesOptions: TEduOIPagesOptions = nil;
procedure Register;
implementation
procedure Register;
begin
EduOIPagesOptions:=TEduOIPagesOptions.Create;
EducationOptions.Root.Add(EduOIPagesOptions);
EduOIPagesOptionsID:=RegisterIDEOptionsEditor(EduOptionID,TEduOIPagesFrame,
EduOIPagesOptionsID)^.Index;
end;
{ TEduOIPagesOptions }
constructor TEduOIPagesOptions.Create;
begin
inherited Create;
Name:='OIPages';
FOIPageFavs:=false;
FOIPageRestricted:=false;
end;
destructor TEduOIPagesOptions.Destroy;
begin
inherited Destroy;
end;
function TEduOIPagesOptions.Load(Config: TConfigStorage): TModalResult;
begin
FOIPageFavs:=Config.GetValue('OIPageFavs',true);
FOIPageRestricted:=Config.GetValue('OIPageRestricted',true);
Result:=inherited Load(Config);
end;
function TEduOIPagesOptions.Save(Config: TConfigStorage): TModalResult;
begin
Config.SetValue('OIPageFavs',FOIPageFavs);
Config.SetValue('OIPageRestricted',FOIPageRestricted);
Result:=inherited Save(Config);
end;
procedure TEduOIPagesOptions.Apply(Enable: boolean);
begin
inherited Apply(Enable);
end;
{ TEduOIPagesFrame }
function TEduOIPagesFrame.GetTitle: String;
begin
Result:=ersEduOIPages;
end;
procedure TEduOIPagesFrame.ReadSettings(AOptions: TAbstractIDEOptions);
begin
ckBoxFavs.Checked:=EduOIPagesOptions.OIPageFavs;
ckBoxRestricted.Checked:=EduOIPagesOptions.OIPageRestricted;
end;
procedure TEduOIPagesFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
begin
ckBoxFavs.Caption:=oisFavorites;
ckBoxRestricted.Caption:=oisRestricted;
grpBoxOIPages.Caption:=ersShowOIPages;
end;
class function TEduOIPagesFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
begin
Result:=EducationIDEOptionsClass;
end;
procedure TEduOIPagesFrame.WriteSettings(AOptions: TAbstractIDEOptions);
begin
EduOIPagesOptions.OIPageFavs:=ckBoxFavs.Checked;
EduOIPagesOptions.OIPageRestricted:=ckBoxRestricted.Checked;
end;
{$R *.lfm}
end.

View File

@ -68,7 +68,7 @@ resourcestring
ersGrpBoxEventsFull = 'Events: Full Configuration'; ersGrpBoxEventsFull = 'Events: Full Configuration';
ersStTextPropsMin = 'Name, Caption, Visible, Text, Checked, Items, Font, Color, Enabled, Height, Width, MaxLength, Picture, Columns'; ersStTextPropsMin = 'Name, Caption, Visible, Text, Checked, Items, Font, Color, Enabled, Height, Width, MaxLength, Picture, Columns';
ersStTextPropsExt ='Align, Left, Top, Hint, ShowHint, ParentFont, TabOrder, ParentShowHint, WordWrap, FixedCols, FixedRows, DefaultColWidth, DefaultRowHeight, ColCount, RowCount, Borderstyle, Glyph, State, Interval, DataSource, DataField, InitialDir'; ersStTextPropsExt ='Align, Left, Top, Hint, ShowHint, ParentFont, TabOrder, ParentShowHint, WordWrap, FixedCols, FixedRows, DefaultColWidth, DefaultRowHeight, ColCount, RowCount, Borderstyle, Glyph, State, Interval, DataSource, DataField + DB-Properties';
ersStTextPropsFull = 'All Properties available'; ersStTextPropsFull = 'All Properties available';
ersStTextEventsMin = 'OnClick, OnChange, OnMouseMove'; ersStTextEventsMin = 'OnClick, OnChange, OnMouseMove';
@ -83,19 +83,30 @@ resourcestring
ersEduCompPaletteTitle = 'Component palette'; ersEduCompPaletteTitle = 'Component palette';
ersEduNewProgramTitle = 'New program'; ersEduNewProgramTitle = 'New program';
ersEduMenuTitle = 'Menus'; ersEduMenuTitle = 'Menus';
ersEduOIPages = 'Object Inspector';
ersRdBtnFull = 'Show All'; ersRdBtnFull = 'Show All';
ersEnableEduCheckBoxCaption = 'Enable education settings'; ersEnableEduCheckBoxCaption = 'Enable education settings';
ersShowOIPages = 'Show Object Inspector Pages';
ersEduSBTitle = 'Speed Buttons';
ersShowSelection = 'Show Selection';
ersVisibleSpeedButtons = 'Visible SpeedButtons';
const const
DefaultEduOptionsFilename = 'education.xml'; DefaultEduOptionsFilename = 'education.xml';
var
EduOptionID = 2000; EduOptionID: integer = 2000;
EduOptionGeneralID = 100; EduOptionGeneralID: integer = 100;
EduOptionCompPaletteID = 200; EduOptionCompPaletteID: integer = 200;
EduOptionMenuID = 300; EduOptionMenuID: integer = 300;
EduOptionNewPrgID = 400; EduOptionNewPrgID: integer = 400;
EduPropsEventsOptionsID = 500; EduPropsEventsOptionsID: integer = 500;
EduOIPagesOptionsID: integer = 600;
EduSpeedButtonsOptionsID: integer = 700;
type type
@ -174,6 +185,9 @@ type
property NeedLoad: boolean read FNeedLoad write FNeedLoad; property NeedLoad: boolean read FNeedLoad write FNeedLoad;
end; end;
type
EducationIDEOptionsClass = TAbstractIDEEnvironmentOptions;
var var
EducationOptions: TEduOptions = nil; EducationOptions: TEduOptions = nil;
@ -460,4 +474,3 @@ finalization
FreeAndNil(EducationOptions); FreeAndNil(EducationOptions);
end. end.

View File

@ -67,8 +67,6 @@ begin
end; end;
initialization {$R *.lfm}
{$I eduoptionsdlg.lrs}
end. end.

View File

@ -103,7 +103,7 @@ end;
class function TEduPkgSystemFrame.SupportedOptionsClass: TAbstractIDEOptionsClass; class function TEduPkgSystemFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
begin begin
Result:=TEduOptions; Result:=EducationIDEOptionsClass;
end; end;
{ TEduPkgSystemOptions } { TEduPkgSystemOptions }
@ -155,8 +155,6 @@ begin
Result:=inherited Save(Config); Result:=inherited Save(Config);
end; end;
initialization {$R *.lfm}
{$I edupkgsystem.lrs}
end. end.

View File

@ -4,27 +4,26 @@ inherited EduPropsEventsFrame: TEduPropsEventsFrame
ClientHeight = 393 ClientHeight = 393
ClientWidth = 456 ClientWidth = 456
TabOrder = 0 TabOrder = 0
DesignLeft = 415 DesignLeft = 713
DesignTop = 302 DesignTop = 9
object OptsPanel: TPanel[0] object OptsPanel: TPanel[0]
Left = 0 Left = 8
Height = 128 Height = 128
Top = 0 Top = 0
Width = 456 Width = 440
Align = alTop Align = alCustom
ChildSizing.Layout = cclTopToBottomThenLeftToRight ChildSizing.Layout = cclTopToBottomThenLeftToRight
ChildSizing.ControlsPerLine = 2 ChildSizing.ControlsPerLine = 2
ClientHeight = 128 ClientHeight = 128
ClientWidth = 456 ClientWidth = 440
TabOrder = 0 TabOrder = 0
object rdGrpProps: TRadioGroup object rdGrpProps: TRadioGroup
Left = 7 Left = 24
Height = 114 Height = 105
Top = 7 Top = 8
Width = 185 Width = 185
Align = alLeft Align = alCustom
AutoFill = True AutoFill = True
BorderSpacing.Around = 6
Caption = 'rdGrpProps' Caption = 'rdGrpProps'
ChildSizing.LeftRightSpacing = 6 ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6 ChildSizing.TopBottomSpacing = 6
@ -34,7 +33,7 @@ inherited EduPropsEventsFrame: TEduPropsEventsFrame
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 95 ClientHeight = 87
ClientWidth = 181 ClientWidth = 181
OnClick = rdGrpPropsClick OnClick = rdGrpPropsClick
TabOrder = 0 TabOrder = 0
@ -45,9 +44,7 @@ inherited EduPropsEventsFrame: TEduPropsEventsFrame
Width = 165 Width = 165
Align = alCustom Align = alCustom
Caption = 'PropsMinRadioBtn' Caption = 'PropsMinRadioBtn'
Checked = True
OnClick = PropsMinRadioBtnClick OnClick = PropsMinRadioBtnClick
State = cbChecked
TabOrder = 0 TabOrder = 0
TabStop = False TabStop = False
end end
@ -74,13 +71,12 @@ inherited EduPropsEventsFrame: TEduPropsEventsFrame
end end
end end
object rdGrpEvents: TRadioGroup object rdGrpEvents: TRadioGroup
Left = 198 Left = 224
Height = 114 Height = 105
Top = 7 Top = 8
Width = 185 Width = 185
Align = alLeft Align = alCustom
AutoFill = True AutoFill = True
BorderSpacing.Around = 6
Caption = 'rdGrpEvents' Caption = 'rdGrpEvents'
ChildSizing.LeftRightSpacing = 6 ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6 ChildSizing.TopBottomSpacing = 6
@ -90,7 +86,7 @@ inherited EduPropsEventsFrame: TEduPropsEventsFrame
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 95 ClientHeight = 87
ClientWidth = 181 ClientWidth = 181
TabOrder = 1 TabOrder = 1
object EventsMinRadioBtn: TRadioButton object EventsMinRadioBtn: TRadioButton
@ -100,9 +96,7 @@ inherited EduPropsEventsFrame: TEduPropsEventsFrame
Width = 160 Width = 160
Align = alCustom Align = alCustom
Caption = 'EventsMinRadioBtn' Caption = 'EventsMinRadioBtn'
Checked = True
OnClick = EventsMinRadioBtnClick OnClick = EventsMinRadioBtnClick
State = cbChecked
TabOrder = 0 TabOrder = 0
end end
object EventsExtRadioBtn: TRadioButton object EventsExtRadioBtn: TRadioButton
@ -128,50 +122,47 @@ inherited EduPropsEventsFrame: TEduPropsEventsFrame
end end
end end
object grpBoxEvents: TGroupBox[1] object grpBoxEvents: TGroupBox[1]
Left = 0 Left = 32
Height = 65 Height = 65
Top = 256 Top = 288
Width = 456 Width = 392
Align = alTop
Caption = 'grpBoxEvents' Caption = 'grpBoxEvents'
ClientHeight = 46 ClientHeight = 47
ClientWidth = 452 ClientWidth = 388
TabOrder = 1 TabOrder = 1
object stTextEvents: TLabel object stTextEvents: TStaticText
Left = 14 Left = 14
Height = 18 Height = 25
Top = 8 Top = 8
Width = 81 Width = 369
Caption = 'stTextEvents' Caption = 'stTextEvents'
ParentColor = False TabOrder = 0
end end
end end
object grpBoxProps: TGroupBox[2] object grpBoxProps: TGroupBox[2]
Left = 0 Left = 32
Height = 128 Height = 128
Top = 128 Top = 144
Width = 456 Width = 392
Align = alTop
Caption = 'grpBoxProps' Caption = 'grpBoxProps'
ClientHeight = 109 ClientHeight = 110
ClientWidth = 452 ClientWidth = 388
TabOrder = 2 TabOrder = 2
object stTextProps: TLabel object stTextProps: TStaticText
Left = 14 Left = 14
Height = 18 Height = 25
Top = 8 Top = 8
Width = 74 Width = 368
Caption = 'stTextProps' Caption = 'stTextProps'
ParentColor = False TabOrder = 0
end end
object stTextProps2: TLabel object stTextProps2: TStaticText
AnchorSideTop.Side = asrBottom
Left = 14 Left = 14
Height = 18 Height = 64
Top = 40 Top = 40
Width = 82 Width = 368
Caption = 'stTextProps2' Caption = 'stTextProps2'
ParentColor = False TabOrder = 1
end end
end end
end end

View File

@ -73,9 +73,9 @@ type
EventsExtRadioBtn: TRadioButton; EventsExtRadioBtn: TRadioButton;
EventsFullRadioBtn: TRadioButton; EventsFullRadioBtn: TRadioButton;
rdGrpEvents: TRadioGroup; rdGrpEvents: TRadioGroup;
stTextEvents: TLabel; stTextEvents: TStaticText;
stTextProps: TLabel; stTextProps2: TStaticText;
stTextProps2: TLabel; stTextProps: TStaticText;
procedure EventsExtRadioBtnClick(Sender: TObject); procedure EventsExtRadioBtnClick(Sender: TObject);
procedure EventsFullRadioBtnClick(Sender: TObject); procedure EventsFullRadioBtnClick(Sender: TObject);
@ -105,8 +105,8 @@ procedure Register;
begin begin
EduPropsEventsOptions:=TEduPropsEventsOptions.Create; EduPropsEventsOptions:=TEduPropsEventsOptions.Create;
EducationOptions.Root.Add(EduPropsEventsOptions); EducationOptions.Root.Add(EduPropsEventsOptions);
RegisterIDEOptionsEditor(EduOptionID,TEduPropsEventsFrame,EduPropsEventsOptionsID); EduPropsEventsOptionsID:=RegisterIDEOptionsEditor(EduOptionID,
TEduPropsEventsFrame,EduPropsEventsOptionsID)^.Index;
end; end;
{ TEduPropsEventsOptions } { TEduPropsEventsOptions }
@ -168,6 +168,7 @@ end;
{ TEduPropsEventsFrame } { TEduPropsEventsFrame }
procedure TEduPropsEventsFrame.PropsMinRadioBtnClick(Sender: TObject); procedure TEduPropsEventsFrame.PropsMinRadioBtnClick(Sender: TObject);
begin begin
grpBoxProps.Caption:=ersGrpBoxPropsMin; grpBoxProps.Caption:=ersGrpBoxPropsMin;
@ -212,6 +213,8 @@ begin
stTextProps2.Visible:=false; stTextProps2.Visible:=false;
end; end;
function TEduPropsEventsFrame.GetTitle: String; function TEduPropsEventsFrame.GetTitle: String;
begin begin
Result:=ersEduPropsEventsTitle; Result:=ersEduPropsEventsTitle;
@ -244,8 +247,6 @@ begin
EventsExtRadioBtn.Caption:= ersShowExtended; EventsExtRadioBtn.Caption:= ersShowExtended;
EventsFullRadioBtn.Caption:= ersRdBtnFull; EventsFullRadioBtn.Caption:= ersRdBtnFull;
stTextProps2.Caption:=ersStTextPropsExt; stTextProps2.Caption:=ersStTextPropsExt;
stTextProps2.Visible:=false; stTextProps2.Visible:=false;
@ -282,7 +283,7 @@ end;
class function TEduPropsEventsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass; class function TEduPropsEventsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
begin begin
Result:=TEduOptions; Result:=EducationIDEOptionsClass;
end; end;
procedure TEduPropsEventsFrame.WriteSettings(AOptions: TAbstractIDEOptions); procedure TEduPropsEventsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
@ -298,8 +299,6 @@ begin
end; end;
initialization {$R *.lfm}
{$I edupropsevents.lrs}
end. end.

View File

@ -0,0 +1,65 @@
inherited EduSpeedButtonsFrame: TEduSpeedButtonsFrame
Height = 409
Width = 480
ClientHeight = 409
ClientWidth = 480
TabOrder = 0
DesignLeft = 776
DesignTop = 124
object Panel: TPanel[0]
Left = 0
Height = 409
Top = 0
Width = 136
Align = alLeft
ClientHeight = 409
ClientWidth = 136
TabOrder = 1
object ShowSelectionButton: TButton
Left = 16
Height = 23
Top = 136
Width = 100
Caption = 'ShowSelectionButton'
OnClick = ShowSelectionButtonClick
TabOrder = 0
end
object ShowAllButton: TButton
Left = 16
Height = 23
Top = 96
Width = 100
Caption = 'ShowAllButton'
OnClick = ShowAllButtonClick
TabOrder = 1
end
object HideAllButton: TButton
Left = 16
Height = 25
Top = 328
Width = 100
Caption = 'HideAllButton'
OnClick = HideAllButtonClick
TabOrder = 2
end
end
object SpeedButtonsGroupBox: TGroupBox[1]
Left = 144
Height = 392
Top = 8
Width = 328
Caption = 'SpeedButtonsGroupBox'
ClientHeight = 374
ClientWidth = 324
TabOrder = 0
object SpeedButtonsTreeView: TTreeView
Left = 6
Height = 376
Top = 0
Width = 313
DefaultItemHeight = 15
TabOrder = 0
OnMouseDown = SpeedButtonsTreeViewMouseDown
end
end
end

View File

@ -427,6 +427,7 @@ end;
function TIDEOptionsDialog.PassesFilter(ARec: PIDEOptionsGroupRec): Boolean; function TIDEOptionsDialog.PassesFilter(ARec: PIDEOptionsGroupRec): Boolean;
begin begin
//DebugLn(['TIDEOptionsDialog.PassesFilter ',DbgSName(ARec^.GroupClass),' ',DbgSName(OptionsFilter)]);
if (ARec^.GroupClass = nil) and (OptionsFilter <> nil) then if (ARec^.GroupClass = nil) and (OptionsFilter <> nil) then
Exit(False); Exit(False);
if (OptionsFilter<>nil) and (ARec^.GroupClass <> nil) if (OptionsFilter<>nil) and (ARec^.GroupClass <> nil)

View File

@ -4293,6 +4293,7 @@ begin
else else
AOptionsFilter := TAbstractIDEEnvironmentOptions; AOptionsFilter := TAbstractIDEEnvironmentOptions;
IDEOptionsDialog.OptionsFilter := AOptionsFilter; IDEOptionsDialog.OptionsFilter := AOptionsFilter;
DebugLn(['TMainIDE.DoOpenIDEOptions ',DbgSName(IDEOptionsDialog.OptionsFilter)]);
IDEOptionsDialog.OpenEditor(AEditor); IDEOptionsDialog.OpenEditor(AEditor);
with IDEOptionsDialog do with IDEOptionsDialog do

View File

@ -60,7 +60,7 @@ type
end; end;
TAbstractIDEOptionsClass = class of TAbstractIDEOptions; TAbstractIDEOptionsClass = class of TAbstractIDEOptions;
TAbstractIDEEnvironmentOptions = class(TAbstractIDEOptions); TAbstractIDEEnvironmentOptions = class(TAbstractIDEOp tions);
TAbstractIDEProjectOptions = class(TAbstractIDEOptions); TAbstractIDEProjectOptions = class(TAbstractIDEOptions);
TAbstractIDEHelpOptions = class(TAbstractIDEEnvironmentOptions); TAbstractIDEHelpOptions = class(TAbstractIDEEnvironmentOptions);