From 458cb4762c6b39ec8c850114e844565e3f48933f Mon Sep 17 00:00:00 2001 From: mattias Date: Tue, 20 Apr 2010 17:29:32 +0000 Subject: [PATCH] educationlaz: added options to control shown speedbuttons on IDE bar, and objectinspector pages, from Michael Kuhardt git-svn-id: trunk@24748 - --- .gitattributes | 3 + components/education/educationlaz.lpk | 33 ++++- components/education/educationlaz.pas | 8 +- components/education/educomppalette.lfm | 4 +- components/education/educomppalette.pas | 9 +- components/education/eduenvoptsframe.pas | 13 +- components/education/edumenu.pas | 9 +- components/education/edunewprogram.lfm | 5 +- components/education/edunewprogram.pas | 9 +- components/education/eduoipages.lfm | 48 +++++++ components/education/eduoipages.pas | 159 +++++++++++++++++++++++ components/education/eduoptions.pas | 31 +++-- components/education/eduoptionsdlg.pas | 4 +- components/education/edupkgsystem.pas | 6 +- components/education/edupropsevents.lfm | 85 ++++++------ components/education/edupropsevents.pas | 21 ++- components/education/eduspeedbuttons.lfm | 65 +++++++++ ide/ideoptionsdlg.pas | 1 + ide/main.pp | 1 + ideintf/ideoptionsintf.pas | 2 +- 20 files changed, 412 insertions(+), 104 deletions(-) create mode 100644 components/education/eduoipages.lfm create mode 100644 components/education/eduoipages.pas create mode 100644 components/education/eduspeedbuttons.lfm diff --git a/.gitattributes b/.gitattributes index 18c21fc14a..39ec985319 100644 --- a/.gitattributes +++ b/.gitattributes @@ -725,6 +725,8 @@ components/education/edumenu.pas svneol=native#text/plain components/education/edunewprogram.lfm svneol=native#text/plain components/education/edunewprogram.lrs 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/eduoptionsdlg.lfm 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.lrs 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/externhelp.lpk svneol=native#text/plain components/externhelp/externhelp.pas svneol=native#text/plain diff --git a/components/education/educationlaz.lpk b/components/education/educationlaz.lpk index 18b8c9c806..d6e396679f 100644 --- a/components/education/educationlaz.lpk +++ b/components/education/educationlaz.lpk @@ -15,7 +15,7 @@ - + @@ -54,6 +54,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/education/educationlaz.pas b/components/education/educationlaz.pas index 8bb7dbe56b..3da7c88a66 100644 --- a/components/education/educationlaz.pas +++ b/components/education/educationlaz.pas @@ -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. } @@ -8,7 +8,8 @@ interface uses EduEnvOptsFrame, EduOptions, EduPkgSystem, EduCompPalette, EduMenu, - EduNewProgram, EduPropsEvents, LazarusPackageIntf; + EduNewProgram, EduPropsEvents, EduOIPages, EduOptionsDlg, EduSpeedButtons, + LazarusPackageIntf; implementation @@ -20,6 +21,9 @@ begin RegisterUnit('EduMenu', @EduMenu.Register); RegisterUnit('EduNewProgram', @EduNewProgram.Register); RegisterUnit('EduPropsEvents', @EduPropsEvents.Register); + RegisterUnit('EduOIPages', @EduOIPages.Register); + RegisterUnit('EduOptionsDlg', @EduOptionsDlg.Register); + RegisterUnit('EduSpeedButtons', @EduSpeedButtons.Register); end; initialization diff --git a/components/education/educomppalette.lfm b/components/education/educomppalette.lfm index 8a113ee07c..b2aae79578 100644 --- a/components/education/educomppalette.lfm +++ b/components/education/educomppalette.lfm @@ -5,8 +5,8 @@ inherited EduCompPaletteFrame: TEduCompPaletteFrame ClientWidth = 480 OnClick = FrameClick TabOrder = 0 - DesignLeft = 906 - DesignTop = 133 + DesignLeft = 286 + DesignTop = 126 object ComponentsGroupBox: TGroupBox[0] AnchorSideTop.Control = Owner AnchorSideBottom.Control = Owner diff --git a/components/education/educomppalette.pas b/components/education/educomppalette.pas index 0b705a1508..87b0087fef 100644 --- a/components/education/educomppalette.pas +++ b/components/education/educomppalette.pas @@ -90,7 +90,8 @@ procedure Register; begin EduComponentPaletteOptions:=TEduComponentPaletteOptions.Create; EducationOptions.Root.Add(EduComponentPaletteOptions); - RegisterIDEOptionsEditor(EduOptionID,TEduCompPaletteFrame,EduOptionCompPaletteID); + EduOptionCompPaletteID:=RegisterIDEOptionsEditor(EduOptionID, + TEduCompPaletteFrame,EduOptionCompPaletteID)^.Index; end; { TEduCompPaletteFrame } @@ -343,7 +344,7 @@ end; class function TEduCompPaletteFrame.SupportedOptionsClass: TAbstractIDEOptionsClass; begin - Result:=TEduOptions; + Result:=EducationIDEOptionsClass; end; procedure TEduCompPaletteFrame.WriteSettings(AOptions: TAbstractIDEOptions); @@ -434,8 +435,6 @@ begin end; end; -initialization - {$I educomppalette.lrs} +{$R *.lfm} end. - diff --git a/components/education/eduenvoptsframe.pas b/components/education/eduenvoptsframe.pas index f353d06404..a24706f4a9 100644 --- a/components/education/eduenvoptsframe.pas +++ b/components/education/eduenvoptsframe.pas @@ -72,8 +72,9 @@ procedure Register; begin EduGeneralOptions:=TEduGeneralOptions.Create; EducationOptions.Root.Add(EduGeneralOptions); - RegisterIDEOptionsGroup(EduOptionID,TEduOptions); - RegisterIDEOptionsEditor(EduOptionID,TEduEnvFrame,EduOptionGeneralID); + EduOptionID:=RegisterIDEOptionsGroup(EduOptionID,TEduOptions)^.Index; + EduOptionGeneralID:=RegisterIDEOptionsEditor(EduOptionID,TEduEnvFrame, + EduOptionGeneralID)^.Index; LazarusIDE.AddHandlerOnProjectOpened(@EducationOptions.OnProjectOpened); end; @@ -109,11 +110,13 @@ end; procedure TEduEnvFrame.ReadSettings(AOptions: TAbstractIDEOptions); begin EnableCheckBox.Checked:=EducationOptions.Enabled; + //OnLoadIDEOptions(Self,EducationOptions); end; procedure TEduEnvFrame.WriteSettings(AOptions: TAbstractIDEOptions); begin EducationOptions.Enabled:=EnableCheckBox.Checked; + //OnSaveIDEOptions(Self,EducationOptions); if EducationOptions.Save<>mrOk then DebugLn(['TEduEnvFrame.WriteSettings Failed']); EducationOptions.Apply; @@ -121,7 +124,7 @@ end; class function TEduEnvFrame.SupportedOptionsClass: TAbstractIDEOptionsClass; begin - Result := nil; + Result := EducationIDEOptionsClass; end; { TEduGeneralOptions } @@ -148,8 +151,6 @@ begin Result:=inherited Save(Config); end; -initialization - {$I eduenvoptsframe.lrs} +{$R *.lfm} end. - diff --git a/components/education/edumenu.pas b/components/education/edumenu.pas index 12a98f3379..ff52524cb9 100644 --- a/components/education/edumenu.pas +++ b/components/education/edumenu.pas @@ -93,7 +93,8 @@ procedure Register; begin EduMenuOptions:=TEduMenuOptions.Create; EducationOptions.Root.Add(EduMenuOptions); - RegisterIDEOptionsEditor(EduOptionID,TEduMenuFrame,EduOptionMenuID); + EduOptionMenuID:=RegisterIDEOptionsEditor(EduOptionID,TEduMenuFrame, + EduOptionMenuID)^.Index; end; { TEduMenuFrame } @@ -309,7 +310,7 @@ end; class function TEduMenuFrame.SupportedOptionsClass: TAbstractIDEOptionsClass; begin - Result:=TEduOptions; + Result:=EducationIDEOptionsClass; end; procedure TEduMenuFrame.WriteSettings(AOptions: TAbstractIDEOptions); @@ -439,8 +440,6 @@ begin ApplyRecursive(IDEMenuRoots[i]); end; -initialization - {$I edumenu.lrs} +{$R *.lfm} end. - diff --git a/components/education/edunewprogram.lfm b/components/education/edunewprogram.lfm index 26ab89a369..d535e83b68 100644 --- a/components/education/edunewprogram.lfm +++ b/components/education/edunewprogram.lfm @@ -4,8 +4,8 @@ inherited EduNewPrgFrame: TEduNewPrgFrame ClientHeight = 320 ClientWidth = 453 TabOrder = 0 - DesignLeft = 795 - DesignTop = 54 + DesignLeft = 539 + DesignTop = 23 object SrcGroupBox: TGroupBox[0] Left = 6 Height = 262 @@ -30,7 +30,6 @@ inherited EduNewPrgFrame: TEduNewPrgFrame ParentColor = False ParentFont = False TabOrder = 0 - BookMarkOptions.OnChange = nil Gutter.Width = 61 Gutter.MouseActions = < item diff --git a/components/education/edunewprogram.pas b/components/education/edunewprogram.pas index 7a6d099caa..f5ad95a351 100644 --- a/components/education/edunewprogram.pas +++ b/components/education/edunewprogram.pas @@ -127,7 +127,8 @@ procedure Register; begin EduNewPrgOptions:=TEduNewPrgOptions.Create; EducationOptions.Root.Add(EduNewPrgOptions); - RegisterIDEOptionsEditor(EduOptionID,TEduNewPrgFrame,EduOptionNewPrgID); + EduOptionNewPrgID:=RegisterIDEOptionsEditor(EduOptionID,TEduNewPrgFrame, + EduOptionNewPrgID)^.Index; FileDescSingleFileProgram:=TFileDescSingleFileProgram.Create; RegisterProjectFileDescriptor(FileDescSingleFileProgram,FileDescGroupName); @@ -317,7 +318,7 @@ end; class function TEduNewPrgFrame.SupportedOptionsClass: TAbstractIDEOptionsClass; begin - Result:=TEduOptions; + Result:=EducationIDEOptionsClass; end; procedure TEduNewPrgFrame.WriteSettings(AOptions: TAbstractIDEOptions); @@ -363,8 +364,6 @@ begin Result:=ersASimpleProgramOnlyOneFileIsCreatedAndAddedToTheCur; end; -initialization - {$I edunewprogram.lrs} +{$R *.lfm} end. - diff --git a/components/education/eduoipages.lfm b/components/education/eduoipages.lfm new file mode 100644 index 0000000000..b104e2cc68 --- /dev/null +++ b/components/education/eduoipages.lfm @@ -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 diff --git a/components/education/eduoipages.pas b/components/education/eduoipages.pas new file mode 100644 index 0000000000..ba2ff11593 --- /dev/null +++ b/components/education/eduoipages.pas @@ -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. diff --git a/components/education/eduoptions.pas b/components/education/eduoptions.pas index 709ba7c304..55f2df3d7b 100644 --- a/components/education/eduoptions.pas +++ b/components/education/eduoptions.pas @@ -68,7 +68,7 @@ resourcestring ersGrpBoxEventsFull = 'Events: Full Configuration'; 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'; ersStTextEventsMin = 'OnClick, OnChange, OnMouseMove'; @@ -83,19 +83,30 @@ resourcestring ersEduCompPaletteTitle = 'Component palette'; ersEduNewProgramTitle = 'New program'; ersEduMenuTitle = 'Menus'; + ersEduOIPages = 'Object Inspector'; ersRdBtnFull = 'Show All'; ersEnableEduCheckBoxCaption = 'Enable education settings'; + ersShowOIPages = 'Show Object Inspector Pages'; + + ersEduSBTitle = 'Speed Buttons'; + ersShowSelection = 'Show Selection'; + ersVisibleSpeedButtons = 'Visible SpeedButtons'; + + + const DefaultEduOptionsFilename = 'education.xml'; - - EduOptionID = 2000; - EduOptionGeneralID = 100; - EduOptionCompPaletteID = 200; - EduOptionMenuID = 300; - EduOptionNewPrgID = 400; - EduPropsEventsOptionsID = 500; +var + EduOptionID: integer = 2000; + EduOptionGeneralID: integer = 100; + EduOptionCompPaletteID: integer = 200; + EduOptionMenuID: integer = 300; + EduOptionNewPrgID: integer = 400; + EduPropsEventsOptionsID: integer = 500; + EduOIPagesOptionsID: integer = 600; + EduSpeedButtonsOptionsID: integer = 700; type @@ -174,6 +185,9 @@ type property NeedLoad: boolean read FNeedLoad write FNeedLoad; end; +type + EducationIDEOptionsClass = TAbstractIDEEnvironmentOptions; + var EducationOptions: TEduOptions = nil; @@ -460,4 +474,3 @@ finalization FreeAndNil(EducationOptions); end. - diff --git a/components/education/eduoptionsdlg.pas b/components/education/eduoptionsdlg.pas index 07da40920f..a8f04c3889 100644 --- a/components/education/eduoptionsdlg.pas +++ b/components/education/eduoptionsdlg.pas @@ -67,8 +67,6 @@ begin end; -initialization - {$I eduoptionsdlg.lrs} +{$R *.lfm} end. - diff --git a/components/education/edupkgsystem.pas b/components/education/edupkgsystem.pas index a2e7a189c1..43ee76662f 100644 --- a/components/education/edupkgsystem.pas +++ b/components/education/edupkgsystem.pas @@ -103,7 +103,7 @@ end; class function TEduPkgSystemFrame.SupportedOptionsClass: TAbstractIDEOptionsClass; begin - Result:=TEduOptions; + Result:=EducationIDEOptionsClass; end; { TEduPkgSystemOptions } @@ -155,8 +155,6 @@ begin Result:=inherited Save(Config); end; -initialization - {$I edupkgsystem.lrs} +{$R *.lfm} end. - diff --git a/components/education/edupropsevents.lfm b/components/education/edupropsevents.lfm index dce3f8ad5c..fcf696ae6b 100644 --- a/components/education/edupropsevents.lfm +++ b/components/education/edupropsevents.lfm @@ -4,27 +4,26 @@ inherited EduPropsEventsFrame: TEduPropsEventsFrame ClientHeight = 393 ClientWidth = 456 TabOrder = 0 - DesignLeft = 415 - DesignTop = 302 + DesignLeft = 713 + DesignTop = 9 object OptsPanel: TPanel[0] - Left = 0 + Left = 8 Height = 128 Top = 0 - Width = 456 - Align = alTop + Width = 440 + Align = alCustom ChildSizing.Layout = cclTopToBottomThenLeftToRight ChildSizing.ControlsPerLine = 2 ClientHeight = 128 - ClientWidth = 456 + ClientWidth = 440 TabOrder = 0 object rdGrpProps: TRadioGroup - Left = 7 - Height = 114 - Top = 7 + Left = 24 + Height = 105 + Top = 8 Width = 185 - Align = alLeft + Align = alCustom AutoFill = True - BorderSpacing.Around = 6 Caption = 'rdGrpProps' ChildSizing.LeftRightSpacing = 6 ChildSizing.TopBottomSpacing = 6 @@ -34,7 +33,7 @@ inherited EduPropsEventsFrame: TEduPropsEventsFrame ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 95 + ClientHeight = 87 ClientWidth = 181 OnClick = rdGrpPropsClick TabOrder = 0 @@ -45,9 +44,7 @@ inherited EduPropsEventsFrame: TEduPropsEventsFrame Width = 165 Align = alCustom Caption = 'PropsMinRadioBtn' - Checked = True OnClick = PropsMinRadioBtnClick - State = cbChecked TabOrder = 0 TabStop = False end @@ -74,13 +71,12 @@ inherited EduPropsEventsFrame: TEduPropsEventsFrame end end object rdGrpEvents: TRadioGroup - Left = 198 - Height = 114 - Top = 7 + Left = 224 + Height = 105 + Top = 8 Width = 185 - Align = alLeft + Align = alCustom AutoFill = True - BorderSpacing.Around = 6 Caption = 'rdGrpEvents' ChildSizing.LeftRightSpacing = 6 ChildSizing.TopBottomSpacing = 6 @@ -90,7 +86,7 @@ inherited EduPropsEventsFrame: TEduPropsEventsFrame ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 95 + ClientHeight = 87 ClientWidth = 181 TabOrder = 1 object EventsMinRadioBtn: TRadioButton @@ -100,9 +96,7 @@ inherited EduPropsEventsFrame: TEduPropsEventsFrame Width = 160 Align = alCustom Caption = 'EventsMinRadioBtn' - Checked = True OnClick = EventsMinRadioBtnClick - State = cbChecked TabOrder = 0 end object EventsExtRadioBtn: TRadioButton @@ -128,50 +122,47 @@ inherited EduPropsEventsFrame: TEduPropsEventsFrame end end object grpBoxEvents: TGroupBox[1] - Left = 0 + Left = 32 Height = 65 - Top = 256 - Width = 456 - Align = alTop + Top = 288 + Width = 392 Caption = 'grpBoxEvents' - ClientHeight = 46 - ClientWidth = 452 + ClientHeight = 47 + ClientWidth = 388 TabOrder = 1 - object stTextEvents: TLabel + object stTextEvents: TStaticText Left = 14 - Height = 18 + Height = 25 Top = 8 - Width = 81 + Width = 369 Caption = 'stTextEvents' - ParentColor = False + TabOrder = 0 end end object grpBoxProps: TGroupBox[2] - Left = 0 + Left = 32 Height = 128 - Top = 128 - Width = 456 - Align = alTop + Top = 144 + Width = 392 Caption = 'grpBoxProps' - ClientHeight = 109 - ClientWidth = 452 + ClientHeight = 110 + ClientWidth = 388 TabOrder = 2 - object stTextProps: TLabel + object stTextProps: TStaticText Left = 14 - Height = 18 + Height = 25 Top = 8 - Width = 74 + Width = 368 Caption = 'stTextProps' - ParentColor = False + TabOrder = 0 end - object stTextProps2: TLabel - AnchorSideTop.Side = asrBottom + object stTextProps2: TStaticText Left = 14 - Height = 18 + Height = 64 Top = 40 - Width = 82 + Width = 368 Caption = 'stTextProps2' - ParentColor = False + TabOrder = 1 end end end diff --git a/components/education/edupropsevents.pas b/components/education/edupropsevents.pas index 0a01a17e00..2739abebfc 100644 --- a/components/education/edupropsevents.pas +++ b/components/education/edupropsevents.pas @@ -73,9 +73,9 @@ type EventsExtRadioBtn: TRadioButton; EventsFullRadioBtn: TRadioButton; rdGrpEvents: TRadioGroup; - stTextEvents: TLabel; - stTextProps: TLabel; - stTextProps2: TLabel; + stTextEvents: TStaticText; + stTextProps2: TStaticText; + stTextProps: TStaticText; procedure EventsExtRadioBtnClick(Sender: TObject); procedure EventsFullRadioBtnClick(Sender: TObject); @@ -105,8 +105,8 @@ procedure Register; begin EduPropsEventsOptions:=TEduPropsEventsOptions.Create; EducationOptions.Root.Add(EduPropsEventsOptions); - RegisterIDEOptionsEditor(EduOptionID,TEduPropsEventsFrame,EduPropsEventsOptionsID); - + EduPropsEventsOptionsID:=RegisterIDEOptionsEditor(EduOptionID, + TEduPropsEventsFrame,EduPropsEventsOptionsID)^.Index; end; { TEduPropsEventsOptions } @@ -168,6 +168,7 @@ end; { TEduPropsEventsFrame } + procedure TEduPropsEventsFrame.PropsMinRadioBtnClick(Sender: TObject); begin grpBoxProps.Caption:=ersGrpBoxPropsMin; @@ -212,6 +213,8 @@ begin stTextProps2.Visible:=false; end; + + function TEduPropsEventsFrame.GetTitle: String; begin Result:=ersEduPropsEventsTitle; @@ -244,8 +247,6 @@ begin EventsExtRadioBtn.Caption:= ersShowExtended; EventsFullRadioBtn.Caption:= ersRdBtnFull; - - stTextProps2.Caption:=ersStTextPropsExt; stTextProps2.Visible:=false; @@ -282,7 +283,7 @@ end; class function TEduPropsEventsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass; begin - Result:=TEduOptions; + Result:=EducationIDEOptionsClass; end; procedure TEduPropsEventsFrame.WriteSettings(AOptions: TAbstractIDEOptions); @@ -298,8 +299,6 @@ begin end; -initialization - {$I edupropsevents.lrs} +{$R *.lfm} end. - diff --git a/components/education/eduspeedbuttons.lfm b/components/education/eduspeedbuttons.lfm new file mode 100644 index 0000000000..ecfafeefb6 --- /dev/null +++ b/components/education/eduspeedbuttons.lfm @@ -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 diff --git a/ide/ideoptionsdlg.pas b/ide/ideoptionsdlg.pas index 02448c724b..8d0807820c 100644 --- a/ide/ideoptionsdlg.pas +++ b/ide/ideoptionsdlg.pas @@ -427,6 +427,7 @@ end; function TIDEOptionsDialog.PassesFilter(ARec: PIDEOptionsGroupRec): Boolean; begin + //DebugLn(['TIDEOptionsDialog.PassesFilter ',DbgSName(ARec^.GroupClass),' ',DbgSName(OptionsFilter)]); if (ARec^.GroupClass = nil) and (OptionsFilter <> nil) then Exit(False); if (OptionsFilter<>nil) and (ARec^.GroupClass <> nil) diff --git a/ide/main.pp b/ide/main.pp index cb513b62d1..3378e33f3c 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -4293,6 +4293,7 @@ begin else AOptionsFilter := TAbstractIDEEnvironmentOptions; IDEOptionsDialog.OptionsFilter := AOptionsFilter; + DebugLn(['TMainIDE.DoOpenIDEOptions ',DbgSName(IDEOptionsDialog.OptionsFilter)]); IDEOptionsDialog.OpenEditor(AEditor); with IDEOptionsDialog do diff --git a/ideintf/ideoptionsintf.pas b/ideintf/ideoptionsintf.pas index e8ea9a6cb2..3b4f45d05e 100644 --- a/ideintf/ideoptionsintf.pas +++ b/ideintf/ideoptionsintf.pas @@ -60,7 +60,7 @@ type end; TAbstractIDEOptionsClass = class of TAbstractIDEOptions; - TAbstractIDEEnvironmentOptions = class(TAbstractIDEOptions); + TAbstractIDEEnvironmentOptions = class(TAbstractIDEOp tions); TAbstractIDEProjectOptions = class(TAbstractIDEOptions); TAbstractIDEHelpOptions = class(TAbstractIDEEnvironmentOptions);