fixed sending UTF8 key presses in gtk intf

git-svn-id: trunk@7412 -
This commit is contained in:
mattias 2005-07-23 23:15:19 +00:00
parent 4813f74001
commit 6dcd7874c3
6 changed files with 27 additions and 14 deletions

View File

@ -566,6 +566,7 @@ end;
{$IFDEF SYN_LAZARUS}
procedure TSynBaseCompletionForm.UTF8KeyPress(var UTF8Key: TUTF8Char);
begin
//debugln('TSynBaseCompletionForm.UTF8KeyPress UTF8Key="',DbgStr(UTF8Key),'"');
if UTF8Key=#8 then begin
if Assigned(OnUTF8KeyPress) then OnUTF8KeyPress(Self, UTF8Key);
end else if (length(UTF8Key)>=1) and (not (UTF8Key[1] in [#33..'z'])) then
@ -1074,6 +1075,7 @@ procedure TSynCompletion.KeyPress(Sender: TObject; var Key: char);
var
F: TSynBaseCompletionForm;
begin
//debugln('TSynCompletion.UTF8KeyPress Key="',DbgStr(Key),'"');
F := Sender as TSynBaseCompletionForm;
if F.CurrentEditor <> nil then begin
with F.CurrentEditor as TCustomSynEdit do begin

View File

@ -132,10 +132,10 @@ type
fMouseOverIndex: integer;
public
function AddResult(const ResultsName: string;
const SearchText: string;
const ADirectory: string;
const AMask: string;
const TheOptions: TLazFindInFileSearchOptions): integer;
const SearchText: string;
const ADirectory: string;
const AMask: string;
const TheOptions: TLazFindInFileSearchOptions): integer;
function GetSourcePositon: TPoint;
function GetSourceFileName: string;
function GetSelectedText: string;

View File

@ -2682,8 +2682,8 @@ begin
Exit;
end;
KeyStateList := TFPList(FuncData);
if KeyStateList = nil then Exit;
if FuncData=nil then exit;
KeyStateList := TObject(FuncData) as TFPList;
UpdateList(Vkey.VKey, Pressed);
if IsToggleKey(Vkey.VKey)
@ -2986,6 +2986,9 @@ end;
{ =============================================================================
$Log$
Revision 1.283 2005/07/23 23:15:19 mattias
fixed sending UTF8 key presses in gtk intf
Revision 1.282 2005/07/23 09:27:30 mattias
replaced codetools+gtk intf TList with faster TFPList

View File

@ -2271,7 +2271,7 @@ begin
if KeyActivatedAccelerator then exit;
end;
if (not EventStopped) and (not BeforeEvent) then begin
if (not EventStopped) {and (not BeforeEvent)} then begin
// send the UTF8 keypress
// try to get the UTF8 representation of the key
{$IFDEF GTK1}
@ -8251,6 +8251,9 @@ end;
{ =============================================================================
$Log$
Revision 1.371 2005/07/23 23:15:19 mattias
fixed sending UTF8 key presses in gtk intf
Revision 1.370 2005/07/23 09:27:30 mattias
replaced codetools+gtk intf TList with faster TFPList

View File

@ -364,7 +364,8 @@ begin
begin
child := TWinControlHack(AChildren[n]);
if child.HandleAllocated
then TGtkWSWinControlPrivateClass(child.WidgetSetClass.WSPrivate).SetZPosition(child, wszpBack);
then TGtkWSWinControlPrivateClass(child.WidgetSetClass.WSPrivate).
SetZPosition(child, wszpBack);
end;
end
else begin
@ -378,19 +379,22 @@ begin
end;
end;
procedure TGtkWSWinControl.SetCursor(const AControl: TControl; const ACursor: TCursor);
procedure TGtkWSWinControl.SetCursor(const AControl: TControl;
const ACursor: TCursor);
begin
GtkProc.SetCursor(AControl as TWinControl, ACursor);
end;
procedure TGtkWSWinControl.SetFont(const AWinControl: TWinControl; const AFont: TFont);
procedure TGtkWSWinControl.SetFont(const AWinControl: TWinControl;
const AFont: TFont);
begin
DebugLn('TGtkWSWinControl.SetFont: implement me!');
{$NOTE TGtkWSWinControl.SetFont: implement me!'}
// TODO: implement me!
end;
procedure TGtkWSWinControl.SetPos(const AWinControl: TWinControl; const ALeft, ATop: Integer);
procedure TGtkWSWinControl.SetPos(const AWinControl: TWinControl;
const ALeft, ATop: Integer);
var
Widget: PGtkWidget;
Allocation: TGTKAllocation;
@ -403,7 +407,8 @@ begin
gtk_widget_size_allocate(Widget, @Allocation);
end;
procedure TGtkWSWinControl.SetSize(const AWinControl: TWinControl; const AWidth, AHeight: Integer);
procedure TGtkWSWinControl.SetSize(const AWinControl: TWinControl;
const AWidth, AHeight: Integer);
var
Widget: PGtkWidget;
Allocation: TGTKAllocation;

View File

@ -79,7 +79,7 @@ type
TLCLNonFreeMemManager = class
private
FItemSize: integer;
FItems: TList;
FItems: TFPList;
FCurItem: Pointer;
FEndItem: Pointer;
FCurSize: integer;
@ -236,7 +236,7 @@ begin
GetMem(FCurItem,FCurSize);
if ClearOnCreate then
FillChar(FCurItem^,FCurSize,0);
if FItems=nil then FItems:=TList.Create;
if FItems=nil then FItems:=TFPList.Create;
FItems.Add(FCurItem);
FEndItem := FCurItem;
Inc(FEndItem, FCurSize);