Changeset 23 for branches/Xvcl/Xvcl.Controls.pas
- Timestamp:
- May 8, 2013, 1:52:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Xvcl/Xvcl.Controls.pas
r21 r23 23 23 TMessageMouseDown = class(TMessageMouse); 24 24 TMessageMouseUp = class(TMessageMouse); 25 TMessageMouseMove = class(TMessageMouse); 25 26 26 27 TKeyState = (ksShift, ksAlt, ksOS); … … 37 38 Control: TControl; 38 39 function AdjustPos(Position: TPoint): TPoint; override; 40 end; 41 42 TControlMove = class 43 Control: TControl; 44 StartControlPos: TPoint; 45 StartMousePos: TPoint; 46 Active: Boolean; 39 47 end; 40 48 … … 54 62 protected 55 63 function GetVideoDevice: TVideoDevice; virtual; 56 public57 Controls: TList<TControl>;58 64 function HandleMessage(Message: TMessage): Boolean; virtual; 65 public 66 Move: TControlMove; 59 67 function ClientToScreen(Position: TPoint): TPoint; virtual; 60 68 function ScreenToClient(Position: TPoint): TPoint; virtual; … … 75 83 TWinControl = class(TControl) 76 84 protected 85 function HandleMessage(Message: TMessage): Boolean; override; 77 86 public 78 87 Controls: TList<TControl>; 79 function HandleMessage(Message: TMessage): Boolean; override;88 procedure Paint; override; 80 89 constructor Create; override; 81 90 destructor Destroy; override; … … 115 124 begin 116 125 inherited; 117 Controls := TList<TControl>.Create;126 Move := TControlMove.Create; 118 127 end; 119 128 120 129 destructor TControl.Destroy; 121 130 begin 122 Controls.Destroy;131 Move.Destroy; 123 132 if Assigned(FCanvas) then FCanvas.Destroy; 124 133 inherited; … … 159 168 160 169 procedure TControl.Paint; 161 var 162 C: TControl; 163 begin 164 for C in Controls do C.Paint; 170 begin 165 171 end; 166 172 … … 267 273 end; 268 274 275 procedure TWinControl.Paint; 276 var 277 C: TControl; 278 begin 279 inherited; 280 for C in Controls do C.Paint; 281 end; 282 269 283 { TLabel } 270 284
Note:
See TracChangeset
for help on using the changeset viewer.