summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Marc Levecque <jean-marc.levecque@jmlesite.fr>2013-03-02 22:02:40 +0100
committerDavid Laurence Emerson <dle3ab@angelbase.com>2013-05-28 00:42:49 -0700
commitcc2630b5035fc2d47e30318dfbd61cb91a239b94 (patch)
tree82d0f20098dd6283ece27efdb719a8308ee9a6ac /src
parent8f95735d23467df45267090e0e1624ddbcc4ae22 (diff)
downloadfpGUI-cc2630b5035fc2d47e30318dfbd61cb91a239b94.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;