mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 12:38:05 +02:00
Changes all dynamic methods in the ide, lclintf and lcl to virtual methods, because they are the same in fpc and dynamic is a legacy directive
git-svn-id: trunk@21280 -
This commit is contained in:
parent
bdbbb068ca
commit
9d1b80451a
@ -64,7 +64,7 @@ type
|
||||
destructor Destroy; override;
|
||||
function Add(Item: Pointer): Integer;
|
||||
function AddObject(Item, Associated: Pointer): Integer;
|
||||
procedure Clear; dynamic;
|
||||
procedure Clear; virtual;
|
||||
procedure Delete(Index: Integer);
|
||||
procedure Exchange(Index1, Index2: Integer);
|
||||
function First: Pointer;
|
||||
|
@ -351,18 +351,18 @@ type
|
||||
procedure Modified;
|
||||
function ValueAvailable: Boolean;
|
||||
procedure ListMeasureWidth(const AValue: ansistring; Index:integer;
|
||||
ACanvas:TCanvas; var AWidth: Integer); dynamic;
|
||||
ACanvas:TCanvas; var AWidth: Integer); virtual;
|
||||
procedure ListMeasureHeight(const AValue: ansistring; Index:integer;
|
||||
ACanvas:TCanvas; var AHeight: Integer); dynamic;
|
||||
ACanvas:TCanvas; var AHeight: Integer); virtual;
|
||||
procedure ListDrawValue(const AValue: ansistring; Index:integer;
|
||||
ACanvas:TCanvas; const ARect: TRect;
|
||||
AState: TPropEditDrawState); dynamic;
|
||||
AState: TPropEditDrawState); virtual;
|
||||
procedure PropMeasureHeight(const NewValue: ansistring; ACanvas: TCanvas;
|
||||
var AHeight:Integer); dynamic;
|
||||
var AHeight:Integer); virtual;
|
||||
procedure PropDrawName(ACanvas: TCanvas; const ARect:TRect;
|
||||
AState: TPropEditDrawState); dynamic;
|
||||
AState: TPropEditDrawState); virtual;
|
||||
procedure PropDrawValue(ACanvas:TCanvas; const ARect:TRect;
|
||||
AState:TPropEditDrawState); dynamic;
|
||||
AState:TPropEditDrawState); virtual;
|
||||
procedure UpdateSubProperties; virtual;
|
||||
function SubPropertiesNeedsUpdate: boolean; virtual;
|
||||
function IsDefaultValue: boolean; virtual;
|
||||
|
@ -184,7 +184,7 @@ type
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
function DoHint(var HintStr: string): Boolean; dynamic;
|
||||
function DoHint(var HintStr: string): Boolean; virtual;
|
||||
function Execute: Boolean; override;
|
||||
public
|
||||
property AutoCheck: Boolean
|
||||
|
@ -61,8 +61,8 @@ type
|
||||
procedure DefineProperties(Filer: TFiler); override;
|
||||
procedure ReadData(Stream: TStream);
|
||||
procedure WriteData(Stream: TStream);
|
||||
procedure ClickCheck; dynamic;
|
||||
procedure ItemClick(const AIndex: Integer); dynamic;
|
||||
procedure ClickCheck; virtual;
|
||||
procedure ItemClick(const AIndex: Integer); virtual;
|
||||
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
|
||||
procedure FontChanged(Sender: TObject); override;
|
||||
procedure ParentFontChanged; override;
|
||||
|
@ -64,7 +64,7 @@ type
|
||||
procedure SetColorList;
|
||||
procedure Loaded; override;
|
||||
procedure InitializeWnd; override;
|
||||
procedure DoGetColors; dynamic;
|
||||
procedure DoGetColors; virtual;
|
||||
procedure Change; override;
|
||||
function PickCustomColor: Boolean; virtual;
|
||||
public
|
||||
@ -167,7 +167,7 @@ type
|
||||
procedure SetColorList;
|
||||
procedure Loaded; override;
|
||||
procedure InitializeWnd; override;
|
||||
procedure DoGetColors; dynamic;
|
||||
procedure DoGetColors; virtual;
|
||||
procedure DoSelectionChange(User: Boolean); override;
|
||||
function PickCustomColor: Boolean; virtual;
|
||||
public
|
||||
|
@ -157,7 +157,7 @@ type
|
||||
|
||||
function DoSetApplicationHint(AHintStr: String): Boolean; virtual;
|
||||
function DoHint: Boolean; virtual;
|
||||
procedure DrawPanel(Panel: TStatusPanel; const Rect: TRect); dynamic;
|
||||
procedure DrawPanel(Panel: TStatusPanel; const Rect: TRect); virtual;
|
||||
procedure LMDrawItem(var Message: TLMDrawItems); message LM_DRAWITEM;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
@ -487,9 +487,9 @@ type
|
||||
procedure SetTabs(const AValue: TStrings);
|
||||
procedure SetTabWidth(const AValue: Smallint);
|
||||
protected
|
||||
function CanChange: Boolean; dynamic;
|
||||
function CanChange: Boolean; virtual;
|
||||
function CanShowTab(ATabIndex: Integer): Boolean; virtual;
|
||||
procedure Change; dynamic;
|
||||
procedure Change; virtual;
|
||||
procedure DrawTab(ATabIndex: Integer; const Rect: TRect; Active: Boolean); virtual;
|
||||
function GetImageIndex(ATabIndex: Integer): Integer; virtual;
|
||||
procedure Loaded; override;
|
||||
@ -992,13 +992,13 @@ type
|
||||
|
||||
procedure DestroyWnd; override;
|
||||
procedure BeginAutoDrag; override;
|
||||
procedure Change(AItem: TListItem; AChange: Integer); dynamic;
|
||||
procedure ColClick(AColumn: TListColumn); dynamic;
|
||||
procedure Change(AItem: TListItem; AChange: Integer); virtual;
|
||||
procedure ColClick(AColumn: TListColumn); virtual;
|
||||
|
||||
procedure Delete(Item : TListItem);
|
||||
procedure DoDeletion(AItem: TListItem); dynamic;
|
||||
procedure DoInsert(AItem: TListItem); dynamic;
|
||||
procedure DoSelectItem(AItem: TListItem; ASelected: Boolean); dynamic;
|
||||
procedure DoDeletion(AItem: TListItem); virtual;
|
||||
procedure DoInsert(AItem: TListItem); virtual;
|
||||
procedure DoSelectItem(AItem: TListItem; ASelected: Boolean); virtual;
|
||||
procedure InsertItem(Item : TListItem);
|
||||
procedure ImageChanged(Sender : TObject);
|
||||
procedure Loaded; override;
|
||||
@ -1299,9 +1299,9 @@ type
|
||||
procedure OnAssociateChangeBounds(Sender: TObject);
|
||||
procedure DoOnResize; override;
|
||||
class function GetControlClassDefaultSize: TPoint; override;
|
||||
function CanChange: Boolean; dynamic;
|
||||
function CanChange: Boolean; virtual;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
procedure Click(Button: TUDBtnType); dynamic; overload;
|
||||
procedure Click(Button: TUDBtnType); virtual; overload;
|
||||
property AlignButton: TUDAlignButton read FAlignButton write SetAlignButton default udRight;
|
||||
property ArrowKeys: Boolean read FArrowKeys write SetArrowKeys default True;
|
||||
property Associate: TWinControl read FAssociate write SetAssociate;
|
||||
@ -1463,7 +1463,7 @@ type
|
||||
procedure DoAutoSize; override;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
function CheckMenuDropdown: Boolean; dynamic;
|
||||
function CheckMenuDropdown: Boolean; virtual;
|
||||
procedure Click; override;
|
||||
procedure GetCurrentIcon(var ImageList: TCustomImageList;
|
||||
var TheIndex: integer); virtual;
|
||||
@ -1577,8 +1577,8 @@ type
|
||||
procedure DoAutoSize; override;
|
||||
procedure CalculatePreferredSize(var PreferredWidth,
|
||||
PreferredHeight: integer; WithThemeSpace: Boolean); override;
|
||||
function CheckMenuDropdown(Button: TToolButton): Boolean; dynamic;
|
||||
procedure ClickButton(Button: TToolButton); dynamic;
|
||||
function CheckMenuDropdown(Button: TToolButton): Boolean; virtual;
|
||||
procedure ClickButton(Button: TToolButton); virtual;
|
||||
procedure CreateParams(var Params: TCreateParams); override;
|
||||
procedure CreateWnd; override;
|
||||
procedure ControlsAligned; override;
|
||||
@ -2317,10 +2317,10 @@ type
|
||||
procedure BeginAutoDrag; override;
|
||||
procedure BeginEditing;
|
||||
function DoDragMsg(ADragMessage: TDragMessage; APosition: TPoint; ADragObject: TDragObject; ATarget: TControl; ADocking: Boolean): LRESULT; override;
|
||||
function CanChange(Node: TTreeNode): Boolean; dynamic;
|
||||
function CanCollapse(Node: TTreeNode): Boolean; dynamic;
|
||||
function CanEdit(Node: TTreeNode): Boolean; dynamic;
|
||||
function CanExpand(Node: TTreeNode): Boolean; dynamic;
|
||||
function CanChange(Node: TTreeNode): Boolean; virtual;
|
||||
function CanCollapse(Node: TTreeNode): Boolean; virtual;
|
||||
function CanEdit(Node: TTreeNode): Boolean; virtual;
|
||||
function CanExpand(Node: TTreeNode): Boolean; virtual;
|
||||
function CreateNode: TTreeNode; virtual;
|
||||
function CustomDraw(const ARect: TRect;
|
||||
Stage: TCustomDrawStage): Boolean; virtual;
|
||||
@ -2339,11 +2339,11 @@ type
|
||||
function IsNodeVisible(ANode: TTreeNode): Boolean;
|
||||
function IsNodeHeightFullVisible(ANode: TTreeNode): Boolean;
|
||||
function IsInsertMarkVisible: boolean; virtual;
|
||||
procedure Change(Node: TTreeNode); dynamic;
|
||||
procedure Collapse(Node: TTreeNode); dynamic;
|
||||
procedure Change(Node: TTreeNode); virtual;
|
||||
procedure Collapse(Node: TTreeNode); virtual;
|
||||
procedure CreateParams(var Params: TCreateParams); override;
|
||||
procedure CreateWnd; override;
|
||||
procedure Delete(Node: TTreeNode); dynamic;
|
||||
procedure Delete(Node: TTreeNode); virtual;
|
||||
procedure DestroyWnd; override;
|
||||
procedure DoEndDrag(Target: TObject; X, Y: Integer); override;
|
||||
function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer;
|
||||
@ -2355,7 +2355,7 @@ type
|
||||
var Accept: Boolean); override;
|
||||
procedure EndEditing(Cancel: boolean = false);
|
||||
procedure EnsureNodeIsVisible(ANode: TTreeNode);
|
||||
procedure Expand(Node: TTreeNode); dynamic;
|
||||
procedure Expand(Node: TTreeNode); virtual;
|
||||
procedure GetImageIndex(Node: TTreeNode); virtual;
|
||||
procedure GetSelectedIndex(Node: TTreeNode); virtual;
|
||||
procedure InitializeWnd; override;
|
||||
@ -2718,12 +2718,12 @@ type
|
||||
function CreateSection: THeaderSection; virtual;
|
||||
function CreateSections: THeaderSections; virtual;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
procedure SectionClick(Section: THeaderSection); dynamic;
|
||||
procedure SectionResize(Section: THeaderSection); dynamic;
|
||||
procedure SectionTrack(Section: THeaderSection; State: TSectionTrackState); dynamic;
|
||||
procedure SectionSeparatorDblClick(Section: THeaderSection); dynamic;
|
||||
procedure SectionEndDrag; dynamic;
|
||||
function SectionDrag(FromSection, ToSection: THeaderSection): Boolean; dynamic;
|
||||
procedure SectionClick(Section: THeaderSection); virtual;
|
||||
procedure SectionResize(Section: THeaderSection); virtual;
|
||||
procedure SectionTrack(Section: THeaderSection; State: TSectionTrackState); virtual;
|
||||
procedure SectionSeparatorDblClick(Section: THeaderSection); virtual;
|
||||
procedure SectionEndDrag; virtual;
|
||||
function SectionDrag(FromSection, ToSection: THeaderSection): Boolean; virtual;
|
||||
procedure MouseEnter; override;
|
||||
procedure MouseLeave; override;
|
||||
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
|
||||
|
126
lcl/controls.pp
126
lcl/controls.pp
@ -535,7 +535,7 @@ type
|
||||
FOptions: TSizeConstraintsOptions;
|
||||
procedure SetOptions(const AValue: TSizeConstraintsOptions);
|
||||
protected
|
||||
procedure Change; dynamic;
|
||||
procedure Change; virtual;
|
||||
procedure AssignTo(Dest: TPersistent); override;
|
||||
procedure SetMaxHeight(Value: TConstraintSize); virtual;
|
||||
procedure SetMaxWidth(Value: TConstraintSize); virtual;
|
||||
@ -652,7 +652,7 @@ type
|
||||
procedure SetSpace(Kind: TAnchorKind; const AValue: integer);
|
||||
procedure SetTop(const AValue: TSpacingSize);
|
||||
protected
|
||||
procedure Change(InnerSpaceChanged: Boolean); dynamic;
|
||||
procedure Change(InnerSpaceChanged: Boolean); virtual;
|
||||
public
|
||||
constructor Create(OwnerControl: TControl; ADefault: PControlBorderSpacingDefault = nil);
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
@ -992,7 +992,7 @@ type
|
||||
procedure SetAlign(Value: TAlign); virtual;
|
||||
procedure SetAnchors(const AValue: TAnchors); virtual;
|
||||
procedure SetAutoSize(Value: Boolean); virtual;
|
||||
procedure BoundsChanged; dynamic;
|
||||
procedure BoundsChanged; virtual;
|
||||
function CreateControlBorderSpacing: TControlBorderSpacing; virtual;
|
||||
procedure DoConstraintsChange(Sender: TObject); virtual;
|
||||
procedure DoBorderSpacingChange(Sender: TObject;
|
||||
@ -1008,11 +1008,11 @@ type
|
||||
procedure DoOnChangeBounds; virtual;// call OnChangeBounds
|
||||
procedure CheckOnChangeBounds;// checks for changes and calls DoOnChangeBounds
|
||||
procedure Resize; virtual;// checks for changes and calls DoOnResize
|
||||
procedure RequestAlign; dynamic;// smart calling Parent.AlignControls
|
||||
procedure RequestAlign; virtual;// smart calling Parent.AlignControls
|
||||
procedure UpdateAnchorRules;
|
||||
procedure ChangeBounds(ALeft, ATop, AWidth, AHeight: integer); virtual;
|
||||
procedure DoSetBounds(ALeft, ATop, AWidth, AHeight: integer); virtual;
|
||||
procedure ChangeScale(Multiplier, Divider: Integer); dynamic;
|
||||
procedure ChangeScale(Multiplier, Divider: Integer); virtual;
|
||||
function CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; virtual;
|
||||
procedure SetAlignedBounds(aLeft, aTop, aWidth, aHeight: integer); virtual;
|
||||
procedure SetBiDiMode(AValue: TBiDiMode); virtual;
|
||||
@ -1076,35 +1076,35 @@ type
|
||||
// drag and drop
|
||||
procedure CalculateDockSizes;
|
||||
function CreateFloatingDockSite(const Bounds: TRect): TWinControl;
|
||||
function GetDockEdge(const MousePos: TPoint): TAlign; dynamic;
|
||||
function GetDockEdge(const MousePos: TPoint): TAlign; virtual;
|
||||
function GetDragImages: TDragImageList; virtual;
|
||||
function GetFloating: Boolean; virtual;
|
||||
function GetFloatingDockSiteClass: TWinControlClass; virtual;
|
||||
procedure BeginAutoDrag; dynamic;
|
||||
procedure DoFloatMsg(ADockSource: TDragDockObject);dynamic;//CM_FLOAT
|
||||
procedure DockTrackNoTarget(Source: TDragDockObject; X, Y: Integer); dynamic;
|
||||
procedure DoDock(NewDockSite: TWinControl; var ARect: TRect); dynamic;
|
||||
procedure BeginAutoDrag; virtual;
|
||||
procedure DoFloatMsg(ADockSource: TDragDockObject);virtual;//CM_FLOAT
|
||||
procedure DockTrackNoTarget(Source: TDragDockObject; X, Y: Integer); virtual;
|
||||
procedure DoDock(NewDockSite: TWinControl; var ARect: TRect); virtual;
|
||||
function DoDragMsg(ADragMessage: TDragMessage; APosition: TPoint; ADragObject: TDragObject; ATarget: TControl; ADocking: Boolean):LRESULT; virtual;//Cm_Drag
|
||||
procedure DoEndDock(Target: TObject; X, Y: Integer); dynamic;
|
||||
procedure DoEndDrag(Target: TObject; X,Y: Integer); dynamic;
|
||||
procedure DoStartDock(var DragObject: TDragObject); dynamic;
|
||||
procedure DoStartDrag(var DragObject: TDragObject); dynamic;
|
||||
procedure DragCanceled; dynamic;
|
||||
procedure DoEndDock(Target: TObject; X, Y: Integer); virtual;
|
||||
procedure DoEndDrag(Target: TObject; X,Y: Integer); virtual;
|
||||
procedure DoStartDock(var DragObject: TDragObject); virtual;
|
||||
procedure DoStartDrag(var DragObject: TDragObject); virtual;
|
||||
procedure DragCanceled; virtual;
|
||||
procedure DragOver(Source: TObject; X,Y: Integer; State: TDragState;
|
||||
var Accept: Boolean); dynamic;
|
||||
procedure PositionDockRect(DragDockObject: TDragDockObject); dynamic;
|
||||
var Accept: Boolean); virtual;
|
||||
procedure PositionDockRect(DragDockObject: TDragDockObject); virtual;
|
||||
procedure SetDragMode(Value: TDragMode); virtual;
|
||||
function GetDefaultDockCaption: String; virtual;
|
||||
//procedure SendDockNotification; virtual; MG: probably not needed
|
||||
protected
|
||||
// key and mouse
|
||||
procedure Click; dynamic;
|
||||
procedure DblClick; dynamic;
|
||||
procedure TripleClick; dynamic;
|
||||
procedure QuadClick; dynamic;
|
||||
procedure MouseDown(Button: TMouseButton; Shift:TShiftState; X,Y:Integer); dynamic;
|
||||
procedure MouseMove(Shift: TShiftState; X,Y: Integer); Dynamic;
|
||||
procedure MouseUp(Button: TMouseButton; Shift:TShiftState; X,Y:Integer); dynamic;
|
||||
procedure Click; virtual;
|
||||
procedure DblClick; virtual;
|
||||
procedure TripleClick; virtual;
|
||||
procedure QuadClick; virtual;
|
||||
procedure MouseDown(Button: TMouseButton; Shift:TShiftState; X,Y:Integer); virtual;
|
||||
procedure MouseMove(Shift: TShiftState; X,Y: Integer); virtual;
|
||||
procedure MouseUp(Button: TMouseButton; Shift:TShiftState; X,Y:Integer); virtual;
|
||||
procedure MouseEnter; virtual;
|
||||
procedure MouseLeave; virtual;
|
||||
function DialogChar(var Message: TLMKey): boolean; virtual;
|
||||
@ -1140,13 +1140,13 @@ type
|
||||
function CanTab: Boolean; virtual;
|
||||
function GetDeviceContext(var WindowHandle: HWnd): HDC; virtual;
|
||||
function GetEnabled: Boolean; virtual;
|
||||
function GetPopupMenu: TPopupMenu; dynamic;
|
||||
function GetPopupMenu: TPopupMenu; virtual;
|
||||
procedure DoOnShowHint(HintInfo: Pointer);
|
||||
function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; dynamic;
|
||||
function DoMouseWheelDown(Shift: TShiftState; MousePos: TPoint): Boolean; dynamic;
|
||||
function DoMouseWheelUp(Shift: TShiftState; MousePos: TPoint): Boolean; dynamic;
|
||||
procedure VisibleChanging; dynamic;
|
||||
procedure VisibleChanged; dynamic;
|
||||
function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; virtual;
|
||||
function DoMouseWheelDown(Shift: TShiftState; MousePos: TPoint): Boolean; virtual;
|
||||
function DoMouseWheelUp(Shift: TShiftState; MousePos: TPoint): Boolean; virtual;
|
||||
procedure VisibleChanging; virtual;
|
||||
procedure VisibleChanged; virtual;
|
||||
procedure AddHandler(HandlerType: TControlHandlerType;
|
||||
const AMethod: TMethod; AsLast: boolean = false);
|
||||
procedure RemoveHandler(HandlerType: TControlHandlerType;
|
||||
@ -1158,8 +1158,8 @@ type
|
||||
function ColorIsStored: boolean; virtual;
|
||||
protected
|
||||
// actions
|
||||
function GetActionLinkClass: TControlActionLinkClass; dynamic;
|
||||
procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); dynamic;
|
||||
function GetActionLinkClass: TControlActionLinkClass; virtual;
|
||||
procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); virtual;
|
||||
protected
|
||||
// optional properties (not every descendent supports them)
|
||||
property ActionLink: TControlActionLink read FActionLink write FActionLink;
|
||||
@ -1199,14 +1199,14 @@ type
|
||||
// So, don't use it anymore.
|
||||
public
|
||||
// drag and dock
|
||||
procedure DragDrop(Source: TObject; X,Y: Integer); dynamic;
|
||||
procedure Dock(NewDockSite: TWinControl; ARect: TRect); dynamic;
|
||||
procedure DragDrop(Source: TObject; X,Y: Integer); virtual;
|
||||
procedure Dock(NewDockSite: TWinControl; ARect: TRect); virtual;
|
||||
function ManualDock(NewDockSite: TWinControl;
|
||||
DropControl: TControl = nil;
|
||||
ControlSide: TAlign = alNone;
|
||||
KeepDockSiteSize: Boolean = true): Boolean; dynamic;
|
||||
KeepDockSiteSize: Boolean = true): Boolean; virtual;
|
||||
function ManualFloat(TheScreenRect: TRect;
|
||||
KeepDockSiteSize: Boolean = true): Boolean; dynamic;
|
||||
KeepDockSiteSize: Boolean = true): Boolean; virtual;
|
||||
function ReplaceDockedControl(Control: TControl; NewDockSite: TWinControl;
|
||||
DropControl: TControl; ControlSide: TAlign): Boolean;
|
||||
function Dragging: Boolean;
|
||||
@ -1496,7 +1496,7 @@ type
|
||||
procedure SetTopBottomSpacing(const AValue: integer);
|
||||
procedure SetVerticalSpacing(const AValue: integer);
|
||||
protected
|
||||
procedure Change; dynamic;
|
||||
procedure Change; virtual;
|
||||
public
|
||||
constructor Create(OwnerControl: TWinControl);
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
@ -1712,45 +1712,45 @@ type
|
||||
TControl; ADocking: Boolean): LRESULT; override;
|
||||
function DoDockClientMsg(DragDockObject: TDragDockObject; Position: TPoint): boolean; virtual;
|
||||
function DoUndockClientMsg(NewTarget, Client: TControl):boolean; virtual;
|
||||
procedure DoAddDockClient(Client: TControl; const ARect: TRect); dynamic;
|
||||
procedure DoAddDockClient(Client: TControl; const ARect: TRect); virtual;
|
||||
procedure DockOver(Source: TDragDockObject; X, Y: Integer;
|
||||
State: TDragState; var Accept: Boolean); dynamic;
|
||||
State: TDragState; var Accept: Boolean); virtual;
|
||||
procedure DoDockOver(Source: TDragDockObject; X, Y: Integer;
|
||||
State: TDragState; var Accept: Boolean); dynamic;
|
||||
procedure DoRemoveDockClient(Client: TControl); dynamic;
|
||||
State: TDragState; var Accept: Boolean); virtual;
|
||||
procedure DoRemoveDockClient(Client: TControl); virtual;
|
||||
function DoUnDock(NewTarget: TWinControl; Client: TControl;
|
||||
KeepDockSiteSize: Boolean = true): Boolean; dynamic;
|
||||
KeepDockSiteSize: Boolean = true): Boolean; virtual;
|
||||
procedure GetSiteInfo(Client: TControl; var InfluenceRect: TRect;
|
||||
MousePos: TPoint; var CanDock: Boolean); dynamic;
|
||||
MousePos: TPoint; var CanDock: Boolean); virtual;
|
||||
procedure ReloadDockedControl(const AControlName: string;
|
||||
var AControl: TControl); dynamic;
|
||||
function CreateDockManager: TDockManager; dynamic;
|
||||
var AControl: TControl); virtual;
|
||||
function CreateDockManager: TDockManager; virtual;
|
||||
procedure SetDockManager(AMgr: TDockManager);
|
||||
procedure DoFloatMsg(ADockSource: TDragDockObject); override;//CM_FLOAT
|
||||
procedure DoGetDockCaption(AControl: TControl; var ACaption: String); virtual;
|
||||
protected
|
||||
// mouse and keyboard
|
||||
procedure DoEnter; dynamic;
|
||||
procedure DoExit; dynamic;
|
||||
procedure DoEnter; virtual;
|
||||
procedure DoExit; virtual;
|
||||
function DoKeyDownBeforeInterface(var Message: TLMKey): Boolean;
|
||||
function DoRemainingKeyDown(var Message: TLMKeyDown): Boolean;
|
||||
function DoRemainingKeyUp(var Message: TLMKeyDown): Boolean;
|
||||
function DoKeyPress(var Message: TLMKey): Boolean;
|
||||
function DoUTF8KeyPress(var UTF8Key: TUTF8Char): boolean; dynamic;
|
||||
function DoUTF8KeyPress(var UTF8Key: TUTF8Char): boolean; virtual;
|
||||
function DoKeyUpBeforeInterface(var Message: TLMKey): Boolean;
|
||||
function ChildKey(var Message: TLMKey): boolean; dynamic;
|
||||
function ChildKey(var Message: TLMKey): boolean; virtual;
|
||||
function SendDialogChar(var Message: TLMKey): Boolean;
|
||||
function DialogChar(var Message: TLMKey): boolean; override;
|
||||
procedure ControlKeyDown(var Key: Word; Shift: TShiftState); dynamic;
|
||||
procedure ControlKeyUp(var Key: Word; Shift: TShiftState); dynamic;
|
||||
procedure KeyDown(var Key: Word; Shift: TShiftState); dynamic;
|
||||
procedure KeyDownBeforeInterface(var Key: Word; Shift: TShiftState); dynamic;
|
||||
procedure KeyDownAfterInterface(var Key: Word; Shift: TShiftState); dynamic;
|
||||
procedure KeyPress(var Key: char); dynamic;
|
||||
procedure KeyUp(var Key: Word; Shift: TShiftState); dynamic;
|
||||
procedure KeyUpBeforeInterface(var Key: Word; Shift: TShiftState); dynamic;
|
||||
procedure KeyUpAfterInterface(var Key: Word; Shift: TShiftState); dynamic;
|
||||
procedure UTF8KeyPress(var UTF8Key: TUTF8Char); dynamic;
|
||||
procedure ControlKeyDown(var Key: Word; Shift: TShiftState); virtual;
|
||||
procedure ControlKeyUp(var Key: Word; Shift: TShiftState); virtual;
|
||||
procedure KeyDown(var Key: Word; Shift: TShiftState); virtual;
|
||||
procedure KeyDownBeforeInterface(var Key: Word; Shift: TShiftState); virtual;
|
||||
procedure KeyDownAfterInterface(var Key: Word; Shift: TShiftState); virtual;
|
||||
procedure KeyPress(var Key: char); virtual;
|
||||
procedure KeyUp(var Key: Word; Shift: TShiftState); virtual;
|
||||
procedure KeyUpBeforeInterface(var Key: Word; Shift: TShiftState); virtual;
|
||||
procedure KeyUpAfterInterface(var Key: Word; Shift: TShiftState); virtual;
|
||||
procedure UTF8KeyPress(var UTF8Key: TUTF8Char); virtual;
|
||||
protected
|
||||
function FindNextControl(CurrentControl: TWinControl; GoForward,
|
||||
CheckTabStop, CheckParent: Boolean): TWinControl;
|
||||
@ -1767,7 +1767,7 @@ type
|
||||
procedure CreateWnd; virtual; //creates the window
|
||||
procedure DestroyHandle; virtual;
|
||||
procedure DestroyWnd; virtual;
|
||||
procedure DoFlipChildren; dynamic;
|
||||
procedure DoFlipChildren; virtual;
|
||||
procedure FinalizeWnd; virtual; // gets called before the Handle is destroyed.
|
||||
procedure FixupTabList;
|
||||
procedure FontChanged(Sender: TObject); override;
|
||||
@ -1854,7 +1854,7 @@ type
|
||||
constructor CreateParented(ParentWindow: HWnd);
|
||||
class function CreateParentedControl(ParentWindow: HWnd): TWinControl;
|
||||
destructor Destroy; override;
|
||||
procedure DockDrop(DragDockObject: TDragDockObject; X, Y: Integer); dynamic;
|
||||
procedure DockDrop(DragDockObject: TDragDockObject; X, Y: Integer); virtual;
|
||||
function CanFocus: Boolean; virtual;
|
||||
function GetControlIndex(AControl: TControl): integer;
|
||||
procedure SetControlIndex(AControl: TControl; NewIndex: integer);
|
||||
@ -1877,7 +1877,7 @@ type
|
||||
procedure Update; override;
|
||||
procedure SetFocus; virtual;
|
||||
function FindChildControl(const ControlName: String): TControl;
|
||||
procedure FlipChildren(AllLevels: Boolean); dynamic;
|
||||
procedure FlipChildren(AllLevels: Boolean); virtual;
|
||||
function GetDockCaption(AControl: TControl): String; virtual;
|
||||
procedure GetTabOrderList(List: TFPList);
|
||||
function HandleAllocated: Boolean;
|
||||
@ -1886,7 +1886,7 @@ type
|
||||
function BrushCreated: Boolean;
|
||||
procedure EraseBackground(DC: HDC); virtual;
|
||||
function IntfUTF8KeyPress(var UTF8Key: TUTF8Char;
|
||||
RepeatCount: integer; SystemKey: boolean): boolean; dynamic;
|
||||
RepeatCount: integer; SystemKey: boolean): boolean; virtual;
|
||||
procedure PaintTo(DC: HDC; X, Y: Integer); virtual; overload;
|
||||
procedure PaintTo(ACanvas: TCanvas; X, Y: Integer); overload;
|
||||
procedure SetShape(AShape: TBitmap); overload;
|
||||
|
@ -68,8 +68,8 @@ type
|
||||
function GetPageIndex: integer;
|
||||
procedure SetPageIndex(AValue: Integer);
|
||||
function DialogChar(var Message: TLMKey): boolean; override;
|
||||
procedure DoHide; dynamic;
|
||||
procedure DoShow; dynamic;
|
||||
procedure DoHide; virtual;
|
||||
procedure DoShow; virtual;
|
||||
procedure DestroyHandle; override;
|
||||
procedure RealSetText(const AValue: TCaption); override;
|
||||
public
|
||||
|
@ -138,9 +138,9 @@ type
|
||||
function TitleStored: Boolean;
|
||||
protected
|
||||
class procedure WSRegisterClass; override;
|
||||
procedure Change; dynamic;
|
||||
procedure CalcKey(var Key: char); dynamic;
|
||||
procedure DisplayChange; dynamic;
|
||||
procedure Change; virtual;
|
||||
procedure CalcKey(var Key: char); virtual;
|
||||
procedure DisplayChange; virtual;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
|
20
lcl/forms.pp
20
lcl/forms.pp
@ -473,25 +473,25 @@ type
|
||||
FActionLists: TList;
|
||||
class procedure WSRegisterClass; override;
|
||||
procedure CMShowingChanged(var Message: TLMessage); message CM_SHOWINGCHANGED;
|
||||
procedure DoShowWindow; dynamic;
|
||||
procedure Activate; dynamic;
|
||||
procedure ActiveChanged; dynamic;
|
||||
procedure DoShowWindow; virtual;
|
||||
procedure Activate; virtual;
|
||||
procedure ActiveChanged; virtual;
|
||||
procedure AdjustClientRect(var Rect: TRect); override;
|
||||
procedure BeginFormUpdate;
|
||||
function ColorIsStored: boolean; override;
|
||||
procedure CreateParams(var Params: TCreateParams); override;
|
||||
procedure CreateWnd; override;
|
||||
procedure Deactivate; dynamic;
|
||||
procedure DoClose(var CloseAction: TCloseAction); dynamic;
|
||||
procedure Deactivate; virtual;
|
||||
procedure DoClose(var CloseAction: TCloseAction); virtual;
|
||||
procedure DoCreate; virtual;
|
||||
procedure DoDestroy; virtual;
|
||||
procedure DoHide; dynamic;
|
||||
procedure DoShow; dynamic;
|
||||
procedure DoHide; virtual;
|
||||
procedure DoShow; virtual;
|
||||
procedure EndFormUpdate;
|
||||
procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;
|
||||
function HandleCreateException: Boolean; dynamic;
|
||||
function HandleDestroyException: Boolean; dynamic;
|
||||
function HandleShowHideException: Boolean; dynamic;
|
||||
function HandleCreateException: Boolean; virtual;
|
||||
function HandleDestroyException: Boolean; virtual;
|
||||
function HandleShowHideException: Boolean; virtual;
|
||||
procedure Loaded; override;
|
||||
procedure ChildHandlesCreated; override;
|
||||
procedure Notification(AComponent: TComponent; Operation : TOperation);override;
|
||||
|
@ -439,8 +439,8 @@ type
|
||||
FOnChange: TNotifyEvent;
|
||||
procedure DoChange(var Msg); message LM_CHANGED;
|
||||
protected
|
||||
procedure Changing; dynamic;
|
||||
procedure Changed; dynamic;
|
||||
procedure Changing; virtual;
|
||||
procedure Changed; virtual;
|
||||
procedure Lock;
|
||||
procedure UnLock;
|
||||
public
|
||||
@ -772,10 +772,10 @@ type
|
||||
function GetWidth: Integer; virtual; abstract;
|
||||
procedure Progress(Sender: TObject; Stage: TProgressStage;
|
||||
PercentDone: Byte; RedrawNow: Boolean; const R: TRect;
|
||||
const Msg: string; var DoContinue: boolean); dynamic;
|
||||
const Msg: string; var DoContinue: boolean); virtual;
|
||||
procedure Progress(Sender: TObject; Stage: TProgressStage;
|
||||
PercentDone: Byte; RedrawNow: Boolean; const R: TRect;
|
||||
const Msg: string); dynamic;
|
||||
const Msg: string); virtual;
|
||||
procedure ReadData(Stream: TStream); virtual; // used by Filer
|
||||
procedure SetHeight(Value: Integer); virtual; abstract;
|
||||
procedure SetPalette(Value: HPALETTE); virtual;
|
||||
@ -897,11 +897,11 @@ type
|
||||
procedure WriteData(Stream: TStream);
|
||||
protected
|
||||
procedure AssignTo(Dest: TPersistent); override;
|
||||
procedure Changed(Sender: TObject); dynamic;
|
||||
procedure Changed(Sender: TObject); virtual;
|
||||
procedure DefineProperties(Filer: TFiler); override;
|
||||
procedure Progress(Sender: TObject; Stage: TProgressStage;
|
||||
PercentDone: Byte; RedrawNow: Boolean; const R: TRect;
|
||||
const Msg: string; var DoContinue: boolean); dynamic;
|
||||
const Msg: string; var DoContinue: boolean); virtual;
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
|
@ -779,24 +779,24 @@ type
|
||||
procedure AutoAdjustColumn(aCol: Integer); virtual;
|
||||
procedure BeforeMoveSelection(const DCol,DRow: Integer); virtual;
|
||||
function BoxRect(ALeft,ATop,ARight,ABottom: Longint): TRect;
|
||||
procedure CalcAutoSizeColumn(const Index: Integer; var AMin,AMax,APriority: Integer); dynamic;
|
||||
procedure CalcAutoSizeColumn(const Index: Integer; var AMin,AMax,APriority: Integer); virtual;
|
||||
procedure CalcFocusRect(var ARect: TRect);
|
||||
function CanEditShow: Boolean; virtual;
|
||||
function CanGridAcceptKey(Key: Word; Shift: TShiftState): Boolean; dynamic;
|
||||
function CanGridAcceptKey(Key: Word; Shift: TShiftState): Boolean; virtual;
|
||||
procedure CellClick(const aCol,aRow: Integer); virtual;
|
||||
procedure CheckLimits(var aCol,aRow: Integer);
|
||||
procedure CheckLimitsWithError(const aCol, aRow: Integer);
|
||||
procedure CMMouseLeave(var Message :TLMessage); message CM_MouseLeave;
|
||||
procedure ColRowDeleted(IsColumn: Boolean; index: Integer); dynamic;
|
||||
procedure ColRowExchanged(IsColumn: Boolean; index,WithIndex: Integer); dynamic;
|
||||
procedure ColRowInserted(IsColumn: boolean; index: integer); dynamic;
|
||||
procedure ColRowMoved(IsColumn: Boolean; FromIndex,ToIndex: Integer); dynamic;
|
||||
procedure ColRowDeleted(IsColumn: Boolean; index: Integer); virtual;
|
||||
procedure ColRowExchanged(IsColumn: Boolean; index,WithIndex: Integer); virtual;
|
||||
procedure ColRowInserted(IsColumn: boolean; index: integer); virtual;
|
||||
procedure ColRowMoved(IsColumn: Boolean; FromIndex,ToIndex: Integer); virtual;
|
||||
function ColRowToOffset(IsCol, Relative: Boolean; Index:Integer;
|
||||
var StartPos, EndPos: Integer): Boolean;
|
||||
function ColumnIndexFromGridColumn(Column: Integer): Integer;
|
||||
function ColumnFromGridColumn(Column: Integer): TGridColumn;
|
||||
procedure ColumnsChanged(aColumn: TGridColumn);
|
||||
procedure ColWidthsChanged; dynamic;
|
||||
procedure ColWidthsChanged; virtual;
|
||||
function CreateColumns: TGridColumns; virtual;
|
||||
procedure CheckNewCachedSizes(var AGCache:TGridDataCache); virtual;
|
||||
procedure CreateWnd; override;
|
||||
@ -805,7 +805,7 @@ type
|
||||
procedure DblClick; override;
|
||||
procedure DefineProperties(Filer: TFiler); override;
|
||||
procedure DestroyHandle; override;
|
||||
function DoCompareCells(Acol,ARow,Bcol,BRow: Integer): Integer; dynamic;
|
||||
function DoCompareCells(Acol,ARow,Bcol,BRow: Integer): Integer; virtual;
|
||||
procedure DoCopyToClipboard; virtual;
|
||||
procedure DoCutToClipboard; virtual;
|
||||
procedure DoEditorHide; virtual;
|
||||
@ -850,7 +850,7 @@ type
|
||||
function FirstGridColumn: integer; virtual;
|
||||
function FixedGrid: boolean;
|
||||
procedure FontChanged(Sender: TObject); override;
|
||||
procedure GetAutoFillColumnInfo(const Index: Integer; var aMin,aMax,aPriority: Integer); dynamic;
|
||||
procedure GetAutoFillColumnInfo(const Index: Integer; var aMin,aMax,aPriority: Integer); virtual;
|
||||
function GetColumnAlignment(Column: Integer; ForTitle: Boolean): TAlignment;
|
||||
function GetColumnColor(Column: Integer; ForTitle: Boolean): TColor;
|
||||
function GetColumnFont(Column: Integer; ForTitle: Boolean): TFont;
|
||||
@ -870,14 +870,14 @@ type
|
||||
procedure GetSBVisibility(out HsbVisible,VsbVisible:boolean);virtual;
|
||||
procedure GetSBRanges(const HsbVisible,VsbVisible: boolean;
|
||||
out HsbRange,VsbRange, HsbPage, VsbPage:Integer); virtual;
|
||||
function GetEditMask(ACol, ARow: Longint): string; dynamic;
|
||||
function GetEditText(ACol, ARow: Longint): string; dynamic;
|
||||
function GetEditMask(ACol, ARow: Longint): string; virtual;
|
||||
function GetEditText(ACol, ARow: Longint): string; virtual;
|
||||
function GetFixedcolor: TColor; virtual;
|
||||
function GetSelectedColor: TColor; virtual;
|
||||
function GridColumnFromColumnIndex(ColumnIndex: Integer): Integer;
|
||||
procedure GridMouseWheel(shift: TShiftState; Delta: Integer); virtual;
|
||||
procedure HeaderClick(IsColumn: Boolean; index: Integer); dynamic;
|
||||
procedure HeaderSized(IsColumn: Boolean; index: Integer); dynamic;
|
||||
procedure HeaderClick(IsColumn: Boolean; index: Integer); virtual;
|
||||
procedure HeaderSized(IsColumn: Boolean; index: Integer); virtual;
|
||||
procedure InternalSetColCount(ACount: Integer);
|
||||
procedure InvalidateCell(aCol, aRow: Integer; Redraw: Boolean); overload;
|
||||
procedure InvalidateRange(const aRange: TRect);
|
||||
@ -908,7 +908,7 @@ type
|
||||
procedure ResetSizes;
|
||||
procedure ResizeColumn(aCol, aWidth: Integer);
|
||||
procedure ResizeRow(aRow, aHeight: Integer);
|
||||
procedure RowHeightsChanged; dynamic;
|
||||
procedure RowHeightsChanged; virtual;
|
||||
procedure SaveContent(cfg: TXMLConfig); virtual;
|
||||
procedure ScrollBarRange(Which:Integer; aRange,aPage: Integer);
|
||||
procedure ScrollBarPosition(Which, Value: integer);
|
||||
@ -921,14 +921,14 @@ type
|
||||
procedure SetCanvasFont(aFont: TFont);
|
||||
procedure SetColor(Value: TColor); override;
|
||||
procedure SetColRow(const ACol,ARow: Integer);
|
||||
procedure SetEditText(ACol, ARow: Longint; const Value: string); dynamic;
|
||||
procedure SetEditText(ACol, ARow: Longint; const Value: string); virtual;
|
||||
procedure SetBorderStyle(NewStyle: TBorderStyle); override;
|
||||
procedure SetFixedcolor(const AValue: TColor); virtual;
|
||||
procedure SetFixedCols(const AValue: Integer); virtual;
|
||||
procedure SetSelectedColor(const AValue: TColor); virtual;
|
||||
procedure SizeChanged(OldColCount, OldRowCount: Integer); dynamic;
|
||||
procedure SizeChanged(OldColCount, OldRowCount: Integer); virtual;
|
||||
procedure Sort(ColSorting: Boolean; index,IndxFrom,IndxTo:Integer); virtual;
|
||||
procedure TopLeftChanged; dynamic;
|
||||
procedure TopLeftChanged; virtual;
|
||||
function TryMoveSelection(Relative: Boolean; var DCol, DRow: Integer): Boolean;
|
||||
procedure UnLockEditor;
|
||||
procedure UpdateHorzScrollBar(const aVisible: boolean; const aRange,aPage: Integer); virtual;
|
||||
|
@ -72,7 +72,7 @@ type
|
||||
FOnChange: TNotifyEvent;
|
||||
public
|
||||
destructor Destroy; override;
|
||||
procedure Change; dynamic;
|
||||
procedure Change; virtual;
|
||||
property OnChange: TNotifyEvent read FOnChange write FOnChange;
|
||||
property Sender: TCustomImageList read FSender write FSender;
|
||||
end;
|
||||
|
@ -80,11 +80,11 @@ type
|
||||
Context: TCarbonContext; // Carbon content area context
|
||||
Widget: HIViewRef; // Reference to the Carbon control
|
||||
public
|
||||
procedure FocusSet; dynamic;
|
||||
procedure FocusKilled; dynamic;
|
||||
procedure FocusSet; virtual;
|
||||
procedure FocusKilled; virtual;
|
||||
procedure BoundsChanged; virtual;
|
||||
procedure ControlAdded; dynamic;
|
||||
function FilterKeyPress(SysKey: Boolean; const Char: TUTF8Char): Boolean; dynamic;
|
||||
procedure ControlAdded; virtual;
|
||||
function FilterKeyPress(SysKey: Boolean; const Char: TUTF8Char): Boolean; virtual;
|
||||
procedure ProcessKeyEvent(const msg: TLMKey; var Result: OSStatus); virtual;
|
||||
function NeedDeliverMouseEvent(Msg: Integer; const AMessage): Boolean; virtual;
|
||||
public
|
||||
|
@ -51,7 +51,7 @@ type
|
||||
function GetEditPart: ControlPartCode; virtual;
|
||||
procedure RegisterEvents; override;
|
||||
public
|
||||
procedure TextDidChange; dynamic;
|
||||
procedure TextDidChange; virtual;
|
||||
public
|
||||
function GetPreferredSize: TPoint; override;
|
||||
|
||||
|
@ -128,7 +128,7 @@ type
|
||||
protected
|
||||
function GetItemCaption(AIndex, ASubIndex: Integer): String; virtual; abstract;
|
||||
function GetItemIcon(AIndex, ASubIndex: Integer): IconRef; virtual;
|
||||
function GetReadOnly: Boolean; dynamic; abstract;
|
||||
function GetReadOnly: Boolean; virtual; abstract;
|
||||
function MultiSelect: Boolean; virtual; abstract;
|
||||
function IsOwnerDrawn: Boolean; virtual; abstract;
|
||||
protected
|
||||
@ -141,9 +141,9 @@ type
|
||||
procedure BoundsChanged; override;
|
||||
function GetClientRect(var ARect: TRect): Boolean; override;
|
||||
procedure DrawItem(AIndex: Integer; AState: DataBrowserItemState); virtual; abstract;
|
||||
procedure CheckChanged(AIndex: Integer; AChecked: Boolean); dynamic;
|
||||
procedure SelectionChanged(AIndex: Integer; ASelect: Boolean); dynamic;
|
||||
procedure FocusedChanged(AIndex: Integer); dynamic; abstract;
|
||||
procedure CheckChanged(AIndex: Integer; AChecked: Boolean); virtual;
|
||||
procedure SelectionChanged(AIndex: Integer; ASelect: Boolean); virtual;
|
||||
procedure FocusedChanged(AIndex: Integer); virtual; abstract;
|
||||
public
|
||||
procedure CheckNeedsScrollBars;
|
||||
|
||||
|
@ -66,11 +66,11 @@ type
|
||||
public
|
||||
class function GetFrameCount: Integer; virtual;
|
||||
class function GetValidEvents: TCarbonControlEvents; virtual;
|
||||
procedure Hit(AControlPart: ControlPartCode); dynamic;
|
||||
procedure Hit(AControlPart: ControlPartCode); virtual;
|
||||
procedure Draw; virtual;
|
||||
procedure ValueChanged; dynamic;
|
||||
procedure IndicatorMoved; dynamic;
|
||||
procedure DoAction(AControlPart: ControlPartCode); dynamic;
|
||||
procedure ValueChanged; virtual;
|
||||
procedure IndicatorMoved; virtual;
|
||||
procedure DoAction(AControlPart: ControlPartCode); virtual;
|
||||
public
|
||||
procedure AddToWidget(AParent: TCarbonWidget); override;
|
||||
function GetTopParentWindow: WindowRef; override;
|
||||
|
@ -169,11 +169,11 @@ type
|
||||
procedure DoActionChange(Sender: TObject);
|
||||
protected
|
||||
class procedure WSRegisterClass; override;
|
||||
procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); dynamic;
|
||||
procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); virtual;
|
||||
procedure AssignTo(Dest: TPersistent); override;
|
||||
procedure BitmapChange(Sender: TObject);
|
||||
function GetAction: TBasicAction;
|
||||
function GetActionLinkClass: TMenuActionLinkClass; dynamic;
|
||||
function GetActionLinkClass: TMenuActionLinkClass; virtual;
|
||||
function GetHandle: HMenu;
|
||||
procedure DoClicked(var msg); message LM_ACTIVATE;
|
||||
procedure CheckChildrenHandles;
|
||||
|
@ -100,7 +100,7 @@ type
|
||||
private
|
||||
FOnChange: TNotifyEvent;
|
||||
protected
|
||||
procedure Changed; dynamic;
|
||||
procedure Changed; virtual;
|
||||
procedure Lock;
|
||||
procedure UnLock;
|
||||
public
|
||||
|
@ -50,13 +50,11 @@ type
|
||||
FShellListView: TCustomShellListView;
|
||||
{ Setters and getters }
|
||||
procedure SetShellListView(const Value: TCustomShellListView);
|
||||
protected
|
||||
{ Other internal methods }
|
||||
function CanExpand(Node: TTreeNode): Boolean; override;
|
||||
procedure DoSelectionChanged; override;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation);
|
||||
override;
|
||||
|
||||
procedure HandleOnExpanding(Sender: TObject; Node: TTreeNode; var AllowExpansion: Boolean);
|
||||
procedure HandleSelectionChanged(Sender: TObject);
|
||||
protected
|
||||
{ Other methods specific to Lazarus }
|
||||
function PopulateTreeNodeWithFiles(
|
||||
ANode: TTreeNode; ANodePath: string): Boolean;
|
||||
procedure PopulateWithBaseFiles;
|
||||
@ -69,6 +67,7 @@ type
|
||||
class function GetBasePath: string;
|
||||
class procedure GetFilesInDir(const ABaseDir: string;
|
||||
AMask: string; AObjectTypes: TObjectTypes; AResult: TStrings);
|
||||
{ Other methods specific to Lazarus }
|
||||
function GetPathFromNode(ANode: TTreeNode): string;
|
||||
|
||||
{ Properties }
|
||||
@ -142,19 +141,22 @@ type
|
||||
FObjectTypes: TObjectTypes;
|
||||
FRoot: string;
|
||||
FShellTreeView: TCustomShellTreeView;
|
||||
{ Setters and getters }
|
||||
procedure SetMask(const AValue: string);
|
||||
procedure SetShellTreeView(const Value: TCustomShellTreeView);
|
||||
procedure SetRoot(const Value: string);
|
||||
{ Other internal methods }
|
||||
procedure HandleResize(Sender: TObject);
|
||||
protected
|
||||
procedure ChangeBounds(ALeft, ATop, AWidth, AHeight: integer); override;
|
||||
procedure PopulateWithRoot;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation);
|
||||
override;
|
||||
{ Methods specific to Lazarus }
|
||||
procedure PopulateWithRoot();
|
||||
public
|
||||
{ Basic methods }
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
{ Methods specific to Lazarus }
|
||||
function GetPathFromItem(ANode: TListItem): string;
|
||||
public
|
||||
{ Properties }
|
||||
property Mask: string read FMask write SetMask; // Can be used to conect to other controls
|
||||
property ObjectTypes: TObjectTypes read FObjectTypes write FObjectTypes;
|
||||
property Root: string read FRoot write SetRoot;
|
||||
@ -293,11 +295,7 @@ begin
|
||||
procedure TCustomShellTreeView.SetShellListView(
|
||||
const Value: TCustomShellListView);
|
||||
begin
|
||||
if FShellListView=Value then exit;
|
||||
|
||||
if FShellListView<>nil then FShellListView.RemoveFreeNotification(Self);
|
||||
FShellListView := Value;
|
||||
if FShellListView<>nil then FShellListView.FreeNotification(Self);
|
||||
|
||||
// Update the pair, it will then update itself
|
||||
// in the setter of this property
|
||||
@ -306,17 +304,15 @@ begin
|
||||
Value.ShellTreeView := Self;
|
||||
end;
|
||||
|
||||
function TCustomShellTreeView.CanExpand(Node: TTreeNode): Boolean;
|
||||
procedure TCustomShellTreeView.HandleOnExpanding(Sender: TObject;
|
||||
Node: TTreeNode; var AllowExpansion: Boolean);
|
||||
begin
|
||||
Node.DeleteChildren;
|
||||
Result:=inherited CanExpand(Node);
|
||||
if Result then
|
||||
Result := PopulateTreeNodeWithFiles(Node, GetPathFromNode(Node));
|
||||
AllowExpansion := PopulateTreeNodeWithFiles(Node, GetPathFromNode(Node));
|
||||
end;
|
||||
|
||||
procedure TCustomShellTreeView.DoSelectionChanged;
|
||||
procedure TCustomShellTreeView.HandleSelectionChanged(Sender: TObject);
|
||||
begin
|
||||
inherited DoSelectionChanged;
|
||||
if Assigned(FShellListView) then
|
||||
begin
|
||||
FShellListView.Root := GetPathFromNode(Selected);
|
||||
@ -324,13 +320,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomShellTreeView.Notification(AComponent: TComponent;
|
||||
Operation: TOperation);
|
||||
begin
|
||||
inherited Notification(AComponent, Operation);
|
||||
if AComponent=FShellListView then FShellListView:=nil;
|
||||
end;
|
||||
|
||||
constructor TCustomShellTreeView.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
@ -339,6 +328,11 @@ begin
|
||||
|
||||
ObjectTypes:= [otFolders];
|
||||
|
||||
// Necessary event handlers
|
||||
|
||||
OnExpanding := @HandleOnExpanding;
|
||||
OnSelectionChanged := @HandleSelectionChanged;
|
||||
|
||||
// Populates the base dirs
|
||||
|
||||
PopulateWithBaseFiles();
|
||||
@ -512,16 +506,14 @@ procedure TCustomShellListView.SetShellTreeView(
|
||||
begin
|
||||
if FShellTreeView <> Value then
|
||||
begin
|
||||
if FShellTreeView<>nil then FShellTreeView.RemoveFreeNotification(Self);
|
||||
FShellTreeView := Value;
|
||||
if FShellTreeView<>nil then FShellTreeView.FreeNotification(Self);
|
||||
|
||||
Clear;
|
||||
|
||||
if Value <> nil then
|
||||
begin
|
||||
FRoot := Value.GetPathFromNode(Value.Selected);
|
||||
PopulateWithRoot;
|
||||
PopulateWithRoot();
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -551,12 +543,10 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomShellListView.ChangeBounds(ALeft, ATop,
|
||||
AWidth, AHeight: integer);
|
||||
procedure TCustomShellListView.HandleResize(Sender: TObject);
|
||||
begin
|
||||
inherited ChangeBounds(ALeft,ATop,AWidth,AHeight);
|
||||
{$ifdef DEBUG_SHELLCTRLS}
|
||||
debugLn([':>TCustomShellListView.HandleResize']);
|
||||
WriteLn(':>TCustomShellListView.HandleResize');
|
||||
{$endif}
|
||||
|
||||
// The correct check is with count,
|
||||
@ -564,14 +554,14 @@ begin
|
||||
// will raise an exception
|
||||
if Self.Columns.Count < 3 then Exit;
|
||||
|
||||
Column[0].Width := (70 * AWidth) div 100;
|
||||
Column[1].Width := (15 * AWidth) div 100;
|
||||
Column[2].Width := (15 * AWidth) div 100;
|
||||
Column[0].Width := (70 * Width) div 100;
|
||||
Column[1].Width := (15 * Width) div 100;
|
||||
Column[2].Width := (15 * Width) div 100;
|
||||
|
||||
{$ifdef DEBUG_SHELLCTRLS}
|
||||
debugLn([':<TCustomShellListView.HandleResize C0.Width=',
|
||||
WriteLn(':<TCustomShellListView.HandleResize C0.Width=',
|
||||
Column[0].Width, ' C1.Width=', Column[1].Width,
|
||||
' C2.Width=', Column[2].Width]);
|
||||
' C2.Width=', Column[2].Width);
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
@ -590,7 +580,10 @@ begin
|
||||
Self.Column[1].Caption := 'Size';
|
||||
Self.Column[2].Caption := 'Type';
|
||||
// Initial sizes, necessary under Windows CE
|
||||
ChangeBounds(Left,Top,Width,Height);
|
||||
HandleResize(Self);
|
||||
|
||||
// Internal event handlers
|
||||
OnResize := @HandleResize;
|
||||
end;
|
||||
|
||||
destructor TCustomShellListView.Destroy;
|
||||
@ -599,7 +592,7 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TCustomShellListView.PopulateWithRoot;
|
||||
procedure TCustomShellListView.PopulateWithRoot();
|
||||
var
|
||||
i: Integer;
|
||||
Files: TStringList;
|
||||
@ -640,13 +633,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomShellListView.Notification(AComponent: TComponent;
|
||||
Operation: TOperation);
|
||||
begin
|
||||
inherited Notification(AComponent, Operation);
|
||||
if AComponent=FShellTreeView then FShellTreeView:=nil;
|
||||
end;
|
||||
|
||||
function TCustomShellListView.GetPathFromItem(ANode: TListItem): string;
|
||||
begin
|
||||
Result := IncludeTrailingPathDelimiter(FRoot) + ANode.Caption;
|
||||
|
@ -93,8 +93,8 @@ type
|
||||
class procedure WSRegisterClass; override;
|
||||
procedure CreateParams(var Params: TCreateParams); override;
|
||||
procedure CreateWnd; override;
|
||||
procedure Change; dynamic;
|
||||
procedure Scroll(ScrollCode: TScrollCode; var ScrollPos: Integer); dynamic;
|
||||
procedure Change; virtual;
|
||||
procedure Scroll(ScrollCode: TScrollCode; var ScrollPos: Integer); virtual;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
procedure SetParams(APosition, AMin, AMax, APageSize: Integer);
|
||||
@ -308,12 +308,12 @@ type
|
||||
State: TOwnerDrawState); virtual;
|
||||
class function GetControlClassDefaultSize: TPoint; override;
|
||||
procedure LMChanged(var Msg); message LM_CHANGED;
|
||||
procedure Change; dynamic;
|
||||
procedure Select; dynamic;
|
||||
procedure DropDown; dynamic;
|
||||
procedure GetItems; dynamic;
|
||||
procedure Change; virtual;
|
||||
procedure Select; virtual;
|
||||
procedure DropDown; virtual;
|
||||
procedure GetItems; virtual;
|
||||
procedure SetItems(const Value: TStrings); virtual;
|
||||
procedure CloseUp; dynamic;
|
||||
procedure CloseUp; virtual;
|
||||
procedure AdjustDropDown; virtual;
|
||||
|
||||
function GetItemCount: Integer; //override;
|
||||
@ -701,7 +701,7 @@ type
|
||||
WithThemeSpace: Boolean); override;
|
||||
procedure CreateWnd; override;
|
||||
procedure TextChanged; override;
|
||||
procedure Change; dynamic;
|
||||
procedure Change; virtual;
|
||||
procedure DoEnter; override;
|
||||
procedure DoExit; override;
|
||||
function GetCaretPos: TPoint; virtual;
|
||||
|
Loading…
Reference in New Issue
Block a user