Changeset 182 for Docking/CoolDocking/UCoolDockPopupMenu.pas
- Timestamp:
- Mar 9, 2011, 2:11:40 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/UCoolDockPopupMenu.pas
r181 r182 15 15 TCoolDockPopupMenu = class(TPopupMenu) 16 16 public 17 Manager: T Object; // TCoolDockManager18 constructor Create(AManager: T Object);17 Manager: TCoolDockManagerBase; 18 constructor Create(AManager: TCoolDockManagerBase); 19 19 procedure PopupMenuListClick(Sender: TObject); 20 20 procedure PopupMenuTabsClick(Sender: TObject); … … 59 59 { TCoolDockPopupMenu } 60 60 61 constructor TCoolDockPopupMenu.Create(AManager: T Object);61 constructor TCoolDockPopupMenu.Create(AManager: TCoolDockManagerBase); 62 62 var 63 63 NewMenuItem: TMenuItem; … … 198 198 procedure TCoolDockPopupMenu.PopupMenuPositionAutoClick(Sender: TObject); 199 199 begin 200 TCoolDockManager(Manager).HeaderPos := hpAuto; 200 if PopupComponent is TPageControl then 201 with TPageControl(PopupComponent) do begin 202 TCoolDockStyleTabs(TCoolDockManager(Manager).DockStyleHandler).TabsPos := hpAuto; 203 end else 204 if PopupComponent is TCoolDockHeader then 205 with TCoolDockHeader(PopupComponent) do begin 206 TCoolDockManager(Manager).HeaderPos := hpAuto; 207 end; 201 208 end; 202 209 203 210 procedure TCoolDockPopupMenu.PopupMenuPositionLeftClick(Sender: TObject); 204 var 205 Control: TControl; 206 begin 207 Control := FindLCLControl(Mouse.CursorPos); 208 TCoolDockManager(Manager).HeaderPos := hpLeft; 211 begin 212 if PopupComponent is TPageControl then 213 with TPageControl(PopupComponent) do begin 214 TCoolDockStyleTabs(TCoolDockManager(Manager).DockStyleHandler).TabsPos := hpLeft; 215 end else 216 if PopupComponent is TCoolDockHeader then 217 with TCoolDockHeader(PopupComponent) do begin 218 TCoolDockManager(Manager).HeaderPos := hpLeft; 219 end; 209 220 end; 210 221 211 222 procedure TCoolDockPopupMenu.PopupMenuPositionRightClick(Sender: TObject); 212 223 begin 213 TCoolDockManager(Manager).HeaderPos := hpRight; 224 if PopupComponent is TPageControl then 225 with TPageControl(PopupComponent) do begin 226 TCoolDockStyleTabs(TCoolDockManager(Manager).DockStyleHandler).TabsPos := hpRight; 227 end else 228 if PopupComponent is TCoolDockHeader then 229 with TCoolDockHeader(PopupComponent) do begin 230 TCoolDockManager(Manager).HeaderPos := hpRight; 231 end; 214 232 end; 215 233 216 234 procedure TCoolDockPopupMenu.PopupMenuPositionTopClick(Sender: TObject); 217 235 begin 218 TCoolDockManager(Manager).HeaderPos := hpTop; 236 if PopupComponent is TPageControl then 237 with TPageControl(PopupComponent) do begin 238 TCoolDockStyleTabs(TCoolDockManager(Manager).DockStyleHandler).TabsPos := hpTop; 239 end else 240 if PopupComponent is TCoolDockHeader then 241 with TCoolDockHeader(PopupComponent) do begin 242 TCoolDockManager(Manager).HeaderPos := hpTop; 243 end; 219 244 end; 220 245 221 246 procedure TCoolDockPopupMenu.PopupMenuPositionBottomClick(Sender: TObject); 222 247 begin 223 TCoolDockManager(Manager).HeaderPos := hpBottom; 248 if PopupComponent is TPageControl then 249 with TPageControl(PopupComponent) do begin 250 TCoolDockStyleTabs(TCoolDockManager(Manager).DockStyleHandler).TabsPos := hpBottom; 251 end else 252 if PopupComponent is TCoolDockHeader then 253 with TCoolDockHeader(PopupComponent) do begin 254 TCoolDockManager(Manager).HeaderPos := hpBottom; 255 end; 224 256 end; 225 257
Note:
See TracChangeset
for help on using the changeset viewer.