summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Marc Levecque <jean-marc.levecque@jmlesite.fr>2013-03-03 22:42:47 +0100
committerGraeme Geldenhuys <graemeg@gmail.com>2013-03-22 16:29:53 +0000
commit5ee5b79db4825a3b2afa03dde72ddbe7e46b3c47 (patch)
tree8b2206b36c51d44f2a580d84c72081f145a3215b /src
parentd71020bc89474bb98aa49b62b769de2d6b20ca8d (diff)
downloadfpGUI-5ee5b79db4825a3b2afa03dde72ddbe7e46b3c47.tar.xz
Use dead key codes for special accentuated characters
Diffstat (limited to 'src')
-rw-r--r--src/gui/fpg_edit.pas18
-rw-r--r--src/gui/fpg_editcombo.pas16
-rw-r--r--src/gui/fpg_memo.pas16
3 files changed, 25 insertions, 25 deletions
diff --git a/src/gui/fpg_edit.pas b/src/gui/fpg_edit.pas
index c462f06e..01c52d4c 100644
--- a/src/gui/fpg_edit.pas
+++ b/src/gui/fpg_edit.pas
@@ -94,7 +94,7 @@ type
FVisibleText: TfpgString;
FVisSelStartPx: integer;
FVisSelEndPx: integer;
- FSpecialChar: integer;
+ FDeadKeyChar: integer;
function GetMarginAdjustment: integer; virtual;
procedure DrawSelection; virtual;
procedure DoOnChange; virtual;
@@ -756,10 +756,10 @@ var
prevval: string;
begin
prevval := Text;
- if FSpecialChar> -1 then
+ if FDeadKeyChar> -1 then
begin
- case FSpecialChar of
- 58536:
+ case FDeadKeyChar of
+ keyDeadDiaeresis:
case AText of
'a':
AText:= 'â';
@@ -772,7 +772,7 @@ begin
'u':
AText:= 'ü';
end;
- 58462:
+ keyDeadCircumflex:
case AText of
'a':
AText:= 'â';
@@ -786,7 +786,7 @@ begin
AText:= 'û';
end;
end;
- FSpecialChar:= -1;
+ FDeadKeyChar:= -1;
end;
s := AText;
@@ -831,8 +831,8 @@ begin
hasChanged := False;
fpgApplication.HideHint;
- if (keycode= 58536) or (keycode= 58462) then
- FSpecialChar:= keycode;
+ if (keycode= keyDeadCircumflex) or (keycode= keyDeadDiaeresis) then
+ FDeadKeyChar:= keycode;
Consumed := True;
case CheckClipBoardKey(keycode, shiftstate) of
@@ -1106,7 +1106,7 @@ begin
FPopupMenu := nil;
FDefaultPopupMenu := nil;
FOnChange := nil;
- FSpecialChar := -1;
+ FDeadKeyChar := -1;
end;
destructor TfpgBaseEdit.Destroy;
diff --git a/src/gui/fpg_editcombo.pas b/src/gui/fpg_editcombo.pas
index 311d452f..72b804ef 100644
--- a/src/gui/fpg_editcombo.pas
+++ b/src/gui/fpg_editcombo.pas
@@ -87,7 +87,7 @@ type
FSelStart: integer;
FSelOffset: integer;
FCursorPos: integer;
- FSpecialChar: integer;
+ FDeadKeyChar: integer;
procedure DoDropDown; override;
function GetText: string; virtual;
function HasText: boolean; virtual;
@@ -524,10 +524,10 @@ var
i: integer;
begin
prevval := FText;
- if FSpecialChar> -1 then
+ if FDeadKeyChar> -1 then
begin
- case FSpecialChar of
- 58536:
+ case FDeadKeyChar of
+ keyDeadDiaeresis:
case AText of
'a':
AText:= 'â';
@@ -540,7 +540,7 @@ begin
'u':
AText:= 'ü';
end;
- 58462:
+ keyDeadCircumflex:
case AText of
'a':
AText:= 'â';
@@ -554,7 +554,7 @@ begin
AText:= 'û';
end;
end;
- FSpecialChar:= -1;
+ FDeadKeyChar:= -1;
end;
s := AText;
consumed := False;
@@ -618,7 +618,7 @@ begin
hasChanged := False;
if (keycode= 58536) or (keycode= 58462) then
- FSpecialChar:= keycode;
+ FDeadKeyChar:= keycode;
if not Enabled then
consumed := False
@@ -919,7 +919,7 @@ begin
FDrawOffset := 0;
FSelectedItem := -1; // to allow typing if list is empty
FNewItem := False;
- FSpecialChar := -1;
+ FDeadKeyChar := -1;
CalculateInternalButtonRect;
end;
diff --git a/src/gui/fpg_memo.pas b/src/gui/fpg_memo.pas
index 71bcee56..c0b227ae 100644
--- a/src/gui/fpg_memo.pas
+++ b/src/gui/fpg_memo.pas
@@ -98,7 +98,7 @@ type
function GetSelectionText: TfpgString;
procedure SetSelectionText(const AText: TfpgString);
protected
- FSpecialChar: integer;
+ FDeadKeyChar: integer;
procedure HandleKeyChar(var AText: TfpgChar; var shiftstate: TShiftState; var consumed: boolean); override;
procedure HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean); override;
procedure HandleLMouseDown(x, y: integer; shiftstate: TShiftState); override;
@@ -480,7 +480,7 @@ begin
FReadOnly := False;
FUpdateCount := 0;
FBorderStyle := ebsDefault;
- FSpecialChar := -1;
+ FDeadKeyChar := -1;
FLines := TfpgMemoStrings.Create(self);
FFirstLine := 0;
@@ -1062,10 +1062,10 @@ var
begin
inherited;
prevval := Text;
- if FSpecialChar> -1 then
+ if FDeadKeyChar> -1 then
begin
- case FSpecialChar of
- 58536:
+ case FDeadKeyChar of
+ keyDeadDiaeresis:
case AText of
'a':
AText:= 'â';
@@ -1078,7 +1078,7 @@ begin
'u':
AText:= 'ü';
end;
- 58462:
+ keyDeadCircumflex:
case AText of
'a':
AText:= 'â';
@@ -1092,7 +1092,7 @@ begin
AText:= 'û';
end;
end;
- FSpecialChar:= -1;
+ FDeadKeyChar:= -1;
end;
s := AText;
@@ -1143,7 +1143,7 @@ begin
hasChanged := False;
if (keycode= 58536) or (keycode= 58462) then
- FSpecialChar:= keycode;
+ FDeadKeyChar:= keycode;
case CheckClipBoardKey(keycode, shiftstate) of
ckCopy: