Ignore:
Timestamp:
Mar 8, 2011, 1:57:42 PM (13 years ago)
Author:
george
Message:
  • Added: Customization of layouts in "Customize docking" window.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/UCoolDocking.pas

    r177 r180  
    1010  Classes, SysUtils, Controls, LCLType, LMessages, Graphics, StdCtrls,
    1111  Buttons, ExtCtrls, Contnrs, Forms, ComCtrls, Dialogs, Menus, FileUtil,
    12   UCoolDockCustomize, DOM, XMLWrite, XMLRead, UCoolDockWindowList,
     12  UCoolDockCustomize, DOM, XMLWrite, XMLRead, UCoolDockCommon,
    1313  DateUtils, UCoolDockStyleTabs, UCoolDockStyleRegions, UCoolDockStylePopupTabs,
    1414  UCoolDockStylePopupRegions, UCoolDockStyle, UCoolDockClientPanel,
    15   UCoolDockPopupMenu;
     15  UCoolDockPopupMenu, UCoolDockLayout;
    1616
    1717const
     
    3838    procedure PanelVisibleChange(Sender: TObject);
    3939  end;
    40 
    41   TDockStyle = (dsList, dsTabs, dsPopupTabs, dsPopupList);
    4240
    4341  // TObjectList<TCoolDockClientPanel>
     
    174172  TCoolDockCustomize = class(TComponent)
    175173  private
     174    FLayoutList: TCoolDockLayoutList;
    176175    FMaster: TCoolDockMaster;
    177176    Form: TCoolDockCustomizeForm;
     177    procedure SetLayoutList(const AValue: TCoolDockLayoutList);
    178178    procedure SetMaster(const AValue: TCoolDockMaster);
    179179  public
     
    183183  published
    184184    property Master: TCoolDockMaster read FMaster write SetMaster;
    185   end;
    186 
    187   { TCoolDockWindowList }
    188 
    189   TCoolDockWindowList = class(TComponent)
    190   private
    191     Form: TCoolDockWindowListForm;
    192   public
    193     function Execute: Boolean;
    194     constructor Create(AOwner: TComponent); override;
    195   published
     185    property LayoutList: TCoolDockLayoutList read FLayoutList write SetLayoutList;
    196186  end;
    197187
     
    208198  RegisterComponents('CoolDocking', [TCoolDockClient]);
    209199  RegisterComponents('CoolDocking', [TCoolDockCustomize]);
    210   RegisterComponents('CoolDocking', [TCoolDockWindowList]);
    211200end;
    212201
     
    801790end;
    802791
     792procedure TCoolDockCustomize.SetLayoutList(const AValue: TCoolDockLayoutList);
     793begin
     794  if FLayoutList=AValue then exit;
     795  FLayoutList:=AValue;
     796end;
     797
    803798function TCoolDockCustomize.Execute: Boolean;
    804799begin
     
    808803    Form.ComboBox1.ItemIndex := Integer(Master.DefaultTabsPos);
    809804    Form.ComboBox2.ItemIndex := Integer(Master.DefaultHeaderPos);
     805    Form.LayoutList := FLayoutList;
    810806  end;
    811807  Form.ShowModal;
     
    830826end;
    831827
    832 
    833 { TCoolDockWindowList }
    834 
    835 function TCoolDockWindowList.Execute: Boolean;
    836 begin
    837   Form := TCoolDockWindowListForm.Create(Self);
    838   Form.ShowModal;
    839   Form.Free;
    840   Result := True;
    841 end;
    842 
    843 constructor TCoolDockWindowList.Create(AOwner: TComponent);
    844 begin
    845   inherited Create(AOwner);
    846 end;
    847828
    848829{ TCoolDockClient }
Note: See TracChangeset for help on using the changeset viewer.