mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 21:58:18 +02:00
MG: if completion form visible it will now get all synedit keys
git-svn-id: trunk@1737 -
This commit is contained in:
parent
e09134034f
commit
16aae9b974
@ -624,7 +624,8 @@ begin
|
||||
Result:=Form.OnSearchPosition;
|
||||
end;
|
||||
|
||||
procedure TSynBaseCompletion.SetOnSearchPosition(NewValue :TSynBaseCompletionSearchPosition);
|
||||
procedure TSynBaseCompletion.SetOnSearchPosition(
|
||||
NewValue :TSynBaseCompletionSearchPosition);
|
||||
begin
|
||||
Form.OnSearchPosition:=NewValue;
|
||||
end;
|
||||
@ -642,8 +643,6 @@ begin
|
||||
exit;
|
||||
end;
|
||||
|
||||
// ToDo: redirect the Editor input to the form
|
||||
|
||||
Form.SetBounds(x,y,Form.Width,Form.Height);
|
||||
{$ELSE}
|
||||
Form.Left:=x;
|
||||
@ -925,9 +924,6 @@ begin
|
||||
if F.CurrentEditor <> nil then begin
|
||||
with F.CurrentEditor as TCustomSynEdit do begin
|
||||
CommandProcessor(ecChar, Key, nil);
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -974,6 +970,15 @@ var
|
||||
ShortCutShift: TShiftState;
|
||||
begin
|
||||
if Key=VK_UNKNOWN then exit;
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
if (Form<>nil) and (Form.Visible) then begin
|
||||
// completion form is visible, but the synedit got a key
|
||||
// -> redirect to form
|
||||
Form.KeyDown(Key,Shift);
|
||||
// eat it
|
||||
Key:=VK_UNKNOWN;
|
||||
end;
|
||||
{$ENDIF}
|
||||
ShortCutToKey(FShortCut, ShortCutKey, ShortCutShift);
|
||||
if (Shift <> ShortCutShift) or (Key <> ShortCutKey) then exit;
|
||||
|
||||
@ -984,6 +989,9 @@ begin
|
||||
p := ClientToScreen(Point(CaretXPix, CaretYPix + LineHeight));
|
||||
Form.CurrentEditor := Sender as TCustomSynEdit;
|
||||
Execute(GetPreviousToken(Sender as TCustomSynEdit), p.x, p.y);
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
// eat it
|
||||
{$ENDIF}
|
||||
Key := VK_UNKNOWN;
|
||||
TRecordUsedToStoreEachEditorVars(fEditstuffs[i]^).NoNextKey := true;
|
||||
end;
|
||||
|
@ -3602,11 +3602,16 @@ end;
|
||||
procedure TCustomSynEdit.ShowCaret;
|
||||
begin
|
||||
if not (eoNoCaret in Options) and not (sfCaretVisible in fStateFlags) then
|
||||
begin
|
||||
if {$IFDEF SYN_LAZARUS}LCLLinux{$ELSE}Windows{$ENDIF}.ShowCaret(Handle) then
|
||||
begin
|
||||
//writeln('[TCustomSynEdit.ShowCaret] A ',Name);
|
||||
Include(fStateFlags, sfCaretVisible)
|
||||
end;
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
SetCaretRespondToFocus(Handle,not (eoPersistentCaret in fOptions));
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomSynEdit.UpdateCaret;
|
||||
|
@ -55,11 +55,20 @@ end;
|
||||
{ callback routines }
|
||||
{*************************************************************}
|
||||
|
||||
// GTKRealizeCB is used to set extra signal masks after the widget window is created
|
||||
// define extra events we're interrested in
|
||||
{-------------------------------------------------------------------------------
|
||||
function GTKRealizeCB
|
||||
Params: Widget: PGtkWidget; Data: Pointer
|
||||
Result: GBoolean
|
||||
|
||||
GTKRealizeCB is called by the gtk, whenever a widget is realized (ie mapped).
|
||||
That means that the gdk window on the xserver has been created. This function
|
||||
is used for the second part of the initialization of a widget.
|
||||
-------------------------------------------------------------------------------}
|
||||
function GTKRealizeCB(Widget: PGtkWidget; Data: Pointer): GBoolean; cdecl;
|
||||
begin
|
||||
EventTrace('realize', nil);
|
||||
// set extra signal masks after the widget window is created
|
||||
// define extra events we're interrested in
|
||||
gdk_window_set_events(Widget^.Window,
|
||||
gdk_window_get_events(Widget^.Window) or TGdkEventMask(Data));
|
||||
|
||||
@ -2029,6 +2038,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.80 2002/06/06 14:41:29 lazarus
|
||||
MG: if completion form visible it will now get all synedit keys
|
||||
|
||||
Revision 1.79 2002/06/05 12:33:57 lazarus
|
||||
MG: fixed fonts in XLFD format and styles
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user