mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-21 16:22:48 +02:00
lcl: remove LM_INSERTTEXT, LM_DELETETEXT (not used in LCL anymore and fixes #0010930)
git-svn-id: trunk@14461 -
This commit is contained in:
parent
0bc0d15388
commit
67ebf94a2e
@ -2097,17 +2097,6 @@ begin
|
||||
g_signal_stop_emission_by_name(PGtkObject(widget), 'insert_text');
|
||||
end;
|
||||
|
||||
function gtkDeleteText( widget: PGtkWidget; Startpos, EndPos : Integer;
|
||||
data: gPointer) : GBoolean; cdecl;
|
||||
var
|
||||
Mess : TLMessage;
|
||||
begin
|
||||
EventTrace('Delete Text', data);
|
||||
if (StartPos=0) or (EndPos=0) or (Widget=nil) then ;
|
||||
Mess.msg := LM_DELETETEXT;
|
||||
Result:= DeliverMessage(Data, Mess) = 0;
|
||||
end;
|
||||
|
||||
function gtkSetEditable( widget: PGtkWidget; data: gPointer) : GBoolean; cdecl;
|
||||
var
|
||||
Mess : TLMessage;
|
||||
|
@ -189,8 +189,6 @@ function gtkconfigureevent( widget: PGtkWidget; event: PgdkEventConfigure;
|
||||
function gtkreleasedCB(widget: PGtkWidget; data: gPointer): GBoolean; cdecl;
|
||||
function gtkInsertText(widget: PGtkWidget; char: pChar; NewTextLength:
|
||||
Integer; Position: pgint; data: gPointer): GBoolean; cdecl;
|
||||
function gtkDeleteText(widget: PGtkWidget; Startpos, EndPos: Integer;
|
||||
data: gPointer): GBoolean; cdecl;
|
||||
function gtkSetEditable( widget: PGtkWidget; data: gPointer): GBoolean; cdecl;
|
||||
function gtkMoveWord( widget: PGtkWidget; data: gPointer): GBoolean; cdecl;
|
||||
function gtkMovePage( widget: PGtkWidget; data: gPointer): GBoolean; cdecl;
|
||||
|
@ -3276,16 +3276,6 @@ begin
|
||||
ConnectSenderSignal(gObject, 'check-resize', @gtkresizeCB);
|
||||
end;
|
||||
|
||||
LM_INSERTTEXT :
|
||||
begin
|
||||
ConnectSenderSignal(gCore, 'insert-text', @gtkinserttext);
|
||||
end;
|
||||
|
||||
LM_DELETETEXT :
|
||||
begin
|
||||
ConnectSenderSignal(gObject, 'delete-text', @gtkdeletetext);
|
||||
end;
|
||||
|
||||
LM_SETEDITABLE :
|
||||
begin
|
||||
ConnectSenderSignal(gObject, 'set-editable', @gtkseteditable);
|
||||
|
@ -1,3 +1,6 @@
|
||||
|
||||
|
||||
|
||||
{ $Id$}
|
||||
{
|
||||
*****************************************************************************
|
||||
@ -1039,9 +1042,6 @@ begin
|
||||
SetCallback(LM_CUT, PGtkObject(AGtkWidget), AWidgetInfo^.LCLObject);
|
||||
SetCallback(LM_COPY, PGtkObject(AGtkWidget), AWidgetInfo^.LCLObject);
|
||||
SetCallback(LM_PASTE, PGtkObject(AGtkWidget), AWidgetInfo^.LCLObject);
|
||||
{$ifdef gtk1}
|
||||
SetCallback(LM_INSERTTEXT, PGtkObject(AGtkWidget), AWidgetInfo^.LCLObject);
|
||||
{$endif}
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1611,7 +1611,6 @@ begin
|
||||
SetCallback(LM_CUT, PGtkObject(AGtkWidget), AWidgetInfo^.LCLObject);
|
||||
SetCallback(LM_COPY, PGtkObject(AGtkWidget), AWidgetInfo^.LCLObject);
|
||||
SetCallback(LM_PASTE, PGtkObject(AGtkWidget), AWidgetInfo^.LCLObject);
|
||||
SetCallback(LM_INSERTTEXT, PGtkObject(AGtkWidget), AWidgetInfo^.LCLObject);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -189,18 +189,7 @@ begin
|
||||
and ((AWinControl = nil) or not (csOpaque in AWinControl.ControlStyle));
|
||||
end;
|
||||
|
||||
//TODO: added temporarily to fix compilation,
|
||||
//should probably removed soon, as the LCL does not listen to it.
|
||||
type
|
||||
PLMInsertText = ^TLMInsertText;
|
||||
TLMInsertText = record
|
||||
Msg : Cardinal;
|
||||
NewText : String;
|
||||
Length : Integer;
|
||||
Position : Integer;
|
||||
UserData : Pointer;
|
||||
end;
|
||||
|
||||
TCustomListViewAccess = class(TCustomListView)
|
||||
end;
|
||||
|
||||
@ -245,7 +234,6 @@ var
|
||||
Flags: dword;
|
||||
WindowDC: HDC;
|
||||
|
||||
LMInsertText: TLMInsertText; // used by CB_INSERTSTRING, LB_INSERTSTRING
|
||||
LMScroll: TLMScroll; // used by WM_HSCROLL
|
||||
LMKey: TLMKey; // used by WM_KEYDOWN WM_KEYUP
|
||||
LMChar: TLMChar; // used by WM_CHAR
|
||||
@ -1228,22 +1216,6 @@ begin
|
||||
begin
|
||||
LMessage.Msg := LM_CAPTURECHANGED;
|
||||
end;
|
||||
CB_DELETESTRING, LB_DELETESTRING:
|
||||
begin
|
||||
LMessage.Msg := LM_DELETETEXT;
|
||||
end;
|
||||
CB_INSERTSTRING, LB_INSERTSTRING:
|
||||
begin
|
||||
PLMsg:=@LMInsertText;
|
||||
with LMInsertText Do
|
||||
begin
|
||||
Msg := LM_INSERTTEXT;
|
||||
Position := WParam;
|
||||
NewText := PChar(LParam);
|
||||
Length := System.Length(NewText);
|
||||
// UserData := Pointer(GetWindowLong(Window, GWL_USERDATA));
|
||||
end;
|
||||
end;
|
||||
WM_CHAR:
|
||||
begin
|
||||
if not UnicodeEnabledOS or not HandleUnicodeChar(Word(WParam)) then
|
||||
|
@ -151,18 +151,7 @@ begin
|
||||
and ((AWinControl = nil) or not (csOpaque in AWinControl.ControlStyle));
|
||||
end;
|
||||
|
||||
//TODO: added temporarily to fix compilation,
|
||||
//should probably removed soon, as the LCL does not listen to it.
|
||||
type
|
||||
PLMInsertText = ^TLMInsertText;
|
||||
TLMInsertText = record
|
||||
Msg : Cardinal;
|
||||
NewText : String;
|
||||
Length : Integer;
|
||||
Position : Integer;
|
||||
UserData : Pointer;
|
||||
end;
|
||||
|
||||
TCustomListViewAccess = class(TCustomListView)
|
||||
end;
|
||||
|
||||
@ -205,7 +194,6 @@ Var
|
||||
Flags: dword;
|
||||
ChildWindowInfo: PWindowInfo;
|
||||
|
||||
LMInsertText: TLMInsertText; // used by CB_INSERTSTRING, LB_INSERTSTRING
|
||||
LMScroll: TLMScroll; // used by WM_HSCROLL
|
||||
LMKey: TLMKey; // used by WM_KEYDOWN WM_KEYUP
|
||||
LMChar: TLMChar; // used by WM_CHAR
|
||||
@ -1014,22 +1002,6 @@ begin
|
||||
begin
|
||||
LMessage.Msg := LM_CAPTURECHANGED;
|
||||
end;
|
||||
CB_DELETESTRING, LB_DELETESTRING:
|
||||
begin
|
||||
LMessage.Msg := LM_DELETETEXT;
|
||||
end;
|
||||
CB_INSERTSTRING, LB_INSERTSTRING:
|
||||
begin
|
||||
PLMsg:=@LMInsertText;
|
||||
with LMInsertText Do
|
||||
begin
|
||||
Msg := LM_INSERTTEXT;
|
||||
Position := WParam;
|
||||
NewText := PChar(LParam);
|
||||
Length := System.Length(NewText);
|
||||
// UserData := Pointer(GetWindowLong(Window, GWL_USERDATA));
|
||||
end;
|
||||
end;
|
||||
WM_CHAR:
|
||||
begin
|
||||
PLMsg:=@LMChar;
|
||||
|
@ -55,8 +55,6 @@ function LCLSendPressedMsg(const Target: TControl): PtrInt;
|
||||
function LCLSendReleasedMsg(const Target: TControl): PtrInt;
|
||||
function LCLSendMouseEnterMsg(const Target: TControl): PtrInt;
|
||||
function LCLSendMouseLeaveMsg(const Target: TControl): PtrInt;
|
||||
function LCLSendInsertTextMsg(const Target: TControl): PtrInt;
|
||||
function LCLSendDeleteTextMsg(const Target: TControl): PtrInt;
|
||||
function LCLSendSetEditableMsg(const Target: TControl): PtrInt;
|
||||
function LCLSendMoveWordMsg(const Target: TControl): PtrInt;
|
||||
function LCLSendMovePageMsg(const Target: TControl): PtrInt;
|
||||
@ -596,41 +594,6 @@ begin
|
||||
Result := SendSimpleMessage(Target, CM_MOUSELEAVE);
|
||||
end;
|
||||
|
||||
{******************************************************************************
|
||||
* *
|
||||
* LCLSendInsertTextMsg *
|
||||
* *
|
||||
* Returns : 0 to accept the message, non-zero to reject the message *
|
||||
* *
|
||||
* Params *
|
||||
* *
|
||||
* Target : The Control that will recieve the message LM_INSERTTEXT *
|
||||
* *
|
||||
* Not used by the LCL *
|
||||
* *
|
||||
******************************************************************************}
|
||||
function LCLSendInsertTextMsg(const Target: TControl): PtrInt;
|
||||
begin
|
||||
Result := SendSimpleMessage(Target, LM_INSERTTEXT);
|
||||
end;
|
||||
|
||||
{******************************************************************************
|
||||
* *
|
||||
* LCLSendDeleteTextMsg *
|
||||
* *
|
||||
* Returns : 0 to accept the message, non-zero to reject the message *
|
||||
* *
|
||||
* Params *
|
||||
* *
|
||||
* Target : The Control that will recieve the message LM_DELETETEXT *
|
||||
* *
|
||||
* Not used by the LCL *
|
||||
* *
|
||||
******************************************************************************}
|
||||
function LCLSendDeleteTextMsg(const Target: TControl): PtrInt;
|
||||
begin
|
||||
Result := SendSimpleMessage(Target, LM_DELETETEXT);
|
||||
end;
|
||||
|
||||
{******************************************************************************
|
||||
* *
|
||||
|
@ -61,8 +61,6 @@ const
|
||||
LM_ENTER = LM_LCL + 11;
|
||||
LM_LEAVE = LM_LCL + 12;
|
||||
LM_CHECKRESIZE = LM_LCL + 14;
|
||||
LM_INSERTTEXT = LM_LCL + 16;
|
||||
LM_DELETETEXT = LM_LCL + 17;
|
||||
LM_SETEDITABLE = LM_LCL + 18;
|
||||
LM_MOVEWORD = LM_LCL + 19;
|
||||
LM_MOVEPAGE = LM_LCL + 20;
|
||||
@ -863,8 +861,6 @@ begin
|
||||
LM_ENTER :Result:='LM_ENTER';
|
||||
LM_LEAVE :Result:='LM_LEAVE';
|
||||
LM_CHECKRESIZE :Result:='LM_CHECKRESIZE';
|
||||
LM_INSERTTEXT :Result:='LM_INSERTTEXT';
|
||||
LM_DELETETEXT :Result:='LM_DELETETEXT';
|
||||
LM_SETEDITABLE :Result:='LM_SETEDITABLE';
|
||||
LM_MOVEWORD :Result:='LM_MOVEWORD';
|
||||
LM_MOVEPAGE :Result:='LM_MOVEPAGE';
|
||||
|
Loading…
Reference in New Issue
Block a user