Ignore:
Timestamp:
Mar 11, 2011, 10:57:39 AM (14 years ago)
Author:
george
Message:
  • Fixed: Infinite loop in TCDManager SetVisible method.
Location:
Docking/CoolDocking/Managers
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/Managers/UCDManagerRegions.pas

    r192 r193  
    1414  end;
    1515
    16   { TCDStyleRegions }
    17 
    18   TCDStyleRegions = class(TCDManager)
     16  { TCDManagerRegions }
     17
     18  TCDManagerRegions = class(TCDManager)
    1919  private
    2020    function GetDirection(InsertAt: TAlign): TCDDirection;
     
    2828    destructor Destroy; override;
    2929    procedure UpdateClientSize; override;
    30     procedure DoSetVisible(const AValue: Boolean);
     30    procedure DoSetVisible(const AValue: Boolean); override;
    3131    procedure ChangeVisible(Control: TWinControl; Visible: Boolean);
    3232    property DockDirection: TCDDirection read FDockDirection
     
    4040
    4141
    42 { TCDStyleRegions }
    43 
    44 function TCDStyleRegions.GetDirection(InsertAt: TAlign): TCDDirection;
     42{ TCDManagerRegions }
     43
     44function TCDManagerRegions.GetDirection(InsertAt: TAlign): TCDDirection;
    4545begin
    4646  Result := ddHorizontal;
     
    5353end;
    5454
    55 procedure TCDStyleRegions.InsertControlPanel(Control: TControl; InsertAt: TAlign;
     55procedure TCDManagerRegions.InsertControlPanel(Control: TControl; InsertAt: TAlign;
    5656  DropCtl: TControl);
    5757var
     
    107107end;
    108108
    109 procedure TCDStyleRegions.RemoveControl(Control: TControl);
     109procedure TCDManagerRegions.RemoveControl(Control: TControl);
    110110var
    111111  ClientPanel: TCDClientPanel;
     
    134134end;
    135135
    136 constructor TCDStyleRegions.Create(ADockSite: TWinControl);
    137 var
    138   I: Integer;
    139 begin
    140   inherited;
     136constructor TCDManagerRegions.Create(ADockSite: TWinControl);
     137var
     138  I: Integer;
     139begin
     140  inherited;
     141  FDockStyle := dsList;
    141142  //Panels := TObjectList.Create;
    142143
     
    151152end;
    152153
    153 destructor TCDStyleRegions.Destroy;
     154destructor TCDManagerRegions.Destroy;
    154155begin
    155156  //Panels.Free;
     
    157158end;
    158159
    159 procedure TCDStyleRegions.UpdateClientSize;
     160procedure TCDManagerRegions.UpdateClientSize;
    160161var
    161162  I: Integer;
     
    200201end;
    201202
    202 procedure TCDStyleRegions.DoSetVisible(const AValue: Boolean);
    203 var
    204   I: Integer;
    205 begin
    206 //  inherited SetVisible(AValue);
     203procedure TCDManagerRegions.DoSetVisible(const AValue: Boolean);
     204var
     205  I: Integer;
     206begin
     207  inherited;
    207208  for I := 0 to DockPanels.Count - 1 do
    208209
     
    222223end;
    223224
    224 procedure TCDStyleRegions.ChangeVisible(Control: TWinControl;
     225procedure TCDManagerRegions.ChangeVisible(Control: TWinControl;
    225226  Visible: Boolean);
    226227begin
  • Docking/CoolDocking/Managers/UCDManagerRegionsPopup.pas

    r192 r193  
    66
    77uses
    8   Classes, SysUtils, UCDManagerRegions;
     8  Classes, SysUtils, UCDManagerRegions, UCDCommon, Controls;
    99
    1010type
    11   TCDStylePopupRegions = class(TCDStyleRegions)
    1211
     12  { TCDStylePopupRegions }
     13
     14  TCDStylePopupRegions = class(TCDManagerRegions)
     15    constructor Create(ADockSite: TWinControl);
    1316  end;
    1417
     
    1922  UCDClient;
    2023
     24{ TCDStylePopupRegions }
     25
     26constructor TCDStylePopupRegions.Create(ADockSite: TWinControl);
     27begin
     28  inherited;
     29  FDockStyle := dsPopupList;
     30end;
     31
    2132end.
    2233
  • Docking/CoolDocking/Managers/UCDManagerTabs.pas

    r192 r193  
    1111type
    1212
    13   { TCDStyleTabs }
    14 
    15   TCDStyleTabs = class(TCDManager)
     13  { TCDManagerTabs }
     14
     15  TCDManagerTabs = class(TCDManager)
    1616  public
    1717    MouseDown: Boolean;
     
    3535  public
    3636    constructor Create(ADockSite: TWinControl);
    37     procedure DoSetVisible(const AValue: Boolean);
     37    procedure DoSetVisible(const AValue: Boolean); override;
    3838    destructor Destroy; override;
    3939    procedure ChangeVisible(Control: TWinControl; Visible: Boolean); override;
     
    4949  UCDClient;
    5050
    51 { TCDStyleTabs }
    52 
    53 procedure TCDStyleTabs.PopupMenuTabCloseClick(Sender: TObject);
     51{ TCDManagerTabs }
     52
     53procedure TCDManagerTabs.PopupMenuTabCloseClick(Sender: TObject);
    5454begin
    5555  if Assigned(PageControl.ActivePage) then
     
    5757end;
    5858
    59 procedure TCDStyleTabs.TabControlMouseLeave(Sender: TObject);
     59procedure TCDManagerTabs.TabControlMouseLeave(Sender: TObject);
    6060begin
    6161  if MouseDown then
     
    6767end;
    6868
    69 procedure TCDStyleTabs.TabControlChange(Sender: TObject);
     69procedure TCDManagerTabs.TabControlChange(Sender: TObject);
    7070var
    7171  I: Integer;
     
    120120end;
    121121
    122 procedure TCDStyleTabs.TabControlMouseDown(Sender: TObject;
     122procedure TCDManagerTabs.TabControlMouseDown(Sender: TObject;
    123123  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
    124124begin
     
    130130end;
    131131
    132 procedure TCDStyleTabs.TabControlMouseUp(Sender: TObject;
     132procedure TCDManagerTabs.TabControlMouseUp(Sender: TObject;
    133133  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
    134134begin
     
    136136end;
    137137
    138 constructor TCDStyleTabs.Create(ADockSite: TWinControl);
     138constructor TCDManagerTabs.Create(ADockSite: TWinControl);
    139139var
    140140  NewMenuItem: TMenuItem;
     
    144144begin
    145145  inherited;
     146  FDockStyle := dsTabs;
    146147  TabImageList := TImageList.Create(ADockSite); //FDockSite);
    147148  with TabImageList do begin
     
    177178end;
    178179
    179 destructor TCDStyleTabs.Destroy;
     180destructor TCDManagerTabs.Destroy;
    180181begin
    181182  PageControl.Free;
     
    184185end;
    185186
    186 procedure TCDStyleTabs.Switch(Index: Integer);
     187procedure TCDManagerTabs.Switch(Index: Integer);
    187188begin
    188189  PageControl.TabIndex := Index;
    189190end;
    190191
    191 procedure TCDStyleTabs.InsertControlNoUpdate(AControl: TControl; InsertAt: TAlign);
     192procedure TCDManagerTabs.InsertControlNoUpdate(AControl: TControl; InsertAt: TAlign);
    192193var
    193194  NewTabSheet: TTabSheet;
     
    232233end;
    233234
    234 procedure TCDStyleTabs.RemoveControl(Control: TControl);
     235procedure TCDManagerTabs.RemoveControl(Control: TControl);
    235236begin
    236237  inherited RemoveControl(Control);
    237238end;
    238239
    239 procedure TCDStyleTabs.InsertControlPanel(AControl: TControl; InsertAt: TAlign;
     240procedure TCDManagerTabs.InsertControlPanel(AControl: TControl; InsertAt: TAlign;
    240241  DropCtl: TControl);
    241242var
     
    247248end;
    248249
    249 procedure TCDStyleTabs.UpdateClientSize;
     250procedure TCDManagerTabs.UpdateClientSize;
    250251var
    251252  I: Integer;
     
    259260end;
    260261
    261 procedure TCDStyleTabs.DoSetVisible(const AValue: Boolean);
    262 begin
     262procedure TCDManagerTabs.DoSetVisible(const AValue: Boolean);
     263begin
     264  inherited;
    263265    if (PageControl.TabIndex >= 0) and (PageControl.TabIndex < DockPanels.Count) then
    264266      with TCDClientPanel(DockPanels[PageControl.TabIndex]) do begin
     
    274276end;
    275277
    276 procedure TCDStyleTabs.ChangeVisible(Control: TWinControl; Visible: Boolean);
     278procedure TCDManagerTabs.ChangeVisible(Control: TWinControl; Visible: Boolean);
    277279var
    278280  I: Integer;
     
    318320end;
    319321
    320 procedure TCDStyleTabs.SetTabsPos(const AValue: THeaderPos);
     322procedure TCDManagerTabs.SetTabsPos(const AValue: THeaderPos);
    321323begin
    322324  if FTabsPos = AValue then Exit;
  • Docking/CoolDocking/Managers/UCDManagerTabsPopup.pas

    r192 r193  
    4040  { TCDStylePopupTabs }
    4141
    42   TCDStylePopupTabs = class(TCDStyleTabs)
     42  TCDStylePopupTabs = class(TCDManagerTabs)
    4343    TabControl: TTabControl;
    4444    TabImageList: TImageList;
     
    123123constructor TCDAutoHide.Create;
    124124begin
     125  inherited;
    125126  Timer := TTimer.Create(nil);
    126127  Timer.Enabled := False;
     
    186187begin
    187188  inherited;
     189  FDockStyle := dsPopupTabs;
    188190
    189191  AutoHide := TCDAutoHide.Create;
Note: See TracChangeset for help on using the changeset viewer.