diff --git a/lazproj/coedit.lpi b/lazproj/coedit.lpi
index af489897..50c8182c 100644
--- a/lazproj/coedit.lpi
+++ b/lazproj/coedit.lpi
@@ -140,7 +140,7 @@
-
+
@@ -361,6 +361,11 @@
+
+
+
+
+
diff --git a/lazproj/coedit.lpr b/lazproj/coedit.lpr
index 331a5174..81a22094 100644
--- a/lazproj/coedit.lpr
+++ b/lazproj/coedit.lpr
@@ -8,7 +8,7 @@ uses
{$ENDIF}{$ENDIF}
Interfaces, Forms, lazcontrols, runtimetypeinfocontrols, ce_observer, ce_libman,
ce_tools, ce_dcd, ce_main, ce_writableComponent, ce_options, ce_symstring,
- ce_staticmacro, ce_inspectors, LResources, ce_editoroptions;
+ ce_staticmacro, ce_inspectors, LResources, ce_editoroptions, ce_dockoptions;
{$R *.res}
diff --git a/src/ce_dockoptions.pas b/src/ce_dockoptions.pas
new file mode 100644
index 00000000..0f2e13a0
--- /dev/null
+++ b/src/ce_dockoptions.pas
@@ -0,0 +1,120 @@
+unit ce_dockoptions;
+
+{$I ce_defines.inc}
+
+interface
+
+uses
+ Classes, SysUtils, AnchorDocking, AnchorDockOptionsDlg, XMLPropStorage, AnchorDockStr,
+ ce_observer, ce_interfaces;
+
+type
+
+ (**
+ * The option frame to edit the docking option, displayed in the option form.
+ *)
+ TEditableAnchorDockOptions = class(TAnchorDockOptionsFrame, ICEEditableOptions)
+ private
+ fBackup: TXMLConfigStorage;
+ function optionedWantCategory(): string;
+ function optionedWantEditorKind: TOptionEditorKind;
+ function optionedWantContainer: TPersistent;
+ procedure optionedEvent(anEvent: TOptionEditorEvent);
+ procedure doChanged(Sender: TObject);
+ public
+ constructor Create(TheOwner: TComponent); override;
+ destructor Destroy; override;
+ end;
+
+implementation
+
+var
+ DockOptionsEditor: TEditableAnchorDockOptions;
+
+constructor TEditableAnchorDockOptions.Create(TheOwner: TComponent);
+begin
+ inherited;
+ fBackup := TXMLConfigStorage.Create('',false);
+ Master := AnchorDocking.DockMaster;
+ //
+ HeaderAlignLeftTrackBar.OnChange := @doChanged;
+ HeaderAlignTopTrackBar.OnChange := @doChanged;
+ DragThresholdTrackBar.OnChange := @doChanged;
+ SplitterWidthTrackBar.OnChange := @doChanged;
+ //
+ FlattenHeaders.OnChange := @doChanged;
+ FilledHeaders.OnChange := @doChanged;
+ HideHeaderCaptionForFloatingCheckBox.OnChange := @doChanged;
+ ScaleOnResizeCheckBox.OnChange := @doChanged;
+ ShowHeaderCaptionCheckBox.OnChange := @doChanged;
+ ShowHeaderCheckBox.OnChange := @doChanged;
+ //
+ HeaderStyleComboBox.OnChange:= @doChanged;
+ //
+ EntitiesConnector.addObserver(self);
+end;
+
+destructor TEditableAnchorDockOptions.Destroy;
+begin
+ fBackup.Free;
+ inherited;
+end;
+
+function TEditableAnchorDockOptions.optionedWantCategory(): string;
+begin
+ exit('Docking')
+end;
+
+function TEditableAnchorDockOptions.optionedWantEditorKind: TOptionEditorKind;
+begin
+ exit(oekForm);
+end;
+
+function TEditableAnchorDockOptions.optionedWantContainer: TPersistent;
+begin
+ fBackup.Clear;
+ DockMaster.SaveSettingsToConfig(fBackup);
+ LoadFromMaster;
+ exit(self);
+end;
+
+procedure TEditableAnchorDockOptions.optionedEvent(anEvent: TOptionEditorEvent);
+begin
+ // restores
+ if anEvent = oeeCancel then
+ begin
+ DockMaster.LoadSettingsFromConfig(fBackup);
+ LoadFromMaster;
+ fBackup.Clear;
+ DockMaster.SaveSettingsToConfig(fBackup);
+ end;
+ // accept and new backup
+ if anEvent = oeeAccept then
+ begin
+ SaveToMaster;
+ fBackup.Clear;
+ DockMaster.SaveSettingsToConfig(fBackup);
+ end;
+end;
+
+procedure TEditableAnchorDockOptions.doChanged(Sender: TObject);
+begin
+ DragThresholdLabel.Caption:=adrsDragThreshold +
+ ' ('+IntToStr(DragThresholdTrackBar.Position)+')';
+ HeaderAlignTopLabel.Caption:=adrsHeaderAlignTop +
+ ' ('+IntToStr(HeaderAlignTopTrackBar.Position) +')';
+ HeaderAlignLeftLabel.Caption:=adrsHeaderAlignLeft +
+ ' ('+IntToStr(HeaderAlignLeftTrackBar.Position) +')';
+ SplitterWidthLabel.Caption:=adrsSplitterWidth +
+ ' ('+IntToStr(SplitterWidthTrackBar.Position) +')';
+ ShowHeaderCheckBox.Visible:=adofShow_ShowHeader in Flags;
+ //
+ SaveToMaster;
+end;
+
+initialization
+ DockOptionsEditor := TEditableAnchorDockOptions.create(nil);
+finalization
+ DockOptionsEditor.free;
+end.
+
diff --git a/src/ce_optionseditor.lfm b/src/ce_optionseditor.lfm
index 98254831..a0debcb0 100644
--- a/src/ce_optionseditor.lfm
+++ b/src/ce_optionseditor.lfm
@@ -1,37 +1,37 @@
inherited CEOptionEditorWidget: TCEOptionEditorWidget
Left = 594
- Height = 377
+ Height = 493
Top = 257
- Width = 548
+ Width = 559
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
Caption = 'Options editor'
- ClientHeight = 377
- ClientWidth = 548
- FormStyle = fsSystemStayOnTop
+ ClientHeight = 493
+ ClientWidth = 559
+ FormStyle = fsStayOnTop
inherited Back: TPanel
- Height = 377
- Width = 548
- ClientHeight = 377
- ClientWidth = 548
+ Height = 493
+ Width = 559
+ ClientHeight = 493
+ ClientWidth = 559
inherited Content: TPanel
- Height = 377
- Width = 548
- ClientHeight = 377
- ClientWidth = 548
+ Height = 493
+ Width = 559
+ ClientHeight = 493
+ ClientWidth = 559
object pnlBody: TPanel[0]
Left = 4
- Height = 335
+ Height = 451
Top = 4
- Width = 540
+ Width = 551
Align = alClient
BorderSpacing.Around = 4
BevelOuter = bvNone
- ClientHeight = 335
- ClientWidth = 540
+ ClientHeight = 451
+ ClientWidth = 551
TabOrder = 0
object selCat: TTreeView
Left = 0
- Height = 335
+ Height = 451
Top = 0
Width = 140
Align = alLeft
@@ -43,19 +43,19 @@ inherited CEOptionEditorWidget: TCEOptionEditorWidget
end
object pnlEd: TPanel
Left = 146
- Height = 335
+ Height = 451
Top = 0
- Width = 394
+ Width = 405
Align = alClient
BevelOuter = bvNone
- ClientHeight = 335
- ClientWidth = 394
+ ClientHeight = 451
+ ClientWidth = 405
TabOrder = 1
object inspector: TTIPropertyGrid
Left = 0
- Height = 335
+ Height = 451
Top = 0
- Width = 394
+ Width = 405
Align = alClient
DefaultValueFont.Color = clWindowText
Filter = [tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord, tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper]
@@ -69,7 +69,7 @@ inherited CEOptionEditorWidget: TCEOptionEditorWidget
end
object Splitter1: TSplitter
Left = 140
- Height = 335
+ Height = 451
Top = 0
Width = 6
end
@@ -77,16 +77,16 @@ inherited CEOptionEditorWidget: TCEOptionEditorWidget
object pnlFooter: TPanel[1]
Left = 4
Height = 30
- Top = 343
- Width = 540
+ Top = 459
+ Width = 551
Align = alBottom
BorderSpacing.Around = 4
BevelOuter = bvLowered
ClientHeight = 30
- ClientWidth = 540
+ ClientWidth = 551
TabOrder = 1
object btnCancel: TSpeedButton
- Left = 473
+ Left = 484
Height = 24
Hint = 'cancel and revert modifications'
Top = 3
@@ -97,7 +97,7 @@ inherited CEOptionEditorWidget: TCEOptionEditorWidget
OnClick = btnCancelClick
end
object btnAccept: TSpeedButton
- Left = 507
+ Left = 518
Height = 24
Hint = 'accept modifications'
Top = 3
diff --git a/src/ce_optionseditor.pas b/src/ce_optionseditor.pas
index 43ec8ad9..83ed2706 100644
--- a/src/ce_optionseditor.pas
+++ b/src/ce_optionseditor.pas
@@ -123,7 +123,8 @@ begin
begin
TForm(dt^.container).Parent := pnlEd;
TForm(dt^.container).Align := alClient;
- TForm(dt^.container).BorderStyle:= bsNone;
+ //TForm(dt^.container).BorderIcons:= [];
+ //TForm(dt^.container).BorderStyle:= bsNone;
end;
oekGeneric:
begin