From 6c72999051b20a306d7e40a55f5df5a48253799f Mon Sep 17 00:00:00 2001 From: graemeg Date: Fri, 5 Oct 2007 12:59:49 +0000 Subject: * Implemented a UTF8Insert() and UTF8Delete() procedures * Fixed up TfpgEdit to now use the UTF-8 versions of Insert() and Delete() which fixes some of the keyboard input issue. * Removed stacks of compiler warnings all over the place. * Fixed up the TfpgMemo to now use the UTF-8 versions of Insert() and Delete() which fixes some of the keyboard input issues. --- prototypes/fpgui2/tests/edittest.dpr | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'prototypes') diff --git a/prototypes/fpgui2/tests/edittest.dpr b/prototypes/fpgui2/tests/edittest.dpr index 35b3a4ce..e4107d50 100644 --- a/prototypes/fpgui2/tests/edittest.dpr +++ b/prototypes/fpgui2/tests/edittest.dpr @@ -9,6 +9,7 @@ uses fpgfx, gfx_widget, gfx_imgfmt_bmp, + gfx_UTF8utils, gui_form, gui_label, gui_button, @@ -360,7 +361,7 @@ var bmp: TfpgImage; begin SetPosition(200, 200, 500, 350); - WindowTitle := 'Test Russian text -> Òåñò'; + WindowTitle := 'UTF-8 Title -> Òåñò'; label1 := CreateLabel(self, 5, 5, 'Hello world!'); label2 := CreateLabel(self, 5, 20, 'Hello world in Bold!'); @@ -373,7 +374,11 @@ begin edit1 := CreateEdit(self, 10, 40, 120, 22); edit1.Text := 'Hello world. Hello world. Hello world.'; edit2 := CreateEdit(self, 10, 70, 200, 22); - edit2.Text := 'Test Russian text -> Òåñò'; + edit2.Text := 'UTF-8 text -> Òåñò'; +// writeln(UTF8Length(edit2.text)); +// writeln(Length(edit2.text)); + UTF8Insert('ö', edit2.Text, 15); + // left to right and right to left text in one // fpGUI doesn't handle this correctly yet. // See http://www.catch22.net/tuts/editor18.asp for how it needs to display and work -- cgit v1.2.3-54-g00ecf