summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Marc Levecque <jean-marc.levecque@jmlesite.fr>2013-03-02 22:02:40 +0100
committerGraeme Geldenhuys <graemeg@gmail.com>2013-03-22 16:29:33 +0000
commitbff6c8c3b5071ae28ba3c10cf612c55e893926b4 (patch)
tree52a983c728cf0f8d9cd5fbdc062f737864262e1f /src
parent8f5a0a7ce354a90779b3b15a6cc4809e619bd79b (diff)
downloadfpGUI-bff6c8c3b5071ae28ba3c10cf612c55e893926b4.tar.xz
Make special characters known by edit components
Diffstat (limited to 'src')
-rw-r--r--src/gui/fpg_edit.pas37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/gui/fpg_edit.pas b/src/gui/fpg_edit.pas
index f164ef76..c462f06e 100644
--- a/src/gui/fpg_edit.pas
+++ b/src/gui/fpg_edit.pas
@@ -94,6 +94,7 @@ type
FVisibleText: TfpgString;
FVisSelStartPx: integer;
FVisSelEndPx: integer;
+ FSpecialChar: integer;
function GetMarginAdjustment: integer; virtual;
procedure DrawSelection; virtual;
procedure DoOnChange; virtual;
@@ -755,6 +756,38 @@ var
prevval: string;
begin
prevval := Text;
+ if FSpecialChar> -1 then
+ begin
+ case FSpecialChar of
+ 58536:
+ case AText of
+ 'a':
+ AText:= 'â';
+ 'e':
+ AText:= 'ë';
+ 'i':
+ AText:= 'ï';
+ 'o':
+ AText:= 'ö';
+ 'u':
+ AText:= 'ü';
+ end;
+ 58462:
+ case AText of
+ 'a':
+ AText:= 'â';
+ 'e':
+ AText:= 'ê';
+ 'i':
+ AText:= 'î';
+ 'o':
+ AText:= 'ô';
+ 'u':
+ AText:= 'û';
+ end;
+ end;
+ FSpecialChar:= -1;
+ end;
s := AText;
if (not consumed) and (not ReadOnly) then
@@ -798,6 +831,9 @@ begin
hasChanged := False;
fpgApplication.HideHint;
+ if (keycode= 58536) or (keycode= 58462) then
+ FSpecialChar:= keycode;
+
Consumed := True;
case CheckClipBoardKey(keycode, shiftstate) of
ckCopy:
@@ -1070,6 +1106,7 @@ begin
FPopupMenu := nil;
FDefaultPopupMenu := nil;
FOnChange := nil;
+ FSpecialChar := -1;
end;
destructor TfpgBaseEdit.Destroy;