mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-10 00:17:18 +01:00
Revert r58337 and r58339 #e887c43e0d
git-svn-id: trunk@58346 -
This commit is contained in:
parent
b096cac09d
commit
0c5181bf67
@ -288,7 +288,6 @@ type
|
||||
procedure ConfirmChanges; virtual;
|
||||
procedure UndoChanges; virtual;
|
||||
|
||||
procedure DoEditingDone; override;
|
||||
function GetCheckBoxRect(IgnoreRightToLeft: Boolean = False): TRect;
|
||||
function GetDateTimePartFromTextPart(TextPart: TTextPart): TDateTimePart;
|
||||
function GetSelectedDateTimePart: TDateTimePart;
|
||||
@ -428,6 +427,8 @@ type
|
||||
procedure RemoveAllHandlersOfObject(AnObject: TObject); override;
|
||||
|
||||
procedure Paint; override;
|
||||
procedure EditingDone; override;
|
||||
|
||||
published
|
||||
//
|
||||
end;
|
||||
@ -3162,12 +3163,12 @@ begin
|
||||
inherited Paint;
|
||||
end;
|
||||
|
||||
procedure TCustomDateTimePicker.DoEditingDone;
|
||||
procedure TCustomDateTimePicker.EditingDone;
|
||||
begin
|
||||
if FNoEditingDone <= 0 then begin
|
||||
ConfirmChanges;
|
||||
|
||||
inherited DoEditingDone;
|
||||
inherited EditingDone;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -949,8 +949,7 @@ type
|
||||
cfProcessingWMPaint,
|
||||
cfKillChangeBounds,
|
||||
cfKillInvalidatePreferredSize,
|
||||
cfKillAdjustSize,
|
||||
cfEditingDoneChanged
|
||||
cfKillAdjustSize
|
||||
);
|
||||
TControlFlags = set of TControlFlag;
|
||||
|
||||
@ -1153,6 +1152,7 @@ type
|
||||
FOnDblClick: TNotifyEvent;
|
||||
FOnDragDrop: TDragDropEvent;
|
||||
FOnDragOver: TDragOverEvent;
|
||||
FOnEditingDone: TNotifyEvent;
|
||||
FOnEndDock: TEndDragEvent;
|
||||
FOnEndDrag: TEndDragEvent;
|
||||
FOnMouseDown: TMouseEvent;
|
||||
@ -1510,6 +1510,7 @@ type
|
||||
property OnMouseWheelRight: TMouseWheelUpDownEvent read FOnMouseWheelRight write FOnMouseWheelRight;
|
||||
property OnStartDock: TStartDockEvent read FOnStartDock write FOnStartDock;
|
||||
property OnStartDrag: TStartDragEvent read FOnStartDrag write FOnStartDrag;
|
||||
property OnEditingDone: TNotifyEvent read FOnEditingDone write FOnEditingDone;
|
||||
public
|
||||
FCompStyle: Byte; // DEPRECATED. Enables (valid) use of 'IN' operator (this
|
||||
// is a hack for speed. It will be replaced by the use of the widgetset
|
||||
@ -1606,6 +1607,7 @@ type
|
||||
constructor Create(TheOwner: TComponent);override;
|
||||
destructor Destroy; override;
|
||||
procedure BeforeDestruction; override;
|
||||
procedure EditingDone; virtual;
|
||||
procedure ExecuteDefaultAction; virtual;
|
||||
procedure ExecuteCancelAction; virtual;
|
||||
procedure BeginDrag(Immediate: Boolean; Threshold: Integer = -1);
|
||||
@ -2003,7 +2005,6 @@ type
|
||||
FOnKeyDown: TKeyEvent;
|
||||
FOnKeyPress: TKeyPressEvent;
|
||||
FOnKeyUp: TKeyEvent;
|
||||
FOnEditingDone: TNotifyEvent;
|
||||
FOnEnter: TNotifyEvent;
|
||||
FOnExit: TNotifyEvent;
|
||||
FOnUnDock: TUnDockEvent;
|
||||
@ -2155,7 +2156,6 @@ type
|
||||
procedure DoGetDockCaption(AControl: TControl; var ACaption: String); virtual;
|
||||
protected
|
||||
// mouse and keyboard
|
||||
procedure DoEditingDone; virtual;
|
||||
procedure DoEnter; virtual;
|
||||
procedure DoExit; virtual;
|
||||
function DoKeyDownBeforeInterface(var Message: TLMKey; IsRecurseCall: Boolean): Boolean;
|
||||
@ -2221,7 +2221,6 @@ type
|
||||
property WindowHandle: HWND read FHandle write FHandle;
|
||||
// properties which are not supported by all descendents
|
||||
property BorderStyle: TBorderStyle read GetBorderStyle write SetBorderStyle default bsNone;
|
||||
property OnEditingDone: TNotifyEvent read FOnEditingDone write FOnEditingDone;
|
||||
property OnGetSiteInfo: TGetSiteInfoEvent read FOnGetSiteInfo write FOnGetSiteInfo;
|
||||
property OnGetDockCaption: TGetDockCaptionEvent read FOnGetDockCaption write FOnGetDockCaption;
|
||||
property ParentBackground: Boolean read GetParentBackground write SetParentBackground;
|
||||
@ -2241,7 +2240,6 @@ type
|
||||
property DockManager: TDockManager read FDockManager write SetDockManager;
|
||||
property DockSite: Boolean read FDockSite write SetDockSite default False;
|
||||
property DoubleBuffered: Boolean read FDoubleBuffered write SetDoubleBuffered stored DoubleBufferedIsStored;
|
||||
procedure EditingDone;
|
||||
property Handle: HWND read GetHandle write SetHandle;
|
||||
property IsFlipped: Boolean read FFlipped;
|
||||
property IsResizing: Boolean read GetIsResizing;
|
||||
|
||||
@ -379,7 +379,8 @@ Type
|
||||
procedure DataChange(Sender: TObject); override;
|
||||
procedure DoSelectionChange(User: Boolean); override;
|
||||
procedure UpdateData(Sender: TObject); override;
|
||||
procedure DoEditingDone; override;
|
||||
public
|
||||
procedure EditingDone; override;
|
||||
published
|
||||
property Align;
|
||||
property Anchors;
|
||||
@ -564,10 +565,10 @@ Type
|
||||
property DataLink: TFieldDataLink read FDataLink;
|
||||
function GetButtonValue(Index: Integer): string;
|
||||
procedure UpdateRadioButtonStates; override;
|
||||
procedure DoEditingDone; override;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure EditingDone; override;
|
||||
function ExecuteAction(AAction: TBasicAction): Boolean; override;
|
||||
function UpdateAction(AAction: TBasicAction): Boolean; override;
|
||||
property Field: TField read GetField;
|
||||
@ -728,12 +729,12 @@ Type
|
||||
procedure Change; override;
|
||||
procedure UpdateData(Sender: TObject); virtual; abstract;
|
||||
procedure WndProc(var Message: TLMessage); override;
|
||||
procedure DoEditingDone; override;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
function ExecuteAction(AAction: TBasicAction): Boolean; override;
|
||||
function UpdateAction(AAction: TBasicAction): Boolean; override;
|
||||
procedure EditingDone; override;
|
||||
property Field: TField read GetField;
|
||||
property Text;
|
||||
property ItemIndex;
|
||||
@ -960,10 +961,10 @@ Type
|
||||
procedure KeyPress(var Key:Char); override;
|
||||
procedure WndProc(var Message : TLMessage); override;
|
||||
class procedure WSRegisterClass; override;
|
||||
procedure DoEditingDone; override;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure EditingDone; override;
|
||||
procedure LoadMemo; virtual;
|
||||
function ExecuteAction(AAction: TBasicAction): Boolean; override;
|
||||
function UpdateAction(AAction: TBasicAction): Boolean; override;
|
||||
@ -1206,12 +1207,12 @@ Type
|
||||
procedure SetDataSource(Value: TDataSource);
|
||||
procedure UpdateDate(const AValue: string);
|
||||
procedure CMGetDataLink(var Message: TLMessage); message CM_GETDATALINK;
|
||||
procedure DoEditingDone; override;
|
||||
protected
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure EditingDone; override;
|
||||
function ExecuteAction(AAction: TBasicAction): Boolean; override;
|
||||
function UpdateAction(AAction: TBasicAction): Boolean; override;
|
||||
|
||||
|
||||
@ -244,9 +244,9 @@ type
|
||||
procedure msg_SelectAll(var Msg: TGridMessage); message GM_SELECTALL;
|
||||
procedure msg_SetPos(var Msg: TGridMessage); message GM_SETPOS;
|
||||
procedure msg_GetGrid(var Msg: TGridMessage); message GM_GETGRID;
|
||||
procedure DoEditingDone; override;
|
||||
public
|
||||
constructor Create(Aowner : TComponent); override;
|
||||
procedure EditingDone; override;
|
||||
property EditText;
|
||||
property OnEditingDone;
|
||||
end;
|
||||
@ -286,8 +286,8 @@ type
|
||||
procedure msg_SetValue(var Msg: TGridMessage); message GM_SETVALUE;
|
||||
procedure msg_SetPos(var Msg: TGridMessage); message GM_SETPOS;
|
||||
procedure msg_GetGrid(var Msg: TGridMessage); message GM_GETGRID;
|
||||
procedure DoEditingDone; override;
|
||||
public
|
||||
procedure EditingDone; override;
|
||||
property BorderStyle;
|
||||
property OnEditingDone;
|
||||
end;
|
||||
@ -971,7 +971,6 @@ type
|
||||
function DoCompareCells(Acol,ARow,Bcol,BRow: Integer): Integer; virtual;
|
||||
procedure DoCopyToClipboard; virtual;
|
||||
procedure DoCutToClipboard; virtual;
|
||||
procedure DoEditingDone; override;
|
||||
procedure DoEditButtonClick(const ACol,ARow: Integer); virtual;
|
||||
procedure DoEditorHide; virtual;
|
||||
procedure DoEditorShow; virtual;
|
||||
@ -1259,6 +1258,7 @@ type
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure Invalidate; override;
|
||||
procedure EditingDone; override;
|
||||
|
||||
{ Exposed procs }
|
||||
procedure AdjustInnerCellRect(var ARect: TRect);
|
||||
@ -8146,10 +8146,10 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomGrid.DoEditingDone;
|
||||
procedure TCustomGrid.EditingDone;
|
||||
begin
|
||||
if not FEditorShowing then
|
||||
inherited DoEditingDone;
|
||||
inherited EditingDone;
|
||||
end;
|
||||
|
||||
function TCustomGrid.EditorGetValue(validate:boolean=false): boolean;
|
||||
@ -10083,9 +10083,9 @@ begin
|
||||
{$IfDef DbgGrid} DebugLn('TStringCellEditor.Change END');{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure TStringCellEditor.DoEditingDone;
|
||||
procedure TStringCellEditor.EditingDone;
|
||||
begin
|
||||
inherited DoEditingDone;
|
||||
inherited EditingDone;
|
||||
if FGrid<>nil then
|
||||
FGrid.EditingDone;
|
||||
end;
|
||||
@ -12834,10 +12834,10 @@ begin
|
||||
{$Endif}
|
||||
end;
|
||||
|
||||
procedure TPickListCellEditor.DoEditingDone;
|
||||
procedure TPickListCellEditor.EditingDone;
|
||||
begin
|
||||
{$ifdef dbgGrid}DebugLn('TPickListCellEditor.EditingDone INIT');{$ENDIF}
|
||||
inherited DoEditingDone;
|
||||
inherited EditingDone;
|
||||
if FGrid<>nil then
|
||||
FGrid.EditingDone;
|
||||
{$ifdef dbgGrid}DebugLn('TPickListCellEditor.EditingDone END');{$ENDIF}
|
||||
|
||||
@ -564,6 +564,21 @@ begin
|
||||
Perform(CM_CHANGED, 0, LParam(self));
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
TControl.EditingDone
|
||||
|
||||
Called when user has finished editing. This procedure can be used by data
|
||||
links to commit the changes.
|
||||
For example:
|
||||
- When focus switches to another control (default)
|
||||
- When user selected another item
|
||||
It's totally up to the control, what events will commit.
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TControl.EditingDone;
|
||||
begin
|
||||
if Assigned(OnEditingDone) then OnEditingDone(Self);
|
||||
end;
|
||||
|
||||
procedure TControl.FontChanged(Sender: TObject);
|
||||
begin
|
||||
FParentFont := False;
|
||||
@ -5864,7 +5879,6 @@ end;
|
||||
|
||||
procedure TControl.CMChanged(var Message: TLMessage);
|
||||
begin
|
||||
Include(FControlFlags, cfEditingDoneChanged);
|
||||
if FParent<>nil then
|
||||
FParent.WindowProc(Message);
|
||||
end;
|
||||
|
||||
@ -81,10 +81,10 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomDBComboBox.DoEditingDone;
|
||||
procedure TCustomDBComboBox.EditingDone;
|
||||
begin
|
||||
FDataLink.UpdateRecord;
|
||||
inherited DoEditingDone;
|
||||
inherited EditingDone;
|
||||
end;
|
||||
|
||||
procedure TCustomDBComboBox.WndProc(var Message: TLMessage);
|
||||
|
||||
@ -671,10 +671,10 @@ begin
|
||||
inherited DoExit;
|
||||
end;
|
||||
|
||||
procedure TCustomEdit.DoEditingDone;
|
||||
procedure TCustomEdit.EditingDone;
|
||||
begin
|
||||
if not ReadOnly then
|
||||
inherited DoEditingDone;
|
||||
inherited EditingDone;
|
||||
end;
|
||||
|
||||
procedure TCustomEdit.FontChanged(Sender: TObject);
|
||||
|
||||
@ -96,10 +96,10 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TDBCalendar.DoEditingDone;
|
||||
procedure TDBCalendar.EditingDone;
|
||||
begin
|
||||
FDataLink.UpdateRecord;
|
||||
inherited DoEditingDone;
|
||||
inherited EditingDone;
|
||||
end;
|
||||
|
||||
function TDBCalendar.ExecuteAction(AAction: TBasicAction): Boolean;
|
||||
|
||||
@ -54,9 +54,9 @@ begin
|
||||
FDataLink.Field.Text := Items[ItemIndex];
|
||||
end;
|
||||
|
||||
procedure TDBListBox.DoEditingDone;
|
||||
procedure TDBListBox.EditingDone;
|
||||
begin
|
||||
FDataLink.UpdateRecord;
|
||||
inherited DoEditingDone;
|
||||
inherited EditingDone;
|
||||
end;
|
||||
|
||||
|
||||
@ -119,11 +119,11 @@ begin
|
||||
FDataLink.OnUpdateData:=@UpdateData;
|
||||
end;
|
||||
|
||||
procedure TDBMemo.DoEditingDone;
|
||||
procedure TDBMemo.EditingDone;
|
||||
begin
|
||||
if FDataLink.CanModify and FDatalink.Editing then begin
|
||||
FDataLink.UpdateRecord;
|
||||
inherited DoEditingDone;
|
||||
inherited EditingDone;
|
||||
end else
|
||||
FDatalink.Reset;
|
||||
end;
|
||||
|
||||
@ -154,10 +154,10 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TDBRadioGroup.DoEditingDone;
|
||||
procedure TDBRadioGroup.EditingDone;
|
||||
begin
|
||||
FDataLink.UpdateRecord;
|
||||
inherited DoEditingDone;
|
||||
inherited EditingDone;
|
||||
end;
|
||||
|
||||
function TDBRadioGroup.ExecuteAction(AAction: TBasicAction): Boolean;
|
||||
|
||||
@ -6644,30 +6644,6 @@ begin
|
||||
//DebugLn('[TWinControl.Destroy] END ',Name,':',ClassName);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
TWinControl.EditingDone
|
||||
|
||||
Called when user has finished editing. This procedure can be used by data
|
||||
links to commit the changes.
|
||||
For example:
|
||||
- When focus switches to another control (default)
|
||||
- When user selected another item
|
||||
It's totally up to the control, what events will commit.
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TWinControl.EditingDone;
|
||||
begin
|
||||
if cfEditingDoneChanged in FControlFlags then
|
||||
begin
|
||||
DoEditingDone;
|
||||
Exclude(FControlFlags, cfEditingDoneChanged);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWinControl.DoEditingDone;
|
||||
begin
|
||||
if Assigned(OnEditingDone) then OnEditingDone(Self);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TWinControl.DoEnter
|
||||
Params: none
|
||||
|
||||
@ -768,7 +768,7 @@ type
|
||||
procedure Change; virtual;
|
||||
procedure DoEnter; override;
|
||||
procedure DoExit; override;
|
||||
procedure DoEditingDone; override;
|
||||
procedure EditingDone; override;
|
||||
function GetCaretPos: TPoint; virtual;
|
||||
function GetNumbersOnly: Boolean; virtual;
|
||||
function GetReadOnly: Boolean; virtual;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user