summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Haines <andrewd207@aol.com>2015-02-01 23:17:27 -0500
committerAndrew Haines <andrewd207@aol.com>2015-02-01 23:17:27 -0500
commitd351655a167dc6afe70ed659561ef8b3a4019305 (patch)
tree3843e8f137929b13a74ba787ec6f9f5541fc2427
parentc7fc66e330b4665843e195436e7e5095de5dbdfc (diff)
parent0955cc8f881782e1565447f04a0afb774e1237aa (diff)
downloadfpGUI-d351655a167dc6afe70ed659561ef8b3a4019305.tar.xz
Merge branch 'develop' of https://github.com/graemeg/fpGUI into develop
Fixed xml conflicts of lpi's manually Conflicts: examples/gui/filedialog/filedialog.lpi examples/gui/modalforms/modalforms.lpi
-rw-r--r--AUTHORS.txt17
-rw-r--r--docs/INSTALL.txt61
-rwxr-xr-xdocs/build_html.sh39
-rwxr-xr-xdocs/build_ipf.sh38
-rwxr-xr-xdocs/build_rtf.sh37
-rw-r--r--docs/builddocs.pas221
-rw-r--r--docs/fpGUIHelpIntegration.lpk2
-rw-r--r--docs/fpc_lang_ref.ipf1230
-rw-r--r--docs/fpgui-docs-project.xml6
-rw-r--r--docs/manifest.xml4
-rw-r--r--docs/xml/corelib/examples/fpg_base.fpgcanvasbase.drawarc.pas7
-rw-r--r--docs/xml/corelib/examples/fpg_base.fpgcanvasbase.fillarc.pas8
-rw-r--r--docs/xml/corelib/fpg_base.xml177
-rw-r--r--docs/xml/corelib/fpg_main.xml13
-rw-r--r--docs/xml/gui/fpg_form.xml35
-rw-r--r--docs/xml/gui/fpg_tree.xml17
-rw-r--r--docview/docs/docview.ipf5
-rw-r--r--docview/images/go-down.bmpbin1550 -> 822 bytes
-rw-r--r--docview/images/go-next.bmpbin1550 -> 822 bytes
-rw-r--r--docview/images/go-previous.bmpbin1550 -> 822 bytes
-rw-r--r--docview/images/go-up.bmpbin1550 -> 822 bytes
-rw-r--r--docview/src/arrows.inc572
-rw-r--r--docview/src/docview.rc8
-rw-r--r--docview/src/frm_main.pas27
-rw-r--r--examples/apps/ide/src/fpg_textedit.pas4
-rw-r--r--examples/apps/ide/src/frm_configureide.pas4
-rw-r--r--examples/apps/ide/src/frm_main.pas62
-rw-r--r--examples/apps/ide/src/frm_projectoptions.pas10
-rw-r--r--examples/apps/ide/src/maximus.lpi33
-rw-r--r--examples/apps/ide/src/maximus.lpr1
-rw-r--r--examples/apps/ide/src/unitlist.pas32
-rw-r--r--examples/apps/nanoedit/mainfrm.pas4
-rw-r--r--examples/gui/alignment/aligntest.lpi29
-rw-r--r--examples/gui/alignment_resize/alignment_resize.lpi27
-rw-r--r--examples/gui/animation/anim_test.lpi24
-rw-r--r--examples/gui/bevel/beveltest.lpi24
-rw-r--r--examples/gui/calendar/calendartest.lpi20
-rw-r--r--examples/gui/colorlistbox/colorlistboxtest.lpi24
-rw-r--r--examples/gui/colorwheel/colorwheel_test.lpi24
-rw-r--r--examples/gui/colorwheel/frm_main.pas243
-rw-r--r--examples/gui/combobox/comboboxtest.lpi25
-rw-r--r--examples/gui/combobox/frm_main.pas18
-rw-r--r--examples/gui/command_interface/test.lpi26
-rw-r--r--examples/gui/customstyles/customstyles.lpi7
-rw-r--r--examples/gui/customstyles/mystyle.pas4
-rw-r--r--examples/gui/customwindow/close.bmpbin0 -> 338 bytes
-rw-r--r--examples/gui/customwindow/custom_window.lpi65
-rw-r--r--examples/gui/customwindow/custom_window.lpr352
-rw-r--r--examples/gui/customwindow/extrafpc.cfg10
-rw-r--r--examples/gui/customwindow/images.inc57
-rw-r--r--examples/gui/customwindow/resize.bmpbin0 -> 474 bytes
-rw-r--r--examples/gui/customwindow/units/.gitignore1
-rw-r--r--examples/gui/dbtest/dbtest.lpi24
-rw-r--r--examples/gui/drag_n_drop/dndexample.lpi4
-rw-r--r--examples/gui/drag_n_drop/dndexample.lpr9
-rw-r--r--examples/gui/edits/edittest.lpi24
-rw-r--r--examples/gui/embedded_form/demo1.lpi24
-rw-r--r--examples/gui/embedded_form/frm_main.pas1
-rw-r--r--examples/gui/filedialog/filedialog.lpi7
-rw-r--r--examples/gui/filedialog/filedialog.lpr1
-rw-r--r--examples/gui/filegrid/filegrid.lpi28
-rw-r--r--examples/gui/fontselect/fontselect.lpi25
-rw-r--r--examples/gui/gauges/gaugetest.lpi21
-rw-r--r--examples/gui/gridediting/gridediting.lpi15
-rw-r--r--examples/gui/gridtest/gridtest.lpi2
-rw-r--r--examples/gui/gridtest/gridtest.lpr14
-rw-r--r--examples/gui/hintwindow/hintwindowtest.lpi24
-rw-r--r--examples/gui/imgtest/bitmaptest.lpi27
-rw-r--r--examples/gui/imgtest_jpeg/jpeg.lpi22
-rw-r--r--examples/gui/listbox/frm_main.pas16
-rw-r--r--examples/gui/listbox/listboxtest.lpi26
-rw-r--r--examples/gui/listviewtest/listviewtest.lpi10
-rw-r--r--examples/gui/memo/memotest.lpi20
-rw-r--r--examples/gui/menutest/menutest.lpi22
-rw-r--r--examples/gui/modalforms/modalforms.lpi7
-rw-r--r--examples/gui/mousecursor/cursordemo.lpi21
-rw-r--r--examples/gui/panel/panel_test.lpi27
-rw-r--r--examples/gui/reporting/pdf_demo.lpi2
-rw-r--r--examples/gui/scrollframe/bigframe_test.lpi78
-rw-r--r--examples/gui/scrollframe/bigframe_test.lpr114
-rw-r--r--examples/gui/scrollframe/frame_test.lpi78
-rw-r--r--examples/gui/scrollframe/frame_test.lpr112
-rw-r--r--examples/gui/splashscreen/frm_main.pas1
-rw-r--r--examples/gui/splashscreen/test.lpi24
-rw-r--r--examples/gui/splitter/splitter_test.lpi28
-rw-r--r--examples/gui/sprites/spritedemo.lpi27
-rw-r--r--examples/gui/stdimages/stdimglist.lpi9
-rw-r--r--examples/gui/tabtest/tabtest.lpi20
-rw-r--r--examples/gui/timertest/timertest.lpi28
-rw-r--r--examples/gui/togglebox/ToggleBoxTest.lpi77
-rw-r--r--examples/gui/togglebox/ToggleBoxTest.lpr30
-rw-r--r--examples/gui/togglebox/mainfrm.pas44
-rw-r--r--examples/gui/treeviewtest/treeviewtest.lpi11
-rw-r--r--examples/gui/video_vlc/frmvlcplayer.pas4
-rw-r--r--examples/gui/video_vlc/testfpguivlc.lpi10
-rw-r--r--examples/gui/wulinetest/wuline_test.lpi28
-rw-r--r--extras/contributed/editgrid/u_editgrid.pas20
-rw-r--r--extras/contributed/nicegrid/extrafpc.cfg10
-rw-r--r--extras/contributed/nicegrid/fpg_nicegrid.pas4
-rw-r--r--extras/contributed/nicegrid/main1.pas10
-rw-r--r--extras/contributed/nicegrid/nicegrid1.project68
-rw-r--r--languages/fpgui.af.po32
-rw-r--r--languages/fpgui.de.po32
-rw-r--r--languages/fpgui.en.po32
-rw-r--r--languages/fpgui.es.po32
-rw-r--r--languages/fpgui.fr.po32
-rw-r--r--languages/fpgui.it.po32
-rw-r--r--languages/fpgui.po64
-rw-r--r--languages/fpgui.pt.po32
-rw-r--r--languages/fpgui.ru.po48
-rw-r--r--src/VERSION_FILE.inc2
-rw-r--r--src/corelib/fpg_base.pas21
-rw-r--r--src/corelib/fpg_constants.pas2
-rw-r--r--src/corelib/fpg_csvparser.pas320
-rw-r--r--src/corelib/fpg_imgfmt_bmp.pas4
-rw-r--r--src/corelib/fpg_imgfmt_jpg.pas23
-rw-r--r--src/corelib/fpg_imgfmt_png.pas6
-rw-r--r--src/corelib/fpg_main.pas149
-rw-r--r--src/corelib/fpg_stdimages.pas7
-rw-r--r--src/corelib/fpg_widget.pas18
-rw-r--r--src/corelib/gdi/fpg_gdi.pas41
-rw-r--r--src/corelib/gdi/fpgui_toolkit.lpk20
-rw-r--r--src/corelib/gdi/fpgui_toolkit.pas3
-rw-r--r--src/corelib/lang_af.inc36
-rw-r--r--src/corelib/lang_de.inc8
-rw-r--r--src/corelib/lang_en.inc8
-rw-r--r--src/corelib/lang_es.inc8
-rw-r--r--src/corelib/lang_fr.inc24
-rw-r--r--src/corelib/lang_it.inc8
-rw-r--r--src/corelib/lang_pt.inc8
-rw-r--r--src/corelib/lang_ru.inc8
-rw-r--r--src/corelib/render/software/Agg2D.pas5
-rw-r--r--src/corelib/render/software/agg-demos/extrafpc.cfg21
-rw-r--r--src/corelib/render/software/agg_2D.pas60
-rw-r--r--src/corelib/render/software/agg_blur.pas2
-rw-r--r--src/corelib/render/software/agg_platform_gdi.inc13
-rw-r--r--src/corelib/stdimages.inc22
-rw-r--r--src/corelib/x11/fpg_x11.pas138
-rw-r--r--src/corelib/x11/fpgui_toolkit.lpk24
-rw-r--r--src/corelib/x11/fpgui_toolkit.pas3
-rw-r--r--src/extrafpc.cfg3
-rw-r--r--src/gui/colordialog.inc286
-rw-r--r--src/gui/fpg_basegrid.pas242
-rw-r--r--src/gui/fpg_checkbox.pas7
-rw-r--r--src/gui/fpg_customgrid.pas15
-rw-r--r--src/gui/fpg_dialogs.pas43
-rw-r--r--src/gui/fpg_editcombo.pas20
-rw-r--r--src/gui/fpg_form.pas5
-rw-r--r--src/gui/fpg_grid.pas3
-rw-r--r--src/gui/fpg_listbox.pas46
-rw-r--r--src/gui/fpg_listview.pas18
-rw-r--r--src/gui/fpg_memo.pas11
-rw-r--r--src/gui/fpg_menu.pas1
-rw-r--r--src/gui/fpg_panel.pas5
-rw-r--r--src/gui/fpg_scrollbar.pas13
-rw-r--r--src/gui/fpg_scrollframe.pas530
-rw-r--r--src/gui/fpg_stringgridbuilder.pas178
-rw-r--r--src/gui/fpg_style_win8.pas2
-rw-r--r--src/gui/fpg_tab.pas11
-rw-r--r--src/gui/fpg_toggle.pas282
-rw-r--r--src/gui/fpg_tree.pas23
-rw-r--r--src/gui/inputintegerdialog.inc157
-rw-r--r--src/gui/inputquerydialog.inc2
-rw-r--r--src/gui/selectdirdialog.inc5
-rw-r--r--tools/imageconvert/extrafpc.cfg9
-rw-r--r--tools/makefont/makefonts.lpi70
-rw-r--r--tools/makefont/makefonts.lpr26
-rw-r--r--tools/makefont/readme.txt43
-rw-r--r--tools/makefont/u_data.pas2053
-rw-r--r--tools/makefont/u_main.pas120
-rw-r--r--tools/makefont/u_parsettf.pas708
-rw-r--r--uidesigner/anchors.inc52
-rw-r--r--uidesigner/icons.inc214
-rw-r--r--uidesigner/images/scrollframe.bmpbin0 -> 1618 bytes
-rw-r--r--uidesigner/images/toggle.bmpbin0 -> 1850 bytes
-rw-r--r--uidesigner/newformdesigner.pas59
-rw-r--r--uidesigner/uidesigner.lpi8
-rw-r--r--uidesigner/uidesigner.lpr25
-rw-r--r--uidesigner/uidesigner.prj1067
-rw-r--r--uidesigner/uidesigner_clean.prj361
-rw-r--r--uidesigner/units/i386-freebsd/.gitignore1
-rw-r--r--uidesigner/units/i386-linux/.gitignore1
-rw-r--r--uidesigner/units/i386-win32/.gitignore1
-rw-r--r--uidesigner/units/x86_64-freebsd/.gitignore1
-rw-r--r--uidesigner/units/x86_64-linux/.gitignore1
-rw-r--r--uidesigner/vfddesigner.pas102
-rw-r--r--uidesigner/vfdforms.pas40
-rw-r--r--uidesigner/vfdmain.pas29
-rw-r--r--uidesigner/vfdresizer.pas8
-rw-r--r--uidesigner/vfdwidgets.pas41
190 files changed, 10518 insertions, 2690 deletions
diff --git a/AUTHORS.txt b/AUTHORS.txt
index d61ab73e..3f5a6bfc 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -10,23 +10,24 @@ Graeme Geldenhuys <graemeg@gmail.com>
Implementation inspired by works from
-------------------------------------
-Sebastian Guenther
-Viktor Nagy
+Sebastian Guenther for the very first fpGUI implementation
+Viktor Nagy for ideas from the LPTK project
Milan Marusinec (Milano) for the AggPas port
Contributors
------------
-Felipe Monteiro de Carvalho
+Alexsander Rosa
Andrew Haines
-Giuliano Colla
-Jean-Marc Levecque
Antonio Sanguigni
-Vladimir Zhirov
-Alexsander Rosa
+David Laurence Emerson
+Felipe Monteiro de Carvalho
+Giuliano Colla
Horacio Jamilis
-Michael van Canneyt
+Jean-Marc Levecque
Jean-Pierre Anghel
+Michael van Canneyt
+Vladimir Zhirov
______________.o0O0o.______________
diff --git a/docs/INSTALL.txt b/docs/INSTALL.txt
index 806b7d82..26eee168 100644
--- a/docs/INSTALL.txt
+++ b/docs/INSTALL.txt
@@ -5,8 +5,8 @@
- Building fpGUI from the Command Line
- ====================================
+Building fpGUI from the Command Line
+â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
This is still a work in progress until I can find a suitable solution. I'm
not 100% satisfied with this, but it's a quick and dirty way to get things
@@ -28,12 +28,12 @@ The extrafpc.cfg file located in the src directory is combined with your global
fpc.cfg file. The local extrafpc.cfg file sets up all the required search and
include paths to compile the CoreLib and GUI directories.
-All compiled units (*.o and *.ppu) are saved in the <fpgui>/lib directory. This
+All compiled units (*.o and *.ppu) are saved in the <fpgui>/lib directory. This
makes the search paths for you applications a little easier to setup.
- Building fpGUI using Lazarus
- ============================
+Building fpGUI using Lazarus
+â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
I use a Lazarus feature call Packages that compiles the required
units and keeps track of the compiled units and paths when creating
@@ -54,8 +54,8 @@ applications.
source. The compiled units will be placed in the <project>/units
directory.
-When you create you own project, all you need to do is tell Lazarus to
-associate the 'fpgui_package.lpk' with your project and it will automatically
+When you create you own project, all you need to do is tell Lazarus to
+associate the 'fpgui_package.lpk' with your project and it will automatically
find all the fpGUI compiled units and source for you.
* Creating a new project. Select Project->New Project. Select
@@ -69,8 +69,8 @@ find all the fpGUI compiled units and source for you.
automatically include the paths to the fpGUI compiled units for you.
- Building fpGUI from the Free Pascal Text IDE
- ============================================
+Building fpGUI from the Free Pascal Text IDE
+â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
First you would need to setup the 'fp' IDE to find the related files.
As far as I understand the text mode IDE has it's own built-in compiler
@@ -93,7 +93,7 @@ so doesn't read the standard fpc.cfg file.
Again change the paths to point to your actual directories and
X11 or GDI corelib backend.
- /home/graemeg/programming/fpGUI/src/corelib
+ /home/graemeg/programming/fpGUI/src/corelib
/home/graemeg/programming/fpGUI/src/corelib/x11
* Now changes to 'Miscellaneous' tab, PPU output directory. Type in
@@ -106,11 +106,11 @@ so doesn't read the standard fpc.cfg file.
directories for you!
* Now you are ready to open your projects main program unit (F3) and
- compiling it by pressing (F9).
+ compiling it by pressing (F9).
- Compiling any of the examples from the Command Line
- ===================================================
+Compiling any of the examples from the Command Line
+â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
You need to compile fpGUI first as mentioned above!
Every project in the ../examples directory has it's own extrafpc.cfg file.
@@ -123,17 +123,22 @@ Example:
fpc @extrafpc.cfg docedit.lpr
- MacOSX instructions and known issues
- ====================================
+Mac OSX instructions and known issues
+â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
-NOTE:
- MacOSX is still an unsupported platform, but some users have reported
+NOTE #1:
+ MacOSX is still an unsupported platform, but users have reported
that it works, so I decided to add some of their notes here for any other
Mac users that want to try fpGUI.
-To run fpGUI based application under MacOSX, you use the X11 backend. X11
-is included with all recent MacOSX versions (in older OSX versions it was
-a separate install - but included on the install DVD).
+NOTE #2:
+ It seems Apple stopped shipping X11 with OSX. From OSX 10.9 you need to
+ install X11 Server support by downloading it from the open source project
+ named XQuartz [http://xquartz.macosforge.org/landing/].
+
+To compile and run fpGUI based application under MacOSX, you use the X11 backend.
+X11 is included with all recent MacOSX versions (in older OSX versions it was a
+separate install - but included on the install DVD).
An example workflow to work with any fpgui app is:
a) launch X11 (Applications -> Utilities)
@@ -156,14 +161,20 @@ d) type ./appname to start the application "appname"
choose the path during installation, so probably other OSX users will
have to double check the correct X11 library path.
+ If you still get the error about the missing X11 the you might have to setup
+ a generic symlink. eg:
+
+ cd /usr/X11/lib
+ sudo ln -s libX11.6.dylib libX11.dylib
+ sudo ln -s libXft.2.dylib libXft.dylib
+ sudo ln -s libfontconfig.1.dylib libfontconfig.dylib
+
* Compiling from the command line, the compiler cannot create the
- sub-directory "units" used by most demos inluded with fpGUI. So remember to
- create such a directory if the compiler fails. The compiler output will
+ sub-directory "units" used by most demos included with fpGUI. So remember to
+ create such a directory if the compilation fails. The compiler output will
clearly state such a situation. When using Lazarus or Maximus IDE to compile
fpGUI projects, the IDE will creates the missing unit output path for you.
- =================[ END ]===================
-
-
+ â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•[ END ]â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
diff --git a/docs/build_html.sh b/docs/build_html.sh
deleted file mode 100755
index b43cdd63..00000000
--- a/docs/build_html.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-# fpc/bin must be in your PATH
-
-app=fpdoc
-#app=/opt/fpc_2.5.1/x86_64-linux/bin/fpdoc
-#app=/media/flash16gig/programming/fpdoc_ipf/fpdoc
-
-$app \
- --package=fpgui \
- --format=html \
- --output=html/ \
- --charset=UTF-8 \
- --footer-date='yyyy-mm-dd' \
- --input='-Fi../src/corelib ../src/corelib/fpg_base.pas' --descr=xml/corelib/fpg_base.xml \
- --input='-Fi../src/corelib ../src/corelib/x11/fpg_x11.pas' --descr=xml/corelib/x11/fpg_x11.xml \
- --input='-Fi../src/corelib ../src/corelib/gdi/fpg_gdi.pas' --descr=xml/corelib/gdi/fpg_gdi.xml \
- --input='-Fi../src/corelib -Fi../src ../src/corelib/fpg_main.pas' --descr=xml/corelib/fpg_main.xml \
- --input='-Fi../src/corelib ../src/corelib/fpg_extinterpolation.pas' --descr=xml/corelib/fpg_extinterpolation.xml \
- --input='-Fi../src/corelib ../src/corelib/fpg_imgfmt_bmp.pas' --descr=xml/corelib/fpg_imgfmt_bmp.xml \
- --input='-Fi../src/corelib ../src/corelib/fpg_widget.pas' --descr=xml/corelib/fpg_widget.xml \
- --input='-Fi../src/corelib -Fi../src/corelib/x11 ../src/corelib/fpg_utils.pas' --descr=xml/corelib/fpg_utils.xml \
- --input='-Fi../src/corelib ../src/corelib/fpg_wuline.pas' --descr=xml/corelib/fpg_wuline.xml \
- --input='-Fi../src/corelib ../src/corelib/fpg_constants.pas' --descr=xml/corelib/fpg_constants.xml \
- --input='-Fi../src -Fu../src/corelib/x11/ -Fi../src/corelib/x11/ -Fu../src/gui/ -Fu../src/corelib/ ../src/corelib/fpg_command_intf.pas' --descr=xml/corelib/fpg_command_intf.xml \
- --input='-Fi../src/gui ../src/gui/fpg_dialogs.pas' --descr=xml/gui/fpg_dialogs.xml \
- --input='-Fi../src/gui ../src/gui/fpg_hyperlink.pas' --descr=xml/gui/fpg_hyperlink.xml \
- --input='-Fi../src/gui ../src/gui/fpg_colormapping.pas' --descr=xml/gui/fpg_colormapping.xml \
- --input='-Fi../src/gui ../src/gui/fpg_colorwheel.pas' --descr=xml/gui/fpg_colorwheel.xml \
- --input='-Fi../src/gui ../src/gui/fpg_button.pas' --descr=xml/gui/fpg_button.xml \
- --input='-Fi../src/gui ../src/gui/fpg_tree.pas' --descr=xml/gui/fpg_tree.xml
-
-# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \
-# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \
-# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \
-
-# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \
-# --input='-Fi../src/corelib ../src/corelib/fpg_.pas' --descr=xml/corelib/fpg_.xml \
-
-
diff --git a/docs/build_ipf.sh b/docs/build_ipf.sh
deleted file mode 100755
index bdb841b1..00000000
--- a/docs/build_ipf.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-# fpc/bin must be in your PATH
-
-app=fpdoc
-#app=/opt/fpc_2.5.1/x86_64-linux/bin/fpdoc
-#app=/media/flash16gig/programming/fpdoc_ipf/fpdoc
-
-$app \
- --package=fpgui \
- --format=ipf \
- --output=fpgui.ipf \
- --duplinkeddoc \
- --input='-Fi../src/corelib ../src/corelib/fpg_base.pas' --descr=xml/corelib/fpg_base.xml \
- --input='-Fi../src/corelib ../src/corelib/x11/fpg_x11.pas' --descr=xml/corelib/x11/fpg_x11.xml \
- --input='-Fi../src/corelib ../src/corelib/gdi/fpg_gdi.pas' --descr=xml/corelib/gdi/fpg_gdi.xml \
- --input='-Fi../src/corelib -Fi../src ../src/corelib/fpg_main.pas' --descr=xml/corelib/fpg_main.xml \
- --input='-Fi../src/corelib ../src/corelib/fpg_extinterpolation.pas' --descr=xml/corelib/fpg_extinterpolation.xml \
- --input='-Fi../src/corelib ../src/corelib/fpg_imgfmt_bmp.pas' --descr=xml/corelib/fpg_imgfmt_bmp.xml \
- --input='-Fi../src/corelib ../src/corelib/fpg_widget.pas' --descr=xml/corelib/fpg_widget.xml \
- --input='-Fi../src/corelib -Fi../src/corelib/x11 ../src/corelib/fpg_utils.pas' --descr=xml/corelib/fpg_utils.xml \
- --input='-Fi../src/corelib ../src/corelib/fpg_wuline.pas' --descr=xml/corelib/fpg_wuline.xml \
- --input='-Fi../src/corelib ../src/corelib/fpg_constants.pas' --descr=xml/corelib/fpg_constants.xml \
- --input='-Fi../src -Fu../src/corelib/x11/ -Fi../src/corelib/x11/ -Fu../src/gui/ -Fu../src/corelib/ ../src/corelib/fpg_command_intf.pas' --descr=xml/corelib/fpg_command_intf.xml \
- --input='-Fi../src/gui ../src/gui/fpg_dialogs.pas' --descr=xml/gui/fpg_dialogs.xml \
- --input='-Fi../src/gui ../src/gui/fpg_hyperlink.pas' --descr=xml/gui/fpg_hyperlink.xml \
- --input='-Fi../src/gui ../src/gui/fpg_colormapping.pas' --descr=xml/gui/fpg_colormapping.xml \
- --input='-Fi../src/gui ../src/gui/fpg_colorwheel.pas' --descr=xml/gui/fpg_colorwheel.xml \
- --input='-Fi../src/gui ../src/gui/fpg_button.pas' --descr=xml/gui/fpg_button.xml \
- --input='-Fi../src/gui ../src/gui/fpg_tree.pas' --descr=xml/gui/fpg_tree.xml
-
-# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \
-# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \
-# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \
-
-# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \
-# --input='-Fi../src/corelib ../src/corelib/fpg_.pas' --descr=xml/corelib/fpg_.xml \
-
-
diff --git a/docs/build_rtf.sh b/docs/build_rtf.sh
deleted file mode 100755
index 33b1825e..00000000
--- a/docs/build_rtf.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-# fpc/bin must be in your PATH
-
-app=fpdoc
-#app=/opt/fpc_2.5.1/x86_64-linux/bin/fpdoc
-#app=/media/flash16gig/programming/fpdoc_ipf/fpdoc
-
-$app \
- --package=fpgui \
- --format=rtf \
- --output=fpgui.rtf \
- --input='-Fi../src/corelib ../src/corelib/fpg_base.pas' --descr=xml/corelib/fpg_base.xml \
- --input='-Fi../src/corelib ../src/corelib/x11/fpg_x11.pas' --descr=xml/corelib/x11/fpg_x11.xml \
- --input='-Fi../src/corelib ../src/corelib/gdi/fpg_gdi.pas' --descr=xml/corelib/gdi/fpg_gdi.xml \
- --input='-Fi../src/corelib -Fi../src ../src/corelib/fpg_main.pas' --descr=xml/corelib/fpg_main.xml \
- --input='-Fi../src/corelib ../src/corelib/fpg_extinterpolation.pas' --descr=xml/corelib/fpg_extinterpolation.xml \
- --input='-Fi../src/corelib ../src/corelib/fpg_imgfmt_bmp.pas' --descr=xml/corelib/fpg_imgfmt_bmp.xml \
- --input='-Fi../src/corelib ../src/corelib/fpg_widget.pas' --descr=xml/corelib/fpg_widget.xml \
- --input='-Fi../src/corelib -Fi../src/corelib/x11 ../src/corelib/fpg_utils.pas' --descr=xml/corelib/fpg_utils.xml \
- --input='-Fi../src/corelib ../src/corelib/fpg_wuline.pas' --descr=xml/corelib/fpg_wuline.xml \
- --input='-Fi../src/corelib ../src/corelib/fpg_constants.pas' --descr=xml/corelib/fpg_constants.xml \
- --input='-Fi../src -Fu../src/corelib/x11/ -Fi../src/corelib/x11/ -Fu../src/gui/ -Fu../src/corelib/ ../src/corelib/fpg_command_intf.pas' --descr=xml/corelib/fpg_command_intf.xml \
- --input='-Fi../src/gui ../src/gui/fpg_dialogs.pas' --descr=xml/gui/fpg_dialogs.xml \
- --input='-Fi../src/gui ../src/gui/fpg_hyperlink.pas' --descr=xml/gui/fpg_hyperlink.xml \
- --input='-Fi../src/gui ../src/gui/fpg_colormapping.pas' --descr=xml/gui/fpg_colormapping.xml \
- --input='-Fi../src/gui ../src/gui/fpg_colorwheel.pas' --descr=xml/gui/fpg_colorwheel.xml \
- --input='-Fi../src/gui ../src/gui/fpg_button.pas' --descr=xml/gui/fpg_button.xml \
- --input='-Fi../src/gui ../src/gui/fpg_tree.pas' --descr=xml/gui/fpg_tree.xml
-
-# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \
-# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \
-# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \
-
-# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \
-# --input='-Fi../src/corelib ../src/corelib/fpg_.pas' --descr=xml/corelib/fpg_.xml \
-
-
diff --git a/docs/builddocs.pas b/docs/builddocs.pas
deleted file mode 100644
index c85abe58..00000000
--- a/docs/builddocs.pas
+++ /dev/null
@@ -1,221 +0,0 @@
-{
- Simple program to buid a documenation script.
- It looks for xml description files. Matches those to source files,
- and includes those matches in the documentation script.
-
- TODO:
- * Parameter to build script or execute directly fpdoc.
- * Make program build Linux shell scripts and Windows Batch scripts.
- * Add parameter to include all units, not just those that have documentation
- * Order of files are important to fpdoc, so we need some way of indicating the
- order in which files must be processed.
-}
-program builddocs;
-
-{$mode objfpc}{$H+}
-
-uses
- Classes, SysUtils, CustApp, Process;
-
-const
- cFPDOC = 'fpdoc';
- cFPDocParameters = ' --package=fpgui --format=ipf --output=fpgui.ipf --content=fpgui.cnt --duplinkeddoc ';
- cFilePath = '-Fi../src -Fu../src/corelib/x11/ -Fi../src/corelib/x11/ -Fu../src/gui/ -Fu../src/corelib/ %s';
- cFileLine = ' --input=''%s'' --descr=%s';
-
-type
- TBuildDocsApp = class(TCustomApplication)
- private
- FXMLFiles: TStrings;
- FPasFiles: TStrings;
- FCommand: string;
- FDivider: string;
- procedure FileSearch(SearchDir: string; ExtensionMask: string; var FileList: TStrings; Recursive: boolean = True);
- function ExtractFileNameOnly(AFilename: string): string;
- procedure BuildCommandLine;
- procedure WriteScript;
- procedure ExecuteFPDoc;
- protected
- procedure DoRun; override;
- public
- constructor Create(TheOwner: TComponent); override;
- destructor Destroy; override;
- procedure WriteHelp; virtual;
- end;
-
-{ TBuildDocsApp }
-
-procedure TBuildDocsApp.FileSearch(SearchDir: string; ExtensionMask: string;
- var FileList: TStrings; Recursive: boolean);
-var
- Info : TSearchRec;
- ExtensionList: TStrings;
-begin
- SearchDir := IncludeTrailingPathDelimiter(SearchDir);
-
- ExtensionList := TStringList.Create;
- ExtensionList.Delimiter := ';';
- ExtensionList.DelimitedText := ExtensionMask;
-
- if FindFirst(SearchDir+AllFilesMask, faAnyFile and faDirectory, Info) = 0 then
- begin
- repeat
- if Recursive then
- if ((Info.Attr and faDirectory) = faDirectory) and (Info.Name <> '.') and (Info.Name <> '..')then
- FileSearch(SearchDir + Info.Name, ExtensionMask, FileList, Recursive);
-
- if ExtensionList.IndexOf(ExtractFileExt(Info.Name)) <> -1 then
- begin
- if FileList.IndexOf(SearchDir + Info.Name) = -1 then
- FileList.Add(SearchDir + Info.Name);
- end;
- until FindNext(Info)<>0;
- end;
- FindClose(Info);
-
- ExtensionList.Free;
-end;
-
-function TBuildDocsApp.ExtractFileNameOnly(AFilename: string): string;
-var
- p: integer;
-begin
- Result := ExtractFileName(AFilename);
- p := Length(ExtractFileExt(Result));
- Result := Copy(Result, 1, Length(Result)-p);
-end;
-
-procedure TBuildDocsApp.BuildCommandLine;
-var
- lPFile, lXFile: string;
- i, j: integer;
- lFPDoc: string;
-begin
- lFPDoc := GetEnvironmentVariable('fpdoc');
- if lFPDoc = '' then
- lFPDoc := cFPDOC;
- FCommand := lFPDoc + cFPDocParameters;
- FileSearch('xml/', '.xml', FXMLFiles, True);
- FileSearch('../src/', '.pas', FPasFiles, True);
-
- for i := 0 to FXMLFiles.Count-1 do
- begin
- lXFile := ExtractFileNameOnly(FXMLFiles[i]);
- for j := 0 to FPasFiles.Count-1 do
- begin
- lPFile := ExtractFileNameOnly(FPasFiles[j]);
- if SameText(lXFile, lPFile) then
- begin
- // fix command line separators at the same time
- FCommand := FCommand + FDivider + Format(cFileLine, [SetDirSeparators(Format(cFilePath, [FPasFiles[j]])), FXMLFiles[i]]);
- end;
- end;
- end;
-
-// FCommand := SetDirSeparators(FCommand);
- {.$IFDEF Windows}
- FCommand := StringReplace(FCommand, '''', '"', [rfReplaceAll]);
- {.$ENDIF}
-end;
-
-procedure TBuildDocsApp.WriteScript;
-begin
- FXMLFiles.Text := FCommand;
- {$IFDEF Windows}
- FXMLFiles.SaveToFile('runme2.bat');
- {$else}
- FXMLFiles.SaveToFile('runme2.sh');
- {$endif}
-end;
-
-procedure TBuildDocsApp.ExecuteFPDoc;
-var
- p: TProcess;
-begin
- p := TProcess.Create(nil);
- try
-// writeln('------------ START -------------------');
-// writeln(FCommand);
-// writeln('------------ END -------------------');
- p.CommandLine := FCommand;
- p.Options := [poWaitOnExit];
- p.Execute;
- finally
- p.Free;
- end;
-end;
-procedure TBuildDocsApp.DoRun;
-var
- ErrorMsg: String;
-begin
- // quick check parameters
- ErrorMsg:=CheckOptions('hs','help');
- if ErrorMsg<>'' then begin
- ShowException(Exception.Create(ErrorMsg));
- Terminate;
- Exit;
- end;
-
- // parse parameters
- if HasOption('h','help') then
- begin
- WriteHelp;
- Terminate;
- Exit;
- end;
-
- if HasOption('s','script') then
- FDivider := {$ifdef unix}' \' + LineEnding {$else} '' {$endif}
- else
- FDivider := '';
-
- BuildCommandLine;
-
- if HasOption('s','script') then
- WriteScript
- else
- ExecuteFPDoc;
-
- // stop program loop
- Terminate;
-end;
-
-constructor TBuildDocsApp.Create(TheOwner: TComponent);
-begin
- inherited Create(TheOwner);
- StopOnException:=True;
- FXMLFiles := TStringList.Create;
- FPasFiles := TStringList.Create;
-end;
-
-destructor TBuildDocsApp.Destroy;
-begin
- FXMLFiles.Free;
- FPasFiles.Free;
- inherited Destroy;
-end;
-
-procedure TBuildDocsApp.WriteHelp;
-begin
- { add your help code here }
- writeln('Usage: ',ExeName,' -h');
- writeln('');
- writeln(' -h Show this help');
- writeln(' -s Generate a script/batch file to run later. Recommended');
- writeln(' for Linux systems.');
- writeln('');
- writeln('If no command line parameters are specified, it will execute FPDoc.');
- writeln('This option is recommended for Windows systems.');
- writeln('');
-end;
-
-var
- Application: TBuildDocsApp;
-
-begin
- Application:=TBuildDocsApp.Create(nil);
- Application.Title:='Build Docs App';
- Application.Run;
- Application.Free;
-end.
-
diff --git a/docs/fpGUIHelpIntegration.lpk b/docs/fpGUIHelpIntegration.lpk
index 7d02a4e4..7c06a92a 100644
--- a/docs/fpGUIHelpIntegration.lpk
+++ b/docs/fpGUIHelpIntegration.lpk
@@ -24,7 +24,7 @@
"/>
<License Value="LGPL
"/>
- <Version Minor="3"/>
+ <Version Major="1" Minor="3"/>
<Files Count="1">
<Item1>
<Filename Value="pkghelpfpGUI.pas"/>
diff --git a/docs/fpc_lang_ref.ipf b/docs/fpc_lang_ref.ipf
index abe951e9..366edb3e 100644
--- a/docs/fpc_lang_ref.ipf
+++ b/docs/fpc_lang_ref.ipf
@@ -1,3 +1,5 @@
+.* This file is encoded using IBM850 encoding
+.* :encoding=IBM850:
:userdoc.
:title.Free Pascal&colon. Language Reference guide
:docprof toc=123456.
@@ -9,9 +11,9 @@
.nameit symbol='fpcversion' text='2&per.4'
.nameit symbol='date' text='December 2009'
.nameit symbol='progref' text='Programmer&apos.s Guide [ http://www.freepascal.org/docs.var ]'
-.nameit symbol='ra' text='â–º'
-.nameit symbol='la' text='â—„'
-.nameit symbol='dar' text='â–¼'
+.nameit symbol='ra' text='>'
+.nameit symbol='la' text='<'
+.nameit symbol='dar' text='v'
.nameit symbol='uar' text='^'
.nameit symbol='linux' text='Linux'
.* ==============================================================
@@ -31,10 +33,6 @@ Document version &fpcversion. (r617)
Written by :hp1.Michael van Canneyt:ehp1.
.br
LaTeX to IPF conversion by :hp1.Graeme Geldenhuys:ehp1.
-:p.
-:p.
-:p.
-:note.:color fc=red.Please switch DocView to using the UTF-8 text encoding for this document.:color fc=default.
.* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
.* % About this guide
@@ -42,33 +40,33 @@ LaTeX to IPF conversion by :hp1.Graeme Geldenhuys:ehp1.
:h2.About this guide
:p.
This document serves as the reference for the Pascal langauge as implemented
-by the &fpc. compiler. It describes all Pascal constructs supported by
-&fpc., and lists all supported data types. It does not, however, give a
-detailed explanation of the Pascal language: it is not a tutorial.
-The aim is to list which Pascal constructs are supported, and to show
+by the &fpc. compiler. It describes all Pascal constructs supported by
+&fpc., and lists all supported data types. It does not, however, give a
+detailed explanation of the Pascal language: it is not a tutorial.
+The aim is to list which Pascal constructs are supported, and to show
where the &fpc. implementation differs from the &tp. or &delphi.
implementations.
:p.
-The &tp. and &delphi. Pascal compilers introduced various features in the
+The &tp. and &delphi. Pascal compilers introduced various features in the
Pascal language. The Free Pascal compiler emulates these compilers in the
appropriate mode of the compiler: certain features are available only
-if the compiler is switched to the appropriate mode. When required for
-a certain feature, the use of the :hp1.-M:ehp1. command-line switch or
+if the compiler is switched to the appropriate mode. When required for
+a certain feature, the use of the :hp1.-M:ehp1. command-line switch or
:hp1.{$MODE}:ehp1. directive will be indicated in the text. More information
about the various modes can be found in the user's manual and the
programmer's manual.
:p.
Earlier versions of this document also contained the reference documentation
-of the :hp1.system:ehp1. unit and :hp1.objpas:ehp1. unit. This has been moved to the
+of the :hp1.system:ehp1. unit and :hp1.objpas:ehp1. unit. This has been moved to the
RTL reference guide.
.* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
.* % Notations
:h3.Notations
:p.
-Throughout this document, we will refer to functions, types and variables
+Throughout this document, we will refer to functions, types and variables
with :font facename=Courier size=16x16.typewriter:font facename='System Proportional'. font.
Files are referred to with a sans font: :font facename=Sans size=16x16.filename:font facename='System Proportional'..
@@ -85,35 +83,35 @@ other, then the diagram is ended.
:p.
Syntactical elements are written like this:
:cgraphic.
-&ra.&ra.─── syntactical elemements are like this ───────────────────────────────────&ra.&la.
+&ra.&ra.ÄÄÄ syntactical elemements are like this ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
:ecgraphic.
:p.
Keywords which must be typed exactly as in the diagram:
:cgraphic.
-&ra.&ra.─── :hp2.keywords are like this:ehp2. ─────────────────────────────────────────────────&ra.&la.
+&ra.&ra.ÄÄÄ :hp2.keywords are like this:ehp2. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
:ecgraphic.
:p.
When something can be repeated, there is an arrow around it:
:cgraphic.
-&ra.&ra.─────┬─ this can be repeated ─┬─────────────────────────────────────────────&ra.&la.
- ^────────────────────────┘
+&ra.&ra.ÄÄÄÄÄÂÄ this can be repeated ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
When there are different possibilities, they are listed in rows:
:cgraphic.
-&ra.&ra.─────┬─ First possibility ──┬───────────────────────────────────────────────&ra.&la.
- └─ Second possibility ─┘
+&ra.&ra.ÄÄÄÄÄÂÄ First possibility ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ Second possibility ÄÙ
:ecgraphic.
:p.
Note, that one of the possibilities can be empty:
:cgraphic.
-&ra.&ra.─────┬──────────────────────┬───────────────────────────────────────────────&ra.&la.
- ├─ First possibility ─┤
- └─ Second possibility ─┘
+&ra.&ra.ÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÃÄ First possibility Ä´
+ ÀÄ Second possibility ÄÙ
:ecgraphic.
:p.
@@ -126,7 +124,7 @@ combined and nested.
.* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:h2.About the Pascal Language
:p.
-The language Pascal was originally designed by Niklaus Wirth around 1970. It
+The language Pascal was originally designed by Niklaus Wirth around 1970. It
has evolved significantly since that day, with a lot of contributions by the
various compiler constructors (Notably: Borland). The basic elements have been
kept throughout the years:
@@ -141,13 +139,13 @@ kept throughout the years:
:p.
The &tp. and &delphi. Pascal compilers introduced various features in
-the Pascal language, most notably easier string handling and object
+the Pascal language, most notably easier string handling and object
orientedness. The &fpc. compiler initially emulated most of &tp.
and later on &delphi.. It emulates these compilers in the appropriate mode
-of the compiler: certain features are available only if the compiler is
+of the compiler: certain features are available only if the compiler is
switched to the appropriate mode. When required for a certain feature, the use
of the -M command-line switch or {$MODE } directive will be indicated in the
-text. More information about the various modes can be found in the User's
+text. More information about the various modes can be found in the User's
Manual and the Programmer's Manual.
@@ -156,13 +154,13 @@ Manual and the Programmer's Manual.
.* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:h2.Pascal Tokens
:p.
-Tokens are the basic lexical building blocks of source code: they
+Tokens are the basic lexical building blocks of source code: they
are the 'words' of the language: characters are combined into tokens according
to the rules of the programming language. There are five classes of tokens:
:parml tsize=20 break=none.
:pt.:hp2.reserved words:ehp2.
-:pd. These are words which have a fixed meaning in the language. They cannot
+:pd. These are words which have a fixed meaning in the language. They cannot
be changed or redefined.
:pt.:hp2.identifiers:ehp2.
@@ -178,7 +176,7 @@ so on.
:pt.:hp2.constants:ehp2.
:pd.Numerical or character constants are used to denote actual values in the
-source code, such as 1 (integer constant) or 2.3 (float constant) or
+source code, such as 1 (integer constant) or 2.3 (float constant) or
'String constant' (a string: a piece of text).
:eparml.
@@ -195,18 +193,18 @@ various ways to denote strings&comma. numbers&comma. identifiers etc&per.
symbols in a Pascal source file.
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Recognised symbols:ehp2.
-&ra.&ra.─── letter ──┬─ A..Z ─┬─────────────────────────────────────────────────────&ra.&la.
- └─ a..z ─┘
+&ra.&ra.ÄÄÄ letter ÄÄÂÄ A..Z ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ a..z ÄÙ
-&ra.&ra.─── digit ─ 0..9 ───────────────────────────────────────────────────────────&ra.&la.
+&ra.&ra.ÄÄÄ digit Ä 0..9 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-&ra.&ra.─── hex digit ──┬─ 0..9 ─┬──────────────────────────────────────────────────&ra.&la.
- ├─ A..Z ─┤
- └─ a..z ─┘
-└──────────────────────────────────────────────────────────────────────────────┘
+&ra.&ra.ÄÄÄ hex digit ÄÄÂÄ 0..9 ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÃÄ A..Z Ä´
+ ÀÄ a..z ÄÙ
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -222,11 +220,11 @@ and the following character pairs too:
:exmp.
:p.
-When used in a range specifier, the character pair (. is equivalent to the
-left square bracket [. Likewise, the character pair .) is equivalent to the
+When used in a range specifier, the character pair (. is equivalent to the
+left square bracket [. Likewise, the character pair .) is equivalent to the
right square bracket ]. When used for comment delimiters, the character pair
(* is equivalent to the left brace { and the character pair *) is equivalent
-to the right brace }. These character pairs retain their normal meaning in
+to the right brace }. These character pairs retain their normal meaning in
string expressions.
.* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -235,7 +233,7 @@ string expressions.
:p.
Comments are pieces of the source code which are completely discarded by the
compiler. They exist only for the benefit of the programmer, so he can explain
-certain pieces of code. For the compiler, it is as if the comments were not
+certain pieces of code. For the compiler, it is as if the comments were not
present.
:p.
@@ -247,7 +245,7 @@ Function Beautiful: Integer;
:p.
The use of (* and *) as comment delimiters dates from the very first days of
-the Pascal language. It has been replaced mostly by the use of { and } as
+the Pascal language. It has been replaced mostly by the use of { and } as
comment delimiters, as in the following example:
:xmp.
{ My beautiful function returns an interesting result }
@@ -313,7 +311,7 @@ The compiler will react with a 'invalid character' error when it encounters
such constructs, regardless of the :hp1.-Mturbo:ehp1. switch.
:nt.
-In :hp1.TP:ehp1. and :hp1.Delphi:ehp1. mode, nested comments are not allowed,
+In :hp1.TP:ehp1. and :hp1.Delphi:ehp1. mode, nested comments are not allowed,
for maximum compatibility with existing code for those compilers.
:ent.
@@ -324,12 +322,12 @@ for maximum compatibility with existing code for those compilers.
:h3.Reserved words
:p.
Reserved words are part of the Pascal language, and as such, cannot be
-redefined by the programmer. Throughout the syntax diagrams they will be
+redefined by the programmer. Throughout the syntax diagrams they will be
denoted using a :hp2.bold:ehp2. typeface. Pascal is not case sensitive so the compiler
will accept any combination of upper or lower case letters for reserved words.
:p.
-We make a distinction between &tp. and &delphi. reserved words. In
+We make a distinction between &tp. and &delphi. reserved words. In
:hp2.TP:ehp2. mode, only the &tp. reserved words are recognised, but
the &delphi. ones can be redefined. By default, &fpc. recognises the &delphi.
reserved words.
@@ -357,7 +355,7 @@ end not shl
:h4.&fpc. reserved words
:p.
-On top of the &tp. reserved words, &fpc. also considers the
+On top of the &tp. reserved words, &fpc. also considers the
following as reserved words:
.* * * *
:xmp.
@@ -411,7 +409,7 @@ that these types can be redefined in other units. The programmer is however
:p.
Identifiers denote programmer defined names for specific constants, types,
variables, procedures and functions, units, and programs. All programmer
-defined names in the source code – excluding reserved words – are designated
+defined names in the source code - excluding reserved words - are designated
as identifiers.
:p.
@@ -421,14 +419,14 @@ character, or an underscore (_). The following diagram gives the basic syntax
for identifiers.
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Identifiers:ehp2.
-&ra.&ra.─── identifier ──┬─ letter ─┬─┬──────────────┬──────────────────────────────&ra.&la.
- └─── _ ────┘ ^─┬─ letter ─┬─┘
- ├─ digit ──┤
- └─── _ ────┘
-└──────────────────────────────────────────────────────────────────────────────┘
+&ra.&ra.ÄÄÄ identifier ÄÄÂÄ letter ÄÂÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄÄÄ _ ÄÄÄÄÙ ^ÄÂÄ letter ÄÂÄÙ
+ ÃÄ digit ÄÄ´
+ ÀÄÄÄ _ ÄÄÄÄÙ
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -477,15 +475,15 @@ Most identifiers (constants, variables, functions or methods, properties) can
have a hint directive appended to their definition:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Hint directives:ehp2.
-&ra.&ra.─── hint directive ──┬─────────────────┬────────────────────────────────────&ra.&la.
- ├── Deprecated ───┤
- ├─ Experimental ──┤
- ├─── Platform ────┤
- └─ Unimplemented ─┘
-└──────────────────────────────────────────────────────────────────────────────┘
+&ra.&ra.ÄÄÄ hint directive ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÃÄÄ Deprecated ÄÄÄ´
+ ÃÄ Experimental ÄÄ´
+ ÃÄÄÄ Platform ÄÄÄÄ´
+ ÀÄ Unimplemented ÄÙ
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -567,7 +565,7 @@ Note that case is insignificant when using hexadecimal constants.
:li. As of version 1.0.7, Octal format (base 8) is also supported.
To specify a constant in octal format, prepend it with a ampersand (&amp.).
-For instance 15 is specified in octal notation as &amp.17.
+For instance 15 is specified in octal notation as &amp.17.
:li. Binary notation (base 2). A binary number can be specified
by preceding it with a percent sign (%). Thus, 255 can be
@@ -578,46 +576,46 @@ specified in binary notation as %11111111.
The following diagrams show the syntax for numbers.
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Numbers:ehp2.
-&ra.&ra.─── hex digit sequence ──┬── hex digit ──┬──────────────────────────────────&ra.&la.
- &uar.───────────────┘
+&ra.&ra.ÄÄÄ hex digit sequence ÄÄÂÄÄ hex digit ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ &uar.ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
-&ra.&ra.─── octal digit sequence ──┬── octal digit ──┬──────────────────────────────&ra.&la.
- &uar.─────────────────┘
+&ra.&ra.ÄÄÄ octal digit sequence ÄÄÂÄÄ octal digit ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ &uar.ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
-&ra.&ra.─── binary digit sequence ──┬┬─ 1 ─┬┬───────────────────────────────────────&ra.&la.
- │└─ 0 ─┘│
- &uar.───────┘
+&ra.&ra.ÄÄÄ binary digit sequence ÄÄÂÂÄ 1 ÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ³ÀÄ 0 ÄÙ³
+ &uar.ÄÄÄÄÄÄÄÙ
-&ra.&ra.─── digit sequence ──┬── digit ──┬──────────────────────────────────────────&ra.&la.
- ^───────────┘
+&ra.&ra.ÄÄÄ digit sequence ÄÄÂÄÄ digit ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ^ÄÄÄÄÄÄÄÄÄÄÄÙ
-&ra.&ra.─── unsigned integer ──┬────── digit sequence ───────┬──────────────────────&ra.&la.
- ├─ $ ─ hex digit sequence ────┤
- ├─ & ─ octal digit sequence ──┤
- └─ % ─ binary digit sequence ─┘
+&ra.&ra.ÄÄÄ unsigned integer ÄÄÂÄÄÄÄÄÄ digit sequence ÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÃÄ $ Ä hex digit sequence ÄÄÄÄ´
+ ÃÄ & Ä octal digit sequence ÄÄ´
+ ÀÄ % Ä binary digit sequence ÄÙ
-&ra.&ra.─── hex digit sequence ──┬── hex digit ──┬──────────────────────────────────&ra.&la.
- ^───────────────┘
+&ra.&ra.ÄÄÄ hex digit sequence ÄÄÂÄÄ hex digit ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
-&ra.&ra.─── sign ──┬── + ──┬────────────────────────────────────────────────────────&ra.&la.
- └── - ──┘
+&ra.&ra.ÄÄÄ sign ÄÄÂÄÄ + ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄÄ - ÄÄÙ
-&ra.&ra.─── unsigned real ─ digit sequence ─┬────────────────────┬┬──────────────┬──&ra.&la.
- └ . ─ digit sequence ┘└ scale factor ┘
+&ra.&ra.ÄÄÄ unsigned real Ä digit sequence ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄ&ra.&la.
+ À . Ä digit sequence ÙÀ scale factor Ù
-&ra.&ra.─── scale factor ─┬─ E ─┬┬──────┬─ digit sequence ──────────────────────────&ra.&la.
- └─ e ─┘└ sign ┘
+&ra.&ra.ÄÄÄ scale factor ÄÂÄ E ÄÂÂÄÄÄÄÄÄÂÄ digit sequence ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ e ÄÙÀ sign Ù
-&ra.&ra.─── unsigned number ──┬─── unsigned real ──┬────────────────────────────────&ra.&la.
- └─ unsigned integer ─┘
+&ra.&ra.ÄÄÄ unsigned number ÄÄÂÄÄÄ unsigned real ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ unsigned integer ÄÙ
-&ra.&ra.─── signed number ──┬────────┬─ unsigned number ────────────────────────────&ra.&la.
- └─ sign ─┘
+&ra.&ra.ÄÄÄ signed number ÄÄÂÄÄÄÄÄÄÄÄÂÄ unsigned number ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ sign ÄÙ
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:nt.
@@ -630,18 +628,18 @@ Octal and Binary notation are not supported in TP or Delphi compatibility mode.
.* % Labels
:h3.Labels
:p.
-A label is a name for a location in the source code to which can be
+A label is a name for a location in the source code to which can be
jumped to from another location with a :hp2.goto:ehp2. statement. A Label is a
standard identifier with the exception that it can start with a digit.
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Label:ehp2.
-&ra.&ra.─── label ──┬─ digit sequence ─┬────────────────────────────────────────────&ra.&la.
- └── identifier ────┘
+&ra.&ra.ÄÄÄ label ÄÄÂÄ digit sequence ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄÄ identifier ÄÄÄÄÙ
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:nt.
@@ -657,42 +655,42 @@ the goto statement.
:h3.Character strings
:p.
A character string (or string for short) is a sequence of zero or more
-characters (byte sized), enclosed in single quotes, and on a single
-line of the program source code: no literal carriage return or linefeed
+characters (byte sized), enclosed in single quotes, and on a single
+line of the program source code: no literal carriage return or linefeed
characters can appear in the string.
:p.
A character set with nothing between the quotes ('') is an empty string.
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Character strings:ehp2.
-&ra.&ra.─── character string ──┬┬─ quoted string ──┬┬───────────────────────────────&ra.&la.
- │└─ control string ─┘│
- ^────────────────────┘
+&ra.&ra.ÄÄÄ character string ÄÄÂÂÄ quoted string ÄÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ³ÀÄ control string ÄÙ³
+ ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
-&ra.&ra.─── quoted string ─ ' ──┬─ string character ─┬─ ' ──────────────────────────&ra.&la.
- ^────────────────────┘
+&ra.&ra.ÄÄÄ quoted string Ä ' ÄÄÂÄ string character ÄÂÄ ' ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
-&ra.&ra.─── string character ──┬─ Any character except ' or CR ─┬───────────────────&ra.&la.
- └────────────── " ───────────────┘
+&ra.&ra.ÄÄÄ string character ÄÄÂÄ Any character except ' or CR ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄ " ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
-&ra.&ra.─── control string ──┬─ # ─ unsigned integer ─┬─────────────────────────────&ra.&la.
- ^────────────────────────┘
+&ra.&ra.ÄÄÄ control string ÄÄÂÄ # Ä unsigned integer ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
The string consists of standard, 8-bit ASCII characters or Unicode (normally
UTF-8 encoded) characters. The :hp1.control string:ehp1. can be used to specify
characters which cannot be typed on a keyboard, such as :hp1.#27:ehp1. for
-the escape character.
+the escape character.
:p.
-The single quote character can be embedded in the string by typing it twice.
-The C construct of escaping characters in the string (using a backslash)
+The single quote character can be embedded in the string by typing it twice.
+The C construct of escaping characters in the string (using a backslash)
is not supported in Pascal.
:p.
@@ -732,8 +730,8 @@ on unices (including Mac OS X), and as
:exmp.
on a classic Mac-like operating system.
-
-It is possible to use other character sets in strings: in that case the
+
+It is possible to use other character sets in strings: in that case the
codepage of the source file must be specified with the :hp1.{$CODEPAGE XXX}:ehp1.
directive or with the :hp2.-Fc:ehp2. command line option for the compiler. In that
case the characters in a string will be interpreted as characters from the
@@ -759,20 +757,20 @@ Just as in &tp., &fpc. supports both ordinary and typed constants.
.* % Ordinary constants
:h3 name=constants_ordinary.Ordinary constants
:p.
-Ordinary constants declarations are constructed using an identifier name
-followed by an "=" token, and followed by an optional expression consisting
-of legal combinations of numbers, characters, boolean values or enumerated
-values as appropriate. The following syntax diagram shows how to construct
+Ordinary constants declarations are constructed using an identifier name
+followed by an "=" token, and followed by an optional expression consisting
+of legal combinations of numbers, characters, boolean values or enumerated
+values as appropriate. The following syntax diagram shows how to construct
a legal declaration of an ordinary constant.
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Constant declaration:ehp2.
-&ra.&ra.─── constant declaration ─┬─ identifier ─ = ─ expression ─ hint directives ─ ; ─┬───&ra.&la.
- ^─────────────────────────────────────────────────────┘
+&ra.&ra.ÄÄÄ constant declaration ÄÂÄ identifier Ä = Ä expression Ä hint directives Ä ; ÄÂÄÄÄ&ra.&la.
+ ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -783,7 +781,7 @@ declaration.
:p.
Operators such as +, -, *, /, not, and, or, div, mod, ord, chr,
-sizeof, pi, int, trunc, round, frac, odd can be used, however.
+sizeof, pi, int, trunc, round, frac, odd can be used, however.
For more information on expressions, see the section :link reftype=hd refid=expressions.Expressions:elink.&per.
@@ -812,7 +810,7 @@ in a compiler error:
:p.
For string constants, the type of the string is dependent on some compiler
-switches. If a specific type is desired, a typed constant should be used,
+switches. If a specific type is desired, a typed constant should be used,
as explained in the following section.
:p.
@@ -830,37 +828,37 @@ for constants of complex structures (defined later in the manual).
Their definition is quite simple.
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Constant declaration:ehp2.
typed
-&ra.&ra.─── constant ───┬─ identifier ─ : ─ type ─ = ─ type constant ─ hint directives ─ ; ─┬───&ra.&la.
- declaration ^───────────────────────────────────────────────────────────────────┘
+&ra.&ra.ÄÄÄ constant ÄÄÄÂÄ identifier Ä : Ä type Ä = Ä type constant Ä hint directives Ä ; ÄÂÄÄÄ&ra.&la.
+ declaration ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
-&ra.&ra.─── typed constant ──┬────── constant ───────┬──────────────────────────────&ra.&la.
- ├─ address constant ─┤
- ├─ array constant ─┤
- ├─ record constant ─┤
- └─ procedural constant ─┘
+&ra.&ra.ÄÄÄ typed constant ÄÄÂÄÄÄÄÄÄ constant ÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÃÄ address constant Ä´
+ ÃÄ array constant Ä´
+ ÃÄ record constant Ä´
+ ÀÄ procedural constant ÄÙ
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
-Contrary to ordinary constants, a value can be assigned to them at
-run-time. This is an old concept from &tp., which has been
-replaced with support for initialized variables: For a detailed
+Contrary to ordinary constants, a value can be assigned to them at
+run-time. This is an old concept from &tp., which has been
+replaced with support for initialized variables: For a detailed
description, see :link reftype=hd refid='variables_initializedvars'.Initialized variables:elink..
-Support for assigning values to typed constants is controlled by the
-:hp2.{$J}:ehp2. directive: it can be switched off, but is on by default
+Support for assigning values to typed constants is controlled by the
+:hp2.{$J}:ehp2. directive: it can be switched off, but is on by default
(for &tp. compatibility). Initialized variables are always allowed.
:nt.
It should be stressed that typed constants are automatically initialized at program start.
-This is also true for :hp1.local:ehp1. typed constants and initialized variables.
-Local typed constants are also initialized at program start. If their value was
-changed during previous invocations of the function, they will retain their
+This is also true for :hp1.local:ehp1. typed constants and initialized variables.
+Local typed constants are also initialized at program start. If their value was
+changed during previous invocations of the function, they will retain their
changed value, i.e. they are not initialized each time the function is invoked.
:ent.
@@ -870,8 +868,8 @@ changed value, i.e. they are not initialized each time the function is invoked.
:p.
A special kind of constant declaration block is the :hp1.resourcestring:ehp1.
block. Resourcestring declarations are much like constant string
-declarations: resource strings act as constant strings, but they
-can be localized by means of a set of special routines in the
+declarations: resource strings act as constant strings, but they
+can be localized by means of a set of special routines in the
:hp1.objpas:ehp1. unit. A resource string declaration block
is only allowed in the :hp1.Delphi:ehp1. or :hp1.ObjFPC:ehp1. modes.
@@ -890,13 +888,13 @@ at runtime with some special mechanisms in the :hp1.objpas:ehp1. unit.
:p.
Semantically, the strings act like ordinary constants; It is not allowed
-to assign values to them (except through the special mechanisms in the
-objpas unit). However, they can be used in assignments or expressions as
-ordinary string constants. The main use of the resourcestring section is
+to assign values to them (except through the special mechanisms in the
+objpas unit). However, they can be used in assignments or expressions as
+ordinary string constants. The main use of the resourcestring section is
to provide an easy means of internationalization.
:p.
-More on the subject of resourcestrings can be found in the
+More on the subject of resourcestrings can be found in the
:link reftype=hd database='prog.inf' refid=0.&progref.:elink., and
in the :hp1.objpas:ehp1. unit reference.
@@ -914,7 +912,7 @@ resourcestring
If the localization routines translate :hp1.Part1:ehp1. and :hp1.Part2:ehp1., the
:hp1.Sentence:ehp1. constant will not be translated automatically: it has a
separate entry in the resource string tables, and must therefor be
-translated separately. The above construct simply says that the
+translated separately. The above construct simply says that the
initial value of :hp1.Sentence:ehp1. equals :hp1.Part1+' '+Part2:ehp1..
:ent.
@@ -938,7 +936,7 @@ end.
:exmp.
:p.
-This will print 'Yes.' or 'No.' depending on the value of B, even if the
+This will print 'Yes.' or 'No.' depending on the value of B, even if the
constants Yes and No have been localized by some localization mechanism.
:ent.
@@ -953,31 +951,31 @@ that can be used to denote this custom type when declaring variables further
in the source code.
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Type declaration:ehp2.
-&ra.&ra.─── type declaration ─── identifier ─ = ─ type ─ ; ─────────────────────────&ra.&la.
+&ra.&ra.ÄÄÄ type declaration ÄÄÄ identifier Ä = Ä type Ä ; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
There are 7 major type classes:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Types:ehp2.
-&ra.&ra.─── type ──┬─── simple type ────┬──────────────────────────────────────────&ra.&la.
- ├─ string type ─┤
- ├─ structured type ─┤
- ├─ pointer type ─┤
- ├─ procedural type ─┤
- ├─ generic type ─┤
- ├─ specialized type ─┤
- └─ type identifier ─┘
+&ra.&ra.ÄÄÄ type ÄÄÂÄÄÄ simple type ÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÃÄ string type Ä´
+ ÃÄ structured type Ä´
+ ÃÄ pointer type Ä´
+ ÃÄ procedural type Ä´
+ ÃÄ generic type Ä´
+ ÃÄ specialized type Ä´
+ ÀÄ type identifier ÄÙ
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -985,7 +983,7 @@ The last case, :hp1.type identifier:ehp1., is just a means to give another
name to a type. This presents a way to make types platform independent, by
only using these types, and then defining these types for each platform
individually. Any programmer who then uses these custom types doesn't have to worry
-about the underlying type size: it is opaque to him. It also allows to use shortcut names
+about the underlying type size: it is opaque to him. It also allows to use shortcut names
for fully qualified type names. e.g. define :hp1.system.longint:ehp1. as
:hp1.Olongint:ehp1. and then redefine :hp1.longint:ehp1..
@@ -997,23 +995,23 @@ The base or simple types of &fpc. are the &delphi. types.
We will discuss each type separately.
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Simple types:ehp2.
-&ra.&ra.─── simple type ──┬─ ordinal type ─┬───────────────────────────────────────&ra.&la.
- └─ real type ─┘
+&ra.&ra.ÄÄÄ simple type ÄÄÂÄ ordinal type ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ real type ÄÙ
-&ra.&ra.─── real type ─── real type identifier ─────────────────────────────────────&ra.&la.
+&ra.&ra.ÄÄÄ real type ÄÄÄ real type identifier ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
.* ...................................................................
:h4.Ordinal types
:p.
-With the exception of :hp1.int64:ehp1., :hp1.qword:ehp1. and Real types,
-all base types are ordinal types. Ordinal types have the following
+With the exception of :hp1.int64:ehp1., :hp1.qword:ehp1. and Real types,
+all base types are ordinal types. Ordinal types have the following
characteristics:
:ol.
:li. Ordinal types are countable and ordered, i.e. it is, in principle,
@@ -1036,7 +1034,7 @@ A list of pre-defined integer types are presented below.
:lm margin=10.
:cgraphic.
:hp2.Name:ehp2.
-────────────
+ÄÄÄÄÄÄÄÄÄÄÄÄ
Integer
Shortint
SmallInt
@@ -1052,7 +1050,7 @@ A list of pre-defined integer types are presented below.
WordBool
LongBool
Char
-────────────
+ÄÄÄÄÄÄÄÄÄÄÄÄ
:ecgraphic.
:lm margin=1.
@@ -1064,7 +1062,7 @@ some Pascal constructs will not work with these two integer types.
:cgraphic.
:hp2.Type Range Size in bytes:ehp2.
-────────────────────────────────────────────────────────────────────
+ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Byte 0 .. 255 1
Shortint -128 .. 127 1
Smallint -32768 .. 32767 2
@@ -1075,18 +1073,18 @@ some Pascal constructs will not work with these two integer types.
Longword 0 .. 4294967295 4
Int64 -9223372036854775808 .. 9223372036854775807 8
QWord 0 .. 18446744073709551615 8
-────────────────────────────────────────────────────────────────────
+ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
:ecgraphic.
:p.
The :hp1.integer:ehp1. type maps to the smallint type in the default
&fpc. mode. It maps to either a longint in either Delphi or ObjFPC
-mode. The :hp1.cardinal:ehp1. type is currently always mapped to the
+mode. The :hp1.cardinal:ehp1. type is currently always mapped to the
longword type.
:nt.
-All decimal constants which do no fit within the -2147483648..2147483647 range
-are silently and automatically parsed as 64-bit integer constants as of version
+All decimal constants which do no fit within the -2147483648..2147483647 range
+are silently and automatically parsed as 64-bit integer constants as of version
1.9.0. Earlier versions would convert it to a real-typed constant.
:ent.
@@ -1103,18 +1101,18 @@ to a boolean value, can also be assigned to a boolean type.
:cgraphic.
:hp2.Name Size Ord(True):ehp2.
-─────────────────────────────────────────────────
+ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Boolean 1 1
ByteBool 1 Any nonzero value
WordBool 2 Any nonzero value
LongBool 4 Any nonzero value
-─────────────────────────────────────────────────
+ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
:ecgraphic.
:p.
&fpc. also supports the :hp1.ByteBool:ehp1., :hp1.WordBool:ehp1. and :hp1.LongBool:ehp1. types.
These are of type :hp1.Byte:ehp1., :hp1.Word:ehp1. or :hp1.Longint:ehp1., but are
-assignment compatible with a :hp1.Boolean:ehp1.: the value :hp1.False:ehp1. is
+assignment compatible with a :hp1.Boolean:ehp1.: the value :hp1.False:ehp1. is
equivalent to 0 (zero) and any nonzero value is considered :hp1.True:ehp1. when
converting to a boolean value. A boolean value of :hp1.True:ehp1. is converted
to -1 in case it is assigned to a variable of type :hp1.LongBool:ehp1..
@@ -1138,7 +1136,7 @@ way that when the result is known, the rest of the expression will no longer
be evaluated: this is called short-cut boolean evaluation.
:p.
-In the following example, the function :hp1.Func:ehp1. will never be called,
+In the following example, the function :hp1.Func:ehp1. will never be called,
which may have strange side-effects.
:xmp.
@@ -1163,20 +1161,20 @@ enumeration type, where a value is assigned to a particular element of
the enumeration list.
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Enumeration types:ehp2.
-&ra.&ra.─── enumerated type ─ ( ─┬┬── identifier list ───┬┬─ ) ─────────────────────&ra.&la.
- │└─ assigned enum list ─┘│
- ^────────── , ───────────┘
+&ra.&ra.ÄÄÄ enumerated type Ä ( ÄÂÂÄÄ identifier list ÄÄÄÂÂÄ ) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ³ÀÄ assigned enum list ÄÙ³
+ ^ÄÄÄÄÄÄÄÄÄÄ , ÄÄÄÄÄÄÄÄÄÄÄÙ
-&ra.&ra.─── identifier list ──┬─ identifier ─┬──────────────────────────────────────&ra.&la.
- ^────── , ─────┘
+&ra.&ra.ÄÄÄ identifier list ÄÄÂÄ identifier ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ^ÄÄÄÄÄÄ , ÄÄÄÄÄÙ
-&ra.&ra.─── assigned enum list ──┬─ identifier ─ := ─ expression ─┬─────────────────&ra.&la.
- ^─────────────── , ──────────────┘
+&ra.&ra.ÄÄÄ assigned enum list ÄÄÂÄ identifier Ä := Ä expression ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ , ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -1226,8 +1224,8 @@ this kind of enumeration types. Trying to do this anyhow will result in a
compiler error.
:li. Enumeration types are stored using a default, independent of the
actual number of values: the compiler does not try to optimize for space.
-This behaviour can be changed with the :hp2.{$PACKENUM n}:ehp2. compiler
-directive, which tells the compiler the minimal number of bytes to be
+This behaviour can be changed with the :hp2.{$PACKENUM n}:ehp2. compiler
+directive, which tells the compiler the minimal number of bytes to be
used for enumeration types. For instance:
:xmp.
@@ -1256,12 +1254,12 @@ A subrange type is a range of values from an ordinal type (the host type). To de
one must specify its limiting values: the highest and lowest value of the type.
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Subrange types:ehp2.
-&ra.&ra.─── subrange type ─ constant ─ .. ─ constant ───────────────────────────────&ra.&la.
+&ra.&ra.ÄÄÄ subrange type Ä constant Ä .. Ä constant ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -1300,7 +1298,7 @@ platform, refer to the &progref..
:cgraphic.
:hp2.Type Range Significant digits Size in bytes:ehp2.
-──────────────────────────────────────────────────────────────────────────
+ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Real platform dependent ??? 4 or 8
Single 1.5E-45 .. 3.4E38 7-8 4
Double 5.0E-324 .. 1.7E308 15-16 8
@@ -1308,7 +1306,7 @@ platform, refer to the &progref..
Comp -2E64+1 .. 2E63-1 19-20 8
Currency -922337203685477.5808 .. 19-20 8
922337203685477.5807
-──────────────────────────────────────────────────────────────────────────
+ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
:ecgraphic.
:p.
@@ -1346,7 +1344,7 @@ quotes, as follows: 'a' or 'A' are both character constants.
:p.
A character can also be specified by its character
-value (commonly an ASCII code), by preceding the ordinal value with the
+value (commonly an ASCII code), by preceding the ordinal value with the
number symbol (#). For example specifying :hp1.#65:ehp1. would be the same as :hp1.'A':ehp1.
:p.
@@ -1370,22 +1368,22 @@ It also supports AnsiStrings (with unlimited length) as in Delphi.
To declare a variable as a string, use the following type specification:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.String Type:ehp2.
-&ra.&ra.─── string type ─ :hp2.string:ehp2. ──┬──────────────────────────────┬─────────────────&ra.&la.
- └─ [ ── unsigned integer ── ] ─┘
+&ra.&ra.ÄÄÄ string type Ä :hp2.string:ehp2. ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ [ ÄÄ unsigned integer ÄÄ ] ÄÙ
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
-If there is a size specifier, then its maximum value - indicating the maximum
+If there is a size specifier, then its maximum value - indicating the maximum
size of the string - is 255.
:p.
-The meaning of a string declaration statement without size indicator is
+The meaning of a string declaration statement without size indicator is
interpreted differently depending on the :hp2.{$H}:ehp2. switch. If no size
-indication is present, the above declaration can declare an AnsiString or
+indication is present, the above declaration can declare an AnsiString or
a short string.
:p.
Whatever the actual type, AnsiStrings and short strings can be used
@@ -1439,8 +1437,8 @@ Error: string length must be a value from 1 to 255
:p.
For short strings, the length is stored in the character at index 0. Old
-&tp. code relies on this, and it is implemented similarly in &fpc..
-Despite this, to write portable code, it is best to set the length of a
+&tp. code relies on this, and it is implemented similarly in &fpc..
+Despite this, to write portable code, it is best to set the length of a
shortstring with the :hp1.SetLength():ehp1. call, and to retrieve
it with the :hp1.Length():ehp1. call. These functions will always work, whatever
the internal representation of the short strings or other strings in use:
@@ -1452,16 +1450,16 @@ this allows easy switching between the various string types.
:h4 name=character_types_ansistrings.AnsiStrings
:p.
AnsiStrings are strings that have no length limit. They are reference
-counted and are guaranteed to be null terminated. Internally, an ansistring is treated as
+counted and are guaranteed to be null terminated. Internally, an ansistring is treated as
a pointer: the actual content of the string is stored on the heap, as much
-memory as needed to store the string content is allocated.
+memory as needed to store the string content is allocated.
-This is all handled transparantly, i.e. they can be manipulated as a normal
-short string. Ansistrings can be defined using the predefined :hp2.AnsiString:ehp2.
-type.
+This is all handled transparantly, i.e. they can be manipulated as a normal
+short string. Ansistrings can be defined using the predefined :hp2.AnsiString:ehp2.
+type.
:nt.
-The null-termination does not mean that null characters (char(0) or #0)
+The null-termination does not mean that null characters (char(0) or #0)
cannot be used: the null-termination is not used internally, but is there for
convenience when dealing with external routines that expect a
null-terminated string (as most C routines do).
@@ -1469,19 +1467,19 @@ null-terminated string (as most C routines do).
:p.
If the {$H} switch is on, then a string definition using the
-regular :hp1.String:ehp1. keyword and that doesn't contain a length specifier,
+regular :hp1.String:ehp1. keyword and that doesn't contain a length specifier,
will be regarded as an ansistring as well. If a length specifier is present,
a short string will be used, regardless of the {$H} setting.
:p.
If the string is empty (''), then the internal pointer representation
-of the string pointer is :hp1.Nil:ehp1.. If the string is not empty, then the
+of the string pointer is :hp1.Nil:ehp1.. If the string is not empty, then the
pointer points to a structure in heap memory.
:p.
The internal representation as a pointer, and the automatic null-termination
-make it possible to typecast an ansistring to a pchar. If the string is empty
-(so the pointer is Nil) then the compiler makes sure that the typecasted
+make it possible to typecast an ansistring to a pchar. If the string is empty
+(so the pointer is Nil) then the compiler makes sure that the typecasted
pchar will point to a null byte.
:p.
@@ -1493,13 +1491,13 @@ string. A statement
:exmp.
:p.
-results in the reference count of :hp1.S2:ehp1. being decreased with 1,
+results in the reference count of :hp1.S2:ehp1. being decreased with 1,
the reference count of :hp1.S1:ehp1. is increased by 1, and finally :hp1.S1:ehp1.
(as a pointer) is copied to :hp1.S2:ehp1.. This is a significant speed-up in
the code.
:p.
-If the reference count of a string reaches zero, then the memory occupied
+If the reference count of a string reaches zero, then the memory occupied
by the string is deallocated automatically, and the pointer is set to
:hp1.Nil:ehp1., so no memory leaks arise.
@@ -1507,7 +1505,7 @@ by the string is deallocated automatically, and the pointer is set to
When an ansistring is declared, the &fpc. compiler initially
allocates just memory for a pointer, not more. This pointer is guaranteed
to be :hp1.Nil:ehp1., meaning that the string is initially empty. This is
-true for local and global ansistrings or ansistrings that are part of a
+true for local and global ansistrings or ansistrings that are part of a
structure (arrays, records or objects).
:p.
@@ -1519,16 +1517,16 @@ var
:exmp.
:p.
-will copy the value :hp1.Nil:ehp1. 100,000 times into :hp1.A:ehp1..
-When :hp1.A:ehp1. goes out of scope, then the reference
+will copy the value :hp1.Nil:ehp1. 100,000 times into :hp1.A:ehp1..
+When :hp1.A:ehp1. goes out of scope, then the reference
count of the 100,000 strings will be decreased by 1 for each
-of these strings. All this happens invisible to the programmer,
+of these strings. All this happens invisible to the programmer,
but when considering performance issues, this is important.
:p.
-Memory for the string content will be allocated only when the string is
-assigned a value. If the string goes out of scope, then its reference
-count is automatically decreased by 1. If the reference count reaches
+Memory for the string content will be allocated only when the string is
+assigned a value. If the string goes out of scope, then its reference
+count is automatically decreased by 1. If the reference count reaches
zero, the memory reserved for the string is released.
:p.
@@ -1557,7 +1555,7 @@ and passing it to a C routine that modifies the string.
:p.
The :hp1.Length():ehp1. function must be used to get the length of an
-ansistring: the length is not stored at character 0 of the ansistring.
+ansistring: the length is not stored at character 0 of the ansistring.
The construct
:xmp.
@@ -1618,7 +1616,7 @@ It is therefore :hp2.not:ehp2. advisable to typecast one of the following:
:ol.
:li. Expressions.
:li. Strings that have a reference count larger than 1.
-In this case you should call :hp1.UniqueString():ehp1. to ensure the
+In this case you should call :hp1.UniqueString():ehp1. to ensure the
string has a reference count 1.
:eol.
@@ -1627,18 +1625,18 @@ string has a reference count 1.
.* ...................................................................
:h4 name=character_types_widestrings.WideStrings
:p.
-WideStrings (used to represent Unicode character strings) are implemented in much
-the same way as AnsiStrings: reference counted, null-terminated arrays, only they
+WideStrings (used to represent Unicode character strings) are implemented in much
+the same way as AnsiStrings: reference counted, null-terminated arrays, only they
are implemented as arrays of :hp1.WideChars:ehp1. instead of regular :hp1.Chars:ehp1..
A :hp1.WideChar:ehp1. is a two-byte character (an element of a DBCS: Double Byte
-Character Set). Mostly the same rules apply for WideStrings as for
+Character Set). Mostly the same rules apply for WideStrings as for
AnsiStrings. The compiler transparently converts WideStrings to
AnsiStrings and vice versa.
:p.
Similarly to the typecast of an Ansistring to a PChar null-terminated
array of characters, a WideString can be converted to a PWideChar
-null-terminated array of characters.
+null-terminated array of characters.
Note that the :hp1.PWideChar:ehp1. array is terminated by 2 null bytes instead of
1, so a typecast to a PChar is not automatic.
@@ -1750,20 +1748,20 @@ the unit :hp2.strings:ehp2. must be used.
:p.
However, it is possible to do some pointer arithmetic. The
-operators + and - can be used to do operations
+operators + and - can be used to do operations
on :hp1.PChar:ehp1. pointers.
In the table below, :hp1.P:ehp1. and :hp1.Q:ehp1. are of type :hp1.PChar:ehp1., and
:hp1.I:ehp1. is of type :hp1.Longint:ehp1..
:cgraphic.
:hp2.Operation Result:ehp2.
-────────────────────────────────────────────────────────────────────
+ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
P + I Adds I to the address pointed to by P.
I + P Adds I to the address pointed to by P.
P - I Substracts I from the address pointed to by P.
P - Q Returns, as an integer, the distance between 2 addresses
(or the number of characters between P and Q)
-────────────────────────────────────────────────────────────────────
+ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
:ecgraphic.
@@ -1775,25 +1773,25 @@ A structured type is a type that can hold multiple values in one variable.
Stuctured types can be nested to unlimited levels.
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Structured Types:ehp2.
-&ra.&ra.─── structured type ──┬──── array type ────┬───────────────────────────&ra.&la.
- ├──── record type ────┤
- ├──── object type ────┤
- ├──── class type ────┤
- ├─ class reference type ─┤
- ├──── interface type ────┤
- ├──── set type ────┤
- └───── file type ──────┘
+&ra.&ra.ÄÄÄ structured type ÄÄÂÄÄÄÄ array type ÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÃÄÄÄÄ record type ÄÄÄÄ´
+ ÃÄÄÄÄ object type ÄÄÄÄ´
+ ÃÄÄÄÄ class type ÄÄÄÄ´
+ ÃÄ class reference type Ä´
+ ÃÄÄÄÄ interface type ÄÄÄÄ´
+ ÃÄÄÄÄ set type ÄÄÄÄ´
+ ÀÄÄÄÄÄ file type ÄÄÄÄÄÄÙ
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
Unlike Delphi, &fpc. does not support the keyword :hp1.packed:ehp1. for all
-structured types. In the following sections each of the possible
-structured types is discussed. It will be mentioned when a type supports
+structured types. In the following sections each of the possible
+structured types is discussed. It will be mentioned when a type supports
the :hp1.packed:ehp1. keyword.
@@ -1860,15 +1858,15 @@ There are some more restrictions to elements of bitpacked structures:
:li. The address cannot be retrieved, unless the bit size is a multiple of
8 and the element happens to be stored on a byte boundary.
:li. An element of a bitpacked structure cannot be used as a var parameter,
-unless the bit size is a multiple of 8 and the element happens to be stored
+unless the bit size is a multiple of 8 and the element happens to be stored
on a byte boundary.
:eul.
:p.
-To determine the size of an element in a bitpacked structure, there is the
-:hp1.BitSizeOf():ehp1. function. It returns the size - in bits - of the element.
-For other types or elements of structures which are not bitpacked, this will
-simply return the size in bytes multiplied by 8, i.e., the return value is
+To determine the size of an element in a bitpacked structure, there is the
+:hp1.BitSizeOf():ehp1. function. It returns the size - in bits - of the element.
+For other types or elements of structures which are not bitpacked, this will
+simply return the size in bytes multiplied by 8, i.e., the return value is
then the same as :hp1.8*SizeOf:ehp1..
:p.
@@ -1880,25 +1878,25 @@ The size of bitpacked records and arrays is limited:
:eul.
:p.
-The reason is that the offset of an element must be calculated with
+The reason is that the offset of an element must be calculated with
the maximum integer size of the system.
.* ...................................................................
:h4 name=structured_types_arrays.Arrays
:p.
-&fpc. supports arrays as in &tp.. Multi-dimensional arrays and (bit)packed
+&fpc. supports arrays as in &tp.. Multi-dimensional arrays and (bit)packed
arrays are also supported, as well as the dynamic arrays of &delphi.:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Array types:ehp2.
-&ra.&ra.── array type ─┬───────────────┬─ :hp2.array:ehp2. ─┬────────────────────────────┬─ :hp2.of:ehp2. ─ type ──&ra.&la.
- ├─ :hp2.packed:ehp2. ─┤ └─ :hp2.[:ehp2. ─┬─ ordinal type ─┬─ :hp2.]:ehp2. ─┘
- └─ :hp2.bitpacked:ehp2. ─┘ ^────── , ───────┘
+&ra.&ra.ÄÄ array type ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ :hp2.array:ehp2. ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ :hp2.of:ehp2. Ä type ÄÄ&ra.&la.
+ ÃÄ :hp2.packed:ehp2. Ä´ ÀÄ :hp2.[:ehp2. ÄÂÄ ordinal type ÄÂÄ :hp2.]:ehp2. ÄÙ
+ ÀÄ :hp2.bitpacked:ehp2. ÄÙ ^ÄÄÄÄÄÄ , ÄÄÄÄÄÄÄÙ
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
@@ -1951,32 +1949,32 @@ program testarray1;
type
TA = Array[0..9, 0..9] of Integer;
-
-var
+
+var
A, B: TA;
I, J: Integer;
begin
for I := 0 to 9 do
- for J := 0 to 9 do
+ for J := 0 to 9 do
A[I,J] := I * J;
for I := 0 to 9 do
begin
- for J := 0 to 9 do
+ for J := 0 to 9 do
Write(A[I, J]:2, ' ');
writeln;
end;
B := A;
writeln;
for I := 0 to 9 do
- for J := 0 to 9 do
+ for J := 0 to 9 do
A[9-I, 9-J] := I * J;
for I := 0 to 9 do
begin
- for J := 0 to 9 do
+ for J := 0 to 9 do
write(B[I, J]:2, ' ');
writeln;
end;
-end.
+end.
:exmp.
:p.
@@ -1997,12 +1995,12 @@ Type
:p.
When declaring a variable of a dynamic array type, the initial length of the
array is zero. The actual length of the array must be set with the standard
-:hp1.SetLength():ehp1. function, which will allocate the necessary memory to contain
+:hp1.SetLength():ehp1. function, which will allocate the necessary memory to contain
the array elements on the heap. The following example will set the length to
1000:
:xmp.
-var
+var
A: TByteArray;
begin
SetLength(A, 1000);
@@ -2013,26 +2011,26 @@ After a call to :hp1.SetLength():ehp1., valid array indexes are 0 to 999: the ar
index is always zero-based.
:p.
-Note that the length of the array is set in elements, not in bytes of
-allocated memory (although these may be the same). The amount of
-memory allocated is the size of the array multiplied by the size of
+Note that the length of the array is set in elements, not in bytes of
+allocated memory (although these may be the same). The amount of
+memory allocated is the size of the array multiplied by the size of
1 element in the array. The memory will be disposed of at the exit of the
-current procedure or function.
+current procedure or function.
:p.
-It is also possible to resize the array: in that case, as much of the
+It is also possible to resize the array: in that case, as much of the
elements in the array as will fit in the new size, will be kept. The array
can be resized to zero, which effectively resets the variable.
:p.
-At all times, trying to access an element of the array with an index
-that is not in the current length of the array will generate a run-time
+At all times, trying to access an element of the array with an index
+that is not in the current length of the array will generate a run-time
error.
:p.
-Dynamic arrays are reference counted: assignment of one dynamic array-type
-variable to another will let both variables point to the same array.
-Contrary to ansistrings, an assignment to an element of one array will
+Dynamic arrays are reference counted: assignment of one dynamic array-type
+variable to another will let both variables point to the same array.
+Contrary to ansistrings, an assignment to an element of one array will
be reflected in the other: there is no copy-on-write. Consider the following
example:
@@ -2057,33 +2055,33 @@ program testarray1;
type
TA = array of array of Integer;
-
-var
+
+var
A, B: TA;
I, J: Integer;
begin
Setlength(A, 10, 10);
for I := 0 to 9 do
- for J := 0 to 9 do
+ for J := 0 to 9 do
A[I, J] := I * J;
for I:=0 to 9 do
begin
- for J := 0 to 9 do
+ for J := 0 to 9 do
Write(A[I, J]:2, ' ');
writeln;
end;
B := A;
writeln;
for I := 0 to 9 do
- for J := 0 to 9 do
+ for J := 0 to 9 do
A[9-I, 9-J] := I * J;
for I := 0 to 9 do
begin
- for J := 0 to 9 do
+ for J := 0 to 9 do
Write(B[I, J]:2, ' ');
writeln;
end;
-end.
+end.
:exmp.
:p.
@@ -2097,7 +2095,7 @@ reference count of A (and B) is decreased with 1. As soon as the reference
count reaches zero the memory, allocated for the contents of the array, is disposed of.
:p.
-It is also possible to copy and/or resize the array with the standard
+It is also possible to copy and/or resize the array with the standard
:hp1.Copy():ehp1. function, which acts as the copy function for strings:
:xmp.
@@ -2105,8 +2103,8 @@ program testarray3;
type
TA = array of Integer;
-
-var
+
+var
A, B: TA;
I: Integer;
@@ -2114,10 +2112,10 @@ begin
Setlength(A, 10);
for I := 0 to 9 do
A[I] := I;
- B := Copy(A, 3, 6);
+ B := Copy(A, 3, 6);
for I := 0 to 5 do
Writeln(B[I]);
-end.
+end.
:exmp.
:p.
@@ -2128,14 +2126,14 @@ Starting at the element at index 3 (i.e. the fourth element) of the array.
The :hp1.Length():ehp1. function will return the number of elements in the array.
The :hp1.Low():ehp1. function on a dynamic array will always return 0, and the
:hp1.High():ehp1. function will return the value :hp1.Length-1:ehp1., i.e., the value of the
-highest allowed array index.
+highest allowed array index.
:h5.Packing and unpacking an array
:p.
Arrays can be packed and bitpacked. Two array types which have the same index
-type and element type, but which are differently packed are not assignment
+type and element type, but which are differently packed are not assignment
compatible.
:p.
@@ -2146,7 +2144,7 @@ routine, as in the following example:
:xmp.
var
- foo: array [ 'a'..'f' ] of Boolean
+ foo: array [ 'a'..'f' ] of Boolean
= ( false, false, true, false, false, false );
bar: packed array [ 42..47 ] of Boolean;
baz: array [ '0'..'5' ] of Boolean;
@@ -2168,27 +2166,27 @@ More information about the pack and unpack routines can be found in the
The syntax diagram for a record type is:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Record types:ehp2.
-&ra.&ra.── record type ─┬───────────────┬─ :hp2.record:ehp2. ─┬──────────────┬─ :hp2.end:ehp2. ───────────&ra.&la.
- ├─ :hp2.packed:ehp2. ─┤ └─ field list ─┘
- └─ :hp2.bitpacked:ehp2. ─┘
+&ra.&ra.ÄÄ record type ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ :hp2.record:ehp2. ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ :hp2.end:ehp2. ÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÃÄ :hp2.packed:ehp2. Ä´ ÀÄ field list ÄÙ
+ ÀÄ :hp2.bitpacked:ehp2. ÄÙ
-&ra.&ra.── field list ─┬─── fixed fields ───────────────────────┬─┬─────┬───────────&ra.&la.
- └─┬─────────────────────┬─ variant part ─┘ └─ ; ─┘
- └─ fixed fields ─ ; ─┘
+&ra.&ra.ÄÄ field list ÄÂÄÄÄ fixed fields ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÂÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ variant part ÄÙ ÀÄ ; ÄÙ
+ ÀÄ fixed fields Ä ; ÄÙ
-&ra.&ra.── fixed fields ─┬─ identifier list ─ : ─ type ─┬───────────────────────────&ra.&la.
- └──────────── ; ───────────────┘
+&ra.&ra.ÄÄ fixed fields ÄÂÄ identifier list Ä : Ä type ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄÄÄÄÄÄÄÄÄÄÄÄ ; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
-&ra.&ra.── variant part ─ :hp2.case:ehp2. ─┬────────────────┬─ ordinal type identifier ─ :hp2.of:ehp2. ─┬─ variant─┬───&ra.&la.
- └ identifier ─ : ┘ ^──── ; ───┘
+&ra.&ra.ÄÄ variant part Ä :hp2.case:ehp2. ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ ordinal type identifier Ä :hp2.of:ehp2. ÄÂÄ variantÄÂÄÄÄ&ra.&la.
+ À identifier Ä : Ù ^ÄÄÄÄ ; ÄÄÄÙ
-&ra.&ra.── variant ─┬─ constant ─ , ─┬─ : ─ ( ─┬────────────────┬─ ) ───────────────&ra.&la.
- ^────────────────┘ ^── field list ──┘
+&ra.&ra.ÄÄ variant ÄÂÄ constant Ä , ÄÂÄ : Ä ( ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ ) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ^ÄÄ field list ÄÄÙ
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -2250,7 +2248,7 @@ each part is first rounded up to two. So in the above example:
:ul.
:li. :hp1.SizeOf():ehp1. would return 24 for :hp1.Point:ehp1.
:li. It would result in 24 for :hp1.RPoint}:ehp1.
-:li. Finally, 26 would be the size of :hp1.BetterRPoint:ehp1.
+:li. Finally, 26 would be the size of :hp1.BetterRPoint:ehp1.
:li. For :hp1.MyRec:ehp1., the value would be 12.
:eul.
@@ -2258,9 +2256,9 @@ each part is first rounded up to two. So in the above example:
If a typed file with records, produced by a &tp. program, must be read,
then chances are that attempting to read that file correctly will fail.
The reason for this is that by default, elements of a record are aligned at
-2-byte boundaries, for performance reasons.
+2-byte boundaries, for performance reasons.
:p.
-This default behaviour can be changed with the :hp1.{$PACKRECORDS N}:ehp1.
+This default behaviour can be changed with the :hp1.{$PACKRECORDS N}:ehp1.
switch. Possible values for :hp1.N:ehp1. are 1, 2, 4, 16 or :hp1.Default:ehp1.
This switch tells the compiler to align elements of a record or object or
class that have size larger than :hp1.n:ehp1. on :hp1.n:ehp1. byte boundaries.
@@ -2298,7 +2296,7 @@ type
Trec4 = Record
A,B : Byte;
end;
-
+
{$PackRecords 4}
Trec5 = Record
A : Byte;
@@ -2312,7 +2310,7 @@ type
B : Array[1..3] of byte;
C : byte;
end;
-
+
{$PackRecords 4}
Trec7 = Record
A : Byte;
@@ -2386,10 +2384,10 @@ right after A, hence, the total size of the record is 3.
:li.For Trec3, the sizes of A,B are 1, and hence they are aligned on 1 byte boundaries. The same
is true for Trec4.
-:li.For Trec5, since the size of B – 3 – is smaller than 4, B will be on a 4-byte boundary, as this
+:li.For Trec5, since the size of B - 3 - is smaller than 4, B will be on a 4-byte boundary, as this
is the first power of two that is larger than its size. The same holds for Trec6.
-:li.For Trec7, B is aligned on a 4 byte boundary, since its size – 7 – is larger than 4. However, in
+:li.For Trec7, B is aligned on a 4 byte boundary, since its size - 7 - is larger than 4. However, in
Trec8, it is aligned on a 8-byte boundary, since 8 is the first power of two that is greater than
7, thus making the total size of the record 16.
:eul.
@@ -2427,12 +2425,12 @@ Note the :hp1.{$PackRecords 2}:ehp1. after the first declaration!
&fpc. supports the set types as in &tp.. The prototype of a set declaration is:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Set types:ehp2.
-&ra.&ra.── set type ── :hp2.set:ehp2. ── :hp2.of:ehp2. ── ordinal type ───────────────────────────────────&ra.&la.
+&ra.&ra.ÄÄ set type ÄÄ :hp2.set:ehp2. ÄÄ :hp2.of:ehp2. ÄÄ ordinal type ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -2478,13 +2476,13 @@ its data for instance in memory.
Here is the type declaration for a file type:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.File types:ehp2.
-&ra.&ra.── file type ── :hp2.file:ehp2. ─┬─────────────┬───────────────────────────────────────&ra.&la.
- └─ :hp2.of:ehp2. ─ type ─┘
+&ra.&ra.ÄÄ file type ÄÄ :hp2.file:ehp2. ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ :hp2.of:ehp2. Ä type ÄÙ
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -2522,12 +2520,12 @@ address in memory, where the data of another variable may be stored. A pointer
type can be defined as follows:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Pointer types:ehp2.
-&ra.&ra.── pointer type ── ^ ── type identifier ────────────────────────────────────&ra.&la.
+&ra.&ra.ÄÄ pointer type ÄÄ ^ ÄÄ type identifier ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -2716,24 +2714,24 @@ types.
syntax diagram:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Procedural types:ehp2.
-&ra.&ra.── procedural type ─┬─ function header ──┬┬───────────────┬┬─────────────────────┬──────&ra.&la.
- └─ procedure header ─┘└─ :hp2.of:ehp2. ─ :hp2.object:ehp2. ─┘└─ ; ─ call modifier ─┘
+&ra.&ra.ÄÄ procedural type ÄÂÄ function header ÄÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄ&ra.&la.
+ ÀÄ procedure header ÄÙÀÄ :hp2.of:ehp2. Ä :hp2.object:ehp2. ÄÙÀÄ ; Ä call modifier ÄÙ
-&ra.&ra.── function header ── :hp2.function:ehp2. ─ formal parameter list ─ : ─ result type ───────────────&ra.&la.
+&ra.&ra.ÄÄ function header ÄÄ :hp2.function:ehp2. Ä formal parameter list Ä : Ä result type ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-&ra.&ra.── procedure header ── :hp2.procedure:ehp2. ─ formal parameter list ───────────────────────────────&ra.&la.
+&ra.&ra.ÄÄ procedure header ÄÄ :hp2.procedure:ehp2. Ä formal parameter list ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-&ra.&ra.── call modifiers ─┬─ :hp2.register:ehp2. ─┬───────────────────────────────────────────────────────&ra.&la.
- ├─ :hp2.cdecl:ehp2. ─┤
- ├─ :hp2.pascal:ehp2. ─┤
- ├─ :hp2.stdcall:ehp2. ─┤
- ├─ :hp2.safecall:ehp2. ─┤
- └─ :hp2.inline:ehp2. ─┘
+&ra.&ra.ÄÄ call modifiers ÄÂÄ :hp2.register:ehp2. ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÃÄ :hp2.cdecl:ehp2. Ä´
+ ÃÄ :hp2.pascal:ehp2. Ä´
+ ÃÄ :hp2.stdcall:ehp2. Ä´
+ ÃÄ :hp2.safecall:ehp2. Ä´
+ ÀÄ :hp2.inline:ehp2. ÄÙ
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -3018,27 +3016,27 @@ The variables must be declared in a variable declaration section of a unit or a
It looks as follows:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Variable declaration:ehp2.
-&ra.&ra.── variable declaration ── identifier ── : ── type ─┬──────────────────┬──&ra.
- └─ :hp2.=:ehp2. ─ expression ─┘
+&ra.&ra.ÄÄ variable declaration ÄÄ identifier ÄÄ : ÄÄ type ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄ&ra.
+ ÀÄ :hp2.=:ehp2. Ä expression ÄÙ
-&ra.───┬──────────────────────┬─ hintdirective ── :hp2.;:ehp2. ─────────────────────────────&ra.&la.
- └─ variable modifiers ─┘
+&ra.ÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ hintdirective ÄÄ :hp2.;:ehp2. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ variable modifiers ÄÙ
-&ra.&ra.── variable modifiers ─┬─┬───── :hp2.absolute:ehp2. ─┬─ integer expression ─┬───────────────────────┬┬─&ra.
- ^ │ └─ identifier ─┘ ││
- │ ├────────────────────── :hp2.; export:ehp2. ───────────────────────────────┤│
- │ ├────────────────────── :hp2.; cvar:ehp2. ─────────────────────────────────┤│
- │ ├─ :hp2.; external:ehp2. ─┬───────────────────┬┬──────────────────────────┬┤│
- │ │ └─ string constant ─┘└─ :hp2.name:ehp2. ─ string constant ─┘││
- │ └────────────────────── hintdirective ──────────────────────────┘│
- └──────────────────────────────────────────────────────────────────┘
+&ra.&ra.ÄÄ variable modifiers ÄÂÄÂÄÄÄÄÄ :hp2.absolute:ehp2. ÄÂÄ integer expression ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÂÄ&ra.
+ ^ ³ ÀÄ identifier ÄÙ ³³
+ ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ :hp2.; export:ehp2. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´³
+ ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ :hp2.; cvar:ehp2. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´³
+ ³ ÃÄ :hp2.; external:ehp2. ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´³
+ ³ ³ ÀÄ string constant ÄÙÀÄ :hp2.name:ehp2. Ä string constant ÄÙ³³
+ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ hintdirective ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ³
+ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
-&ra.─────────────────────────────────────────────────────────────────────────────&ra.&la.
+&ra.ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -3092,7 +3090,7 @@ above case).
:eol.
:p.
-Note that assembler names must be unique. It’s not possible to declare or export 2 variables with the
+Note that assembler names must be unique. It's not possible to declare or export 2 variables with the
same assembler name.
@@ -3133,7 +3131,7 @@ even better way of doing this:
:xmp.
const
SDefault = 'This is an initialized string';
-
+
var
S: String = SDefault;
:exmp.
@@ -3217,39 +3215,39 @@ value on the fly, or to check the values which are written to the property.
The declaration is as follows:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Properties:ehp2.
-&ra.&ra.── property definition ── identifier ─┬──────────────────────┬─ property specifiers ──────&ra.&la.
- └─ property interface ─┘
+&ra.&ra.ÄÄ property definition ÄÄ identifier ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ property specifiers ÄÄÄÄÄÄ&ra.&la.
+ ÀÄ property interface ÄÙ
-&ra.&ra.── property interface ─┬───────────────────────────┬─ : ── type identifier ──&ra.
- └─ property parameter list ─┘
+&ra.&ra.ÄÄ property interface ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ : ÄÄ type identifier ÄÄ&ra.
+ ÀÄ property parameter list ÄÙ
-&ra.───┬───────────────────────────┬─────────────────────────────────────────────&ra.&la.
- └─ :hp2.index:ehp2. ─ integerconstant ─┘
+&ra.ÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ :hp2.index:ehp2. Ä integerconstant ÄÙ
-&ra.&ra.── property parameter list ── :hp2.[:ehp2. ─┬─ parameter declaration ─┬─ :hp2.]:ehp2. ────────────&ra.&la.
- ^─────────── ; ───────────┘
+&ra.&ra.ÄÄ property parameter list ÄÄ :hp2.[:ehp2. ÄÂÄ parameter declaration ÄÂÄ :hp2.]:ehp2. ÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ^ÄÄÄÄÄÄÄÄÄÄÄ ; ÄÄÄÄÄÄÄÄÄÄÄÙ
-&ra.&ra.── property specifiers ─┬──────────────────┬┬───────────────────┬┬─────────────────────┬───&ra.&la.
- └─ read specifier ─┘└─ write specifier ─┘└─ default specifier ─┘
+&ra.&ra.ÄÄ property specifiers ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄ&ra.&la.
+ ÀÄ read specifier ÄÙÀÄ write specifier ÄÙÀÄ default specifier ÄÙ
-&ra.&ra.── read specifier ── :hp2.read:ehp2. ── field or function ─────────────────────────────&ra.&la.
+&ra.&ra.ÄÄ read specifier ÄÄ :hp2.read:ehp2. ÄÄ field or function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-&ra.&ra.── write specifier ── :hp2.write:ehp2. ── field or function ───────────────────────────&ra.&la.
+&ra.&ra.ÄÄ write specifier ÄÄ :hp2.write:ehp2. ÄÄ field or function ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-&ra.&ra.── default specifier ──┬─ :hp2.default:ehp2. ──┬────────────┬┬─────────────────────────&ra.&la.
- │ └─ constant ─┘│
- └──────── :hp2.nodefault:ehp2. ───────┘
+&ra.&ra.ÄÄ default specifier ÄÄÂÄ :hp2.default:ehp2. ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ³ ÀÄ constant ÄÙ³
+ ÀÄÄÄÄÄÄÄÄ :hp2.nodefault:ehp2. ÄÄÄÄÄÄÄÙ
-&ra.&ra.── field or procedure ──┬─── field identifier ───┬──────────────────────────&ra.&la.
- └─ procedure identifier ─┘
+&ra.&ra.ÄÄ field or procedure ÄÄÂÄÄÄ field identifier ÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ procedure identifier ÄÙ
-&ra.&ra.── field or function ──┬─── field identifier ───┬───────────────────────────&ra.&la.
- └─ function identifier ──┘
+&ra.&ra.ÄÄ field or function ÄÄÂÄÄÄ field identifier ÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ function identifier ÄÄÙ
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -3266,15 +3264,15 @@ function GetMyInt: Integer;
procedure SetMyInt(AValue: Integer);
property MyProp: Integer read GetMyInt write SetMyInt;
-
+
implementation
uses
sysutils;
var
- FMyInt: Integer;
-
+ FMyInt: Integer;
+
function GetMyInt: Integer;
begin
Result := FMyInt;
@@ -3284,7 +3282,7 @@ procedure SetMyInt(AValue: Integer);
begin
if ((AValue mod 2) = 1) then
raise Exception.Create('MyProp can only contain even value');
- FMyInt := AValue;
+ FMyInt := AValue;
end;
end.
@@ -3312,8 +3310,8 @@ uses
sysutils;
var
- FMyInt: Integer;
-
+ FMyInt: Integer;
+
function GetMyInt: Integer;
begin
Result := FMyInt;
@@ -3323,7 +3321,7 @@ procedure SetMyInt(AValue: Integer);
begin
If ((AValue mod 2) = 1) then
Raise Exception.Create('Only even values are allowed');
- FMyInt := AValue;
+ FMyInt := AValue;
end;
end.
@@ -3346,7 +3344,7 @@ property MyProp: Integer read GetMyInt write SetMyInt;
implementation
-end.
+end.
:exmp.
:p.
@@ -3374,13 +3372,13 @@ objects. Here we present some technical questions regarding object oriented prog
:p.
Objects should be treated as a special kind of record. The record contains all the fields that are
-declared in the objects definition, and pointers to the methods that are associated to the objects’ type.
+declared in the objects definition, and pointers to the methods that are associated to the objects' type.
:p.
An object is declared just as a record would be declared; except that now, procedures and functions
-can be declared as if they were part of the record. Objects can “inherit†fields and methods from
-“parent†objects. This means that these fields and methods can be used as if they were included in
-the objects declared as a “child†object.
+can be declared as if they were part of the record. Objects can "inherit" fields and methods from
+"parent" objects. This means that these fields and methods can be used as if they were included in
+the objects declared as a "child" object.
:p.
Furthermore, a concept of visibility is introduced: fields, procedures and functions can be declared as
@@ -3395,30 +3393,30 @@ limited to the implementation of the current unit.
The prototype declaration of an object is as follows:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Object types:ehp2.
-&ra.&ra.───┬──────────┬─ :hp2.object:ehp2. ─┬────────────┬─┬─ component list ─┬─ end ────────────&ra.&la.
- └─ :hp2.packed:ehp2. ─┘ └─ heritage ─┘ ^──────────────────┘
+&ra.&ra.ÄÄÄÂÄÄÄÄÄÄÄÄÄÄÂÄ :hp2.object:ehp2. ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÂÄ component list ÄÂÄ end ÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ :hp2.packed:ehp2. ÄÙ ÀÄ heritage ÄÙ ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
-&ra.&ra.─── heritage ── ( ── object type identifier ── ) ─────────────────────────────&ra.&la.
+&ra.&ra.ÄÄÄ heritage ÄÄ ( ÄÄ object type identifier ÄÄ ) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-&ra.&ra.─── component list ─┬───────────────────────────────┬┬──────────────────────┬─&ra.
- └─ object visibility specifier ─┘└┬─ field definition ─┬┘
- ^────────────────────┘
+&ra.&ra.ÄÄÄ component list ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ&ra.
+ ÀÄ object visibility specifier ÄÙÀÂÄ field definition ÄÂÙ
+ ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
-&ra.───┬───────────────────────┬───────────────────────────────────────────────────&ra.&la.
- └┬─ method definition ─┬┘
- ^─────────────────────┘
+&ra.ÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÂÄ method definition ÄÂÙ
+ ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
-&ra.&ra.─── field definition ── identifier list ── : ── type ── ; ──┬───────────┬─────&ra.&la.
- └─ :hp2.static;:ehp2. ─┘
+&ra.&ra.ÄÄÄ field definition ÄÄ identifier list ÄÄ : ÄÄ type ÄÄ ; ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄ&ra.&la.
+ ÀÄ :hp2.static;:ehp2. ÄÙ
-&ra.&ra.─── object visibility specifier ─┬─ :hp2.private:ehp2. ─┬──────────────────────────────&ra.&la.
- ├─ :hp2.protected:ehp2. ─┤
- └─ :hp2.public:ehp2. ─┘
+&ra.&ra.ÄÄÄ object visibility specifier ÄÂÄ :hp2.private:ehp2. ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÃÄ :hp2.protected:ehp2. Ä´
+ ÀÄ :hp2.public:ehp2. ÄÙ
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
.* TODO: The "method definition" is missing from the above graph.
@@ -3449,7 +3447,7 @@ outside the unit in which :hp1.TObj:ehp1. is declared.
:note.
In MacPas mode, the :hp1.Object:ehp1. keyword is replaced by the :hp1.class:ehp1.
-keyword for compatibility with other pascal compilers available on the Mac.
+keyword for compatibility with other pascal compilers available on the Mac.
That means that objects cannot be used in MacPas mode.
:nt.
@@ -3526,7 +3524,7 @@ end;
:p.
One cannot access fields that are in a private or protected sections of an object from
-outside the objects’ methods. If this is attempted anyway, the compiler will complain about
+outside the objects' methods. If this is attempted anyway, the compiler will complain about
an unknown identifier.
:p.
@@ -3586,7 +3584,7 @@ will be the following
:exmp.
:p.
-Note that the last line of code references the object type itself (cl),
+Note that the last line of code references the object type itself (cl),
and not an instance of the object (cl1 or cl2).
@@ -3600,24 +3598,24 @@ constructor and the destructor explicitly when using objects.
The declaration of a constructor or destructor is as follows:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Constructors and Destructors:ehp2.
-&ra.&ra.─── constructor declaration ── constructor header ── ; ── subroutine block ──────&ra.&la.
+&ra.&ra.ÄÄÄ constructor declaration ÄÄ constructor header ÄÄ ; ÄÄ subroutine block ÄÄÄÄÄÄ&ra.&la.
-&ra.&ra.─── destructor declaration ── destructor header ── ; ── subroutine block ────────&ra.&la.
+&ra.&ra.ÄÄÄ destructor declaration ÄÄ destructor header ÄÄ ; ÄÄ subroutine block ÄÄÄÄÄÄÄÄ&ra.&la.
-&ra.&ra.─── constructor header ── :hp2.constructor:ehp2. ──┬───────── identifier ──────────┬────────&ra.
- └─ qualified method identifier ─┘
+&ra.&ra.ÄÄÄ constructor header ÄÄ :hp2.constructor:ehp2. ÄÄÂÄÄÄÄÄÄÄÄÄ identifier ÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ&ra.
+ ÀÄ qualified method identifier ÄÙ
-&ra.──── formal parameter list ───────────────────────────────────────────────────────&ra.&la.
+&ra.ÄÄÄÄ formal parameter list ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-&ra.&ra.─── destructor header ── :hp2.destructor:ehp2. ──┬───────── identifier ──────────┬──────────&ra.
- └─ qualified method identifier ─┘
+&ra.&ra.ÄÄÄ destructor header ÄÄ :hp2.destructor:ehp2. ÄÄÂÄÄÄÄÄÄÄÄÄ identifier ÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ&ra.
+ ÀÄ qualified method identifier ÄÙ
-&ra.──── formal parameter list ───────────────────────────────────────────────────────&ra.&la.
+&ra.ÄÄÄÄ formal parameter list ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -3635,7 +3633,7 @@ i.e. an identifier of the form :hp1.objectidentifier.methodidentifier:ehp1..
:p.
&fpc. supports also the extended syntax of the :hp1.New:ehp1. and :hp1.Dispose:ehp1.
procedures. In case a dynamic variable of an object type must be allocated
-the constructor’s name can be specified in the call to :hp1.New:ehp1..
+the constructor's name can be specified in the call to :hp1.New:ehp1..
The :hp1.New:ehp1. is implemented as a function which returns a pointer to the
instantiated object. Consider the following declarations:
@@ -3676,7 +3674,7 @@ pp^.init;
:p.
In the last case, the compiler will issue a warning that the
extended syntax of :hp1.New:ehp1. and :hp1.Dispose:ehp1. must be used to generate instances of an
-object. It is possible to ignore this warning, but it’s better programming practice to
+object. It is possible to ignore this warning, but it's better programming practice to
use the extended syntax to create instances of an object.
Similarly, the :hp1.Dispose:ehp1. procedure accepts the name of a destructor. The
destructor will then be called, before removing the object from the heap.
@@ -3704,30 +3702,30 @@ declaration, with some additional specifiers, as can be seen from the
following diagram, which is part of the object declaration:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Methods:ehp2.
-&ra.&ra.─── method definition ─┬─ function header ─┬─ ; ── method directives ─────────────&ra.&la.
- ├─ procedure header ─┤
- ├─ constructor header ─┤
- └─ destructor header ─┘
+&ra.&ra.ÄÄÄ method definition ÄÂÄ function header ÄÂÄ ; ÄÄ method directives ÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÃÄ procedure header Ä´
+ ÃÄ constructor header Ä´
+ ÀÄ destructor header ÄÙ
+
+&ra.&ra.ÄÄÄ method directives ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄ&ra.&la.
+ ÀÄ :hp2.virtual:ehp2. Ä ; ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÙÀÄ call modifier Ä ; ÄÙ
+ ÀÄ :hp2.abstract:ehp2. Ä ; ÄÙ
-&ra.&ra.─── method directives ─┬──────────────────────────────────┬┬─────────────────────┬───&ra.&la.
- └─ :hp2.virtual:ehp2. ─ ; ─┬────────────────┬─┘└─ call modifier ─ ; ─┘
- └─ :hp2.abstract:ehp2. ─ ; ─┘
-
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
-from the point of view of declarations, :hp1.Method definitions:ehp1. are
+from the point of view of declarations, :hp1.Method definitions:ehp1. are
normal function or procedure declarations.
-Contrary to &tp. and &delphi., fields can be declared after methods in the same
+Contrary to &tp. and &delphi., fields can be declared after methods in the same
block, i.e. the following will generate an error when compiling with &delphi.
or &tp., but not with &fpc.:
:xmp.
-type
+type
MyObj = object
procedure Doit;
Field: Longint;
@@ -3842,7 +3840,7 @@ As it is visible, both the parent and child objects have a method called
:hp1.Doit:ehp1.. Consider now the following declarations and calls:
:xmp.
-var
+var
ParentA, ParentB: PParent;
Child: PChild;
begin
@@ -3888,9 +3886,9 @@ static methods, only on virtual methods.
:p.
To be able to do this, the compiler keeps - per object type - a table with
-virtual methods: the VMT (Virtual Method Table). This is simply a table
+virtual methods: the VMT (Virtual Method Table). This is simply a table
with pointers to each of the virtual methods: each virtual method has its
-fixed location in this table (an index). The compiler uses this table to
+fixed location in this table (an index). The compiler uses this table to
look up the actual method that must be used. When a descendent object
overrides a method, the entry of the parent method is overwritten in the
VMT. More information about the VMT can be found in :link reftype=hd database='prog.inf' refid=0.&progref.:elink..
@@ -3904,12 +3902,12 @@ the VMT of the actual type that it was created with.
:h5 name='objects_abstract_methods'.Abstract Methods
:p.
An abstract method is a special kind of virtual method. A method that is
-declared :hp1.abstract:ehp1. does not have an implementation for this method.
+declared :hp1.abstract:ehp1. does not have an implementation for this method.
It is up to inherited objects to override and implement this method.
:p.
-From this it follows that a method can not be abstract if it is not virtual
-(this can be seen from the syntax diagram). A second consequence is that
+From this it follows that a method can not be abstract if it is not virtual
+(this can be seen from the syntax diagram). A second consequence is that
an instance of an object that has an abstract method cannot be created
directly.
@@ -4022,7 +4020,7 @@ var
:exmp.
:p.
-The main difference is that the variable A will take up as much
+The main difference is that the variable A will take up as much
space on the stack as the size of the object (TSomeObject). The
variable B, on the other hand, will always take just the size of
a pointer on the stack. The actual class data is on the heap.
@@ -4031,7 +4029,7 @@ a pointer on the stack. The actual class data is on the heap.
From this, a second difference follows: a class must :hp2.always:ehp2. be initialized
through its constructor, whereas for an object, this is not necessary.
Calling the constructor allocates the necessary memory on the heap for the
-class instance data.
+class instance data.
:nt.
In earlier versions of &fpc. it was necessary, in order to use classes,
@@ -4056,55 +4054,55 @@ In fact, the compiler will give a warning if it encounters the
The prototype declaration of a class is as follows:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Class types:ehp2.
-&ra.&ra.───┬──────────┬─ :hp2.class:ehp2. ─┬────────────┬─┬────────────────────┬─ end ──────────────&ra.&la.
- └─ :hp2.packed:ehp2. ─┘ └─ heritage ─┘ └┬ component list ─┬─┘
- ^─────────────────┘
-
-&ra.&ra.─── heritage ── ( ── class type identifier ──┬──────────────────────────┬─ ) ────&ra.&la.
- └─ implemented interfaces ─┘
-
-&ra.&ra.─── implemented interfaces ─┬ , ── interface identifier ──┬──────────────────────&ra.&la.
- ^─────────────────────────────┘
-
-&ra.&ra.─── component list ─┬────────────────────────┬┬──────────────────────┬─&ra.
- └─ visibility specifier ─┘└┬─ field definition ─┬┘
- ^────────────────────┘
-
-&ra.───┬───────────────────────────┬──────────────────────────────────────────────────&ra.&la.
- └┬┬── method definition ──┬┬┘
- │└─ property definition ─┘│
- ^─────────────────────────┘
-
-&ra.&ra.─── field definition ── identifier list ── : ── type ── ; ──┬───────────┬────────&ra.&la.
- └─ :hp2.static;:ehp2. ─┘
-
-&ra.&ra.─── method definition ─┬┬─────────┬┬─ function header ──┬┬── ; ────────&ra.
- │└─ :hp2.class:ehp2. ─┘└─ procedure header ─┘│
- ├───── constructor header ────────┤
- └───── destructor header ─────────┘
-
-&ra.────┬─────────────────────────────────────────┬┬──────────────────────┬───────────&ra.&la.
- └─┬┬─ :hp2.virtual:ehp2. ─┬┬──────────────────┬┬─ ; ─┘└─ call modifiers ─ ; ─┘
- │└─ :hp2.dynamic:ehp2. ─┘└─ ; ── :hp2.abstract:ehp2. ──┘│
- ├──────── :hp2.override:ehp2. ───────────────┤
- └─ :hp2.message:ehp2. ─┬─ integer constant ─┬┘
- └─ string constant ──┘
-
-&ra.&ra.─── class visibility specifier ─┬─ :hp2.private:ehp2. ─┬──────────────────────────────────&ra.&la.
- ├─ :hp2.protected:ehp2. ─┤
- ├─ :hp2.public:ehp2. ─┤
- └─ :hp2.published:ehp2. ─┘
-
-└──────────────────────────────────────────────────────────────────────────────┘
+&ra.&ra.ÄÄÄÂÄÄÄÄÄÄÄÄÄÄÂÄ :hp2.class:ehp2. ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ end ÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ :hp2.packed:ehp2. ÄÙ ÀÄ heritage ÄÙ ÀÂ component list ÄÂÄÙ
+ ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
+
+&ra.&ra.ÄÄÄ heritage ÄÄ ( ÄÄ class type identifier ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ ) ÄÄÄÄ&ra.&la.
+ ÀÄ implemented interfaces ÄÙ
+
+&ra.&ra.ÄÄÄ implemented interfaces ÄÂ , ÄÄ interface identifier ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
+
+&ra.&ra.ÄÄÄ component list ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ&ra.
+ ÀÄ visibility specifier ÄÙÀÂÄ field definition ÄÂÙ
+ ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
+
+&ra.ÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÂÂÄÄ method definition ÄÄÂÂÙ
+ ³ÀÄ property definition ÄÙ³
+ ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
+
+&ra.&ra.ÄÄÄ field definition ÄÄ identifier list ÄÄ : ÄÄ type ÄÄ ; ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ :hp2.static;:ehp2. ÄÙ
+
+&ra.&ra.ÄÄÄ method definition ÄÂÂÄÄÄÄÄÄÄÄÄÂÂÄ function header ÄÄÂÂÄÄ ; ÄÄÄÄÄÄÄÄ&ra.
+ ³ÀÄ :hp2.class:ehp2. ÄÙÀÄ procedure header ÄÙ³
+ ÃÄÄÄÄÄ constructor header ÄÄÄÄÄÄÄÄ´
+ ÀÄÄÄÄÄ destructor header ÄÄÄÄÄÄÄÄÄÙ
+
+&ra.ÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄÂÂÄ :hp2.virtual:ehp2. ÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÂÄ ; ÄÙÀÄ call modifiers Ä ; ÄÙ
+ ³ÀÄ :hp2.dynamic:ehp2. ÄÙÀÄ ; ÄÄ :hp2.abstract:ehp2. ÄÄÙ³
+ ÃÄÄÄÄÄÄÄÄ :hp2.override:ehp2. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
+ ÀÄ :hp2.message:ehp2. ÄÂÄ integer constant ÄÂÙ
+ ÀÄ string constant ÄÄÙ
+
+&ra.&ra.ÄÄÄ class visibility specifier ÄÂÄ :hp2.private:ehp2. ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÃÄ :hp2.protected:ehp2. Ä´
+ ÃÄ :hp2.public:ehp2. Ä´
+ ÀÄ :hp2.published:ehp2. ÄÙ
+
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
:nt.
In MacPas mode, the :hp1.Object:ehp1. keyword is replaced by the :hp1.class:ehp1.
-keyword for compatibility with other pascal compilers available on the Mac.
+keyword for compatibility with other pascal compilers available on the Mac.
That means that in MacPas mode, the reserved word 'class' in the above
diagram may be replaced by the reserved word 'object'.
:ent.
@@ -4139,7 +4137,7 @@ they are implemented in other modules.
:pt.:hp2.Published:ehp2.
:pd.Is the same as a :hp1.Public:ehp1. section, but the compiler
generates also type information that is needed for automatic streaming of
-these classes if the compiler is in the {$M+} state. Fields defined in
+these classes if the compiler is in the {$M+} state. Fields defined in
a :hp1.published:ehp1. section must be of class type.
Array properties cannot be in a published section.
@@ -4151,8 +4149,8 @@ interfaces. This feature will be discussed in the next chapter.
:p.
Classes can contain :hp1.class:ehp1. methods: these are functions that do not
-require an instance. The :hp1.self:ehp1. identifier is valid in such methods,
-but refers to the class pointer (the VMT).
+require an instance. The :hp1.self:ehp1. identifier is valid in such methods,
+but refers to the class pointer (the VMT).
:p.
Similar to objects, if the {$STATIC ON} directive is active, then a class
@@ -4194,7 +4192,7 @@ will be the following
:exmp.
:p.
-Note that the last line of code references the class type itself (TMyClass),
+Note that the last line of code references the class type itself (TMyClass),
and not an instance of the class (c1 or c2).
:p.
@@ -4202,20 +4200,20 @@ It is also possible to define class reference types:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Class reference type:ehp2.
-&ra.&ra.─── :hp2.class of:ehp2. ── classtype ──────────────────────────────────────────────────&ra.&la.
+&ra.&ra.ÄÄÄ :hp2.class of:ehp2. ÄÄ classtype ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-└──────────────────────────────────────────────────────────────────────────────┘
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
Class reference types are used to create instances of a certain class, which
-is not yet known at compile time, but which is specified at run time.
+is not yet known at compile time, but which is specified at run time.
Essentially, a variable of a class reference type contains a pointer to the
-definition of the speficied class. This can be used to construct an instance
-of the class corresponding to the definition, or to check inheritance.
+definition of the speficied class. This can be used to construct an instance
+of the class corresponding to the definition, or to check inheritance.
The following example shows how it works:
:xmp.
@@ -4243,7 +4241,7 @@ end;
:exmp.
:p.
-On return of the :hp1.CreateComponent:ehp1. function, C will contain an
+On return of the :hp1.CreateComponent:ehp1. function, C will contain an
instance of the class TEdit. Note that the following call will fail to
compile:
@@ -4269,7 +4267,7 @@ type
function CheckObjectBetween(Instance: TObject): boolean;
begin
- if not (Instance is TMinClass)
+ if not (Instance is TMinClass)
or ((Instance is TMaxClass) and (Instance.ClassType <> TMaxClass)) then
raise Exception.Create('SomeError')
end;
@@ -4288,7 +4286,7 @@ More about instantiating a class can be found in the next section.
:p.
Classes must be created using one of their constructors (there can be
multiple constructors). Remember that a class is a pointer to an object on
-the heap. When a variable of some class is declared, the compiler just
+the heap. When a variable of some class is declared, the compiler just
allocates room for this pointer, not the entire object. The constructor of
a class returns a pointer to an initialized instance of the object on the
heap. So, to initialize an instance of some class, one would do the following:
@@ -4315,8 +4313,8 @@ value of the {$PackRecords} directive.
:li. Just as for objects and records, a packed class can be declared.
This has the same effect as on an object, or record, namely that the
elements are aligned on 1-byte boundaries. i.e. as close as possible.
-:li. :hp1.SizeOf(class):ehp1. will return the same as :hp1.SizeOf(Pointer):ehp1.,
-since a class is but a pointer to an object. To get the size of the class
+:li. :hp1.SizeOf(class):ehp1. will return the same as :hp1.SizeOf(Pointer):ehp1.,
+since a class is but a pointer to an object. To get the size of the class
instance data, use the :hp1.TObject.InstanceSize:ehp1. method.
:eul.
:ent.
@@ -4341,21 +4339,21 @@ Declaration of methods in classes follows the same rules as method
declarations in objects:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Methods:ehp2.
-&ra.&ra.─── method definition ─┬─ function header ─┬─ ; ── method directives ─────────────────&ra.&la.
- ├─ procedure header ─┤
- ├─ constructor header ─┤
- └─ destructor header ─┘
-
-&ra.&ra.─── method directives ──┬──────────────────────────────────┬┬──────────────────────┬─────&ra.&la.
- ├─ :hp2.virtual:ehp2. ─ ; ─┬─────────────────┬┘└─ call modifiers ─ ; ─┘
- │ └─ :hp2.abstract:ehp2. ─ ; ──┤
- ├──────── :hp2.reintroduce:ehp2. ─ ; ────────┤
- └─ :hp2.message:ehp2. ─ constant expression ─┘
-
-└──────────────────────────────────────────────────────────────────────────────┘
+&ra.&ra.ÄÄÄ method definition ÄÂÄ function header ÄÂÄ ; ÄÄ method directives ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÃÄ procedure header Ä´
+ ÃÄ constructor header Ä´
+ ÀÄ destructor header ÄÙ
+
+&ra.&ra.ÄÄÄ method directives ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄ&ra.&la.
+ ÃÄ :hp2.virtual:ehp2. Ä ; ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÙÀÄ call modifiers Ä ; ÄÙ
+ ³ ÀÄ :hp2.abstract:ehp2. Ä ; ÄÄ´
+ ÃÄÄÄÄÄÄÄÄ :hp2.reintroduce:ehp2. Ä ; ÄÄÄÄÄÄÄÄ´
+ ÀÄ :hp2.message:ehp2. Ä constant expression ÄÙ
+
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
@@ -4379,7 +4377,7 @@ begin
Classes have virtual methods, just as objects do. There is however a
difference between the two. For objects, it is sufficient to redeclare the
same method in a descendent object with the keyword :hp1.virtual:ehp1. to
-override it. For classes, the situation is different: virtual methods
+override it. For classes, the situation is different: virtual methods
:hp2.must:ehp2. be overridden with the :hp1.override:ehp1. keyword. Failing to do so,
will start a :hp2.new:ehp2. batch of virtual methods, hiding the previous
one. The :hp1.Inherited:ehp1. keyword will not jump to the inherited method, if
@@ -4389,11 +4387,11 @@ one. The :hp1.Inherited:ehp1. keyword will not jump to the inherited method, if
The following code is :hp2.wrong:ehp2.:
:xmp.
-type
+type
TObjParent = class
procedure MyProc; virtual;
end;
-
+
ObjChild = class(TObjParent)
procedure MyProc; virtual;
end;
@@ -4414,11 +4412,11 @@ produce strange effects.
The correct declaration is as follows:
:xmp.
-type
+type
TObjParent = class
procedure MyProc; virtual;
end;
-
+
TObjChild = Class(TObjParent)
procedure MyProc; override;
end;
@@ -4428,15 +4426,15 @@ type
This will compile and run without warnings or errors.
:p.
-If the virtual method should really be replaced with a method with the
+If the virtual method should really be replaced with a method with the
same name, then the :hp1.reintroduce:ehp1. keyword can be used:
:xmp.
-type
+type
TObjParent = class
procedure MyProc; virtual;
end;
-
+
TObjChild = Class(TObjParent)
procedure MyProc; reintroduce;
end;
@@ -4447,9 +4445,9 @@ This new method is no longer virtual.
:p.
To be able to do this, the compiler keeps - per class type - a table with
-virtual methods: the VMT (Virtual Method Table). This is simply a table
+virtual methods: the VMT (Virtual Method Table). This is simply a table
with pointers to each of the virtual methods: each virtual method has its
-fixed location in this table (an index). The compiler uses this table to
+fixed location in this table (an index). The compiler uses this table to
look up the actual method that must be used at runtime. When a descendent object
overrides a method, the entry of the parent method is overwritten in the
VMT. More information about the VMT can be found in the &progref..
@@ -4474,13 +4472,13 @@ procedure or function declaration, as in the following example:
:p.
Class methods are methods that do not have an instance (i.e. Self does not
-point to a class instance) but which follow the scoping and inheritance
+point to a class instance) but which follow the scoping and inheritance
rules of a class. They can be used to return information about the current
-class, for instance for registration or use in a class factory. Since no
+class, for instance for registration or use in a class factory. Since no
instance is available, no information available in instances can be used.
:p.
-Class methods can be called from inside a regular method, but can also be called
+Class methods can be called from inside a regular method, but can also be called
using a class identifier:
:xmp.
@@ -4506,10 +4504,10 @@ begin
:exmp.
:p.
-The reverse is not possible: Inside a class method, the Self identifier
-points to the VMT table of the class. No fields, properties or
-regular methods are available inside a class method. Accessing a regular
-property or method will result in a compiler error.
+The reverse is not possible: Inside a class method, the Self identifier
+points to the VMT table of the class. No fields, properties or
+regular methods are available inside a class method. Accessing a regular
+property or method will result in a compiler error.
:p.
Note that class methods can be virtual, and can be overridden.
@@ -4530,7 +4528,7 @@ GTK. In difference with &delphi., &fpc. also accepts strings as message
identifiers. Message methods are always virtual.
:p.
-As can be seen in the class declaration diagram, message methods are
+As can be seen in the class declaration diagram, message methods are
declared with a :hp1.message:ehp1. keyword, followed by an integer constant
expression.
@@ -4560,7 +4558,7 @@ type
MsgID: Cardinal;
Data: Pointer;
end;
-
+
var
Msg: TMSg;
begin
@@ -4570,7 +4568,7 @@ begin
:p.
In this example, the Dispatch() method will look at the object and all
-its ancestors (starting at the object, and searching up the inheritance
+its ancestors (starting at the object, and searching up the inheritance
class tree), to see if a message method with message :hp1.MsgID:ehp1. has been
declared. If such a method is found, it is called, and passed the
Msg parameter.
@@ -4622,7 +4620,7 @@ type
constructor Create(AOwner: TComponent); override;
end;
-constructor TMyClass.Create(AOwner: TComponent);
+constructor TMyClass.Create(AOwner: TComponent);
begin
inherited;
// Do more things
@@ -4646,12 +4644,12 @@ type
constructor CreateNew(AOwner: TComponent; DoExtra: Boolean);
end;
-constructor TMyClass.Create(AOwner: TComponent);
+constructor TMyClass.Create(AOwner: TComponent);
begin
inherited;
end;
-constructor TMyClass.CreateNew(AOwner: TComponent; DoExtra: Boolean);
+constructor TMyClass.CreateNew(AOwner: TComponent; DoExtra: Boolean);
begin
inherited Create(AOwner);
// Do stuff
@@ -4697,52 +4695,52 @@ value on the fly. Moreover, properties can be read-only or write only.
The prototype declaration of a property is as follows:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Properties:ehp2.
-&ra.&ra.─── property definition ── :hp2.property:ehp2. ── identifier ─┬──────────────────────┬───&ra.
- └─ property interface ─┘
-
-&ra.──── property specifier ── hint directive ─────────────────────────────────────&ra.&la.
+&ra.&ra.ÄÄÄ property definition ÄÄ :hp2.property:ehp2. ÄÄ identifier ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄ&ra.
+ ÀÄ property interface ÄÙ
+
+&ra.ÄÄÄÄ property specifier ÄÄ hint directive ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+
+&ra.&ra.ÄÄÄ property interface ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ : ÄÄ type identifier ÄÄ&ra.
+ ÀÄ property parameter list ÄÙ
-&ra.&ra.─── property interface ─┬───────────────────────────┬─ : ── type identifier ──&ra.
- └─ property parameter list ─┘
+&ra.ÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ :hp2.index:ehp2. ÄÄ integer constant ÄÙ
-&ra.─────┬─────────────────────────────┬───────────────────────────────────────────&ra.&la.
- └─ :hp2.index:ehp2. ── integer constant ─┘
+&ra.&ra.ÄÄÄ property parameter list ÄÄ [ ÄÄ parameter declaration ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ^ÄÄÄÄÄÄÄÄÄ ; ÄÄÄÄÄÄÄÄÄÄÄÄÙ
-&ra.&ra.─── property parameter list ── [ ── parameter declaration ─┬──────────────────&ra.&la.
- ^───────── ; ────────────┘
+&ra.&ra.ÄÄÄ property specifiers ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄ&ra.
+ ÀÄ read specifier ÄÙ ÃÄÄÄ write specifier ÄÄÄÄ´
+ ÀÄ implements specifier ÄÙ
-&ra.&ra.─── property specifiers ──┬──────────────────┬─┬────────────────────────┬─────&ra.
- └─ read specifier ─┘ ├─── write specifier ────┤
- └─ implements specifier ─┘
+&ra.ÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.
+ ÀÄ default specifier ÄÙÀÄ stored specifier ÄÙ
-&ra.─────┬─────────────────────┬┬────────────────────┬─────────────────────────────&ra.
- └─ default specifier ─┘└─ stored specifier ─┘
+&ra.ÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ default array property specifier ÄÙ
-&ra.─────┬────────────────────────────────────┬────────────────────────────────────&ra.&la.
- └─ default array property specifier ─┘
+&ra.&ra.ÄÄÄÄ read specifier ÄÄ :hp2.read:ehp2. ÄÄ field or method ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-&ra.&ra.──── read specifier ── :hp2.read:ehp2. ── field or method ───────────────────────────────&ra.&la.
+&ra.&ra.ÄÄÄÄ write specifier ÄÄ :hp2.write:ehp2. ÄÄ field or method ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-&ra.&ra.──── write specifier ── :hp2.write:ehp2. ── field or method ─────────────────────────────&ra.&la.
+&ra.&ra.ÄÄÄÄ implements specifier ÄÄ :hp2.implements:ehp2. ÄÄ identifier ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
-&ra.&ra.──── implements specifier ── :hp2.implements:ehp2. ── identifier ────────────────────────&ra.&la.
+&ra.&ra.ÄÄÄÄ default specifier ÄÂÄ :hp2.default:ehp2. ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ³ ÀÄ constant ÄÙ³
+ ÀÄÄÄÄÄ :hp2.nodefault:ehp2. ÄÄÄÄÄÄÄÄÄÙ
-&ra.&ra.──── default specifier ─┬─ :hp2.default:ehp2. ─┬────────────┬┬───────────────────────────&ra.&la.
- │ └─ constant ─┘│
- └───── :hp2.nodefault:ehp2. ─────────┘
+&ra.&ra.ÄÄÄÄ stored specifier ÄÄ :hp2.stored:ehp2. ÄÂÄ constant ÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ identifier ÄÙ
-&ra.&ra.──── stored specifier ── :hp2.stored:ehp2. ─┬─ constant ───┬─────────────────────────────&ra.&la.
- └─ identifier ─┘
-
-&ra.&ra.──── field or method ──┬─ field identifier ──┬────────────────────────────────&ra.&la.
- └─ method identifier ─┘
+&ra.&ra.ÄÄÄÄ field or method ÄÄÂÄ field identifier ÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÀÄ method identifier ÄÙ
-&ra.&ra.──── default array property specifier ── ; ── :hp2.default:ehp2. ────────────────────────&ra.&la.
-
-└──────────────────────────────────────────────────────────────────────────────┘
+&ra.&ra.ÄÄÄÄ default array property specifier ÄÄ ; ÄÄ :hp2.default:ehp2. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -4787,7 +4785,7 @@ type
property Z: Longint read GetZ;
end;
-var
+var
MyClass: TMyClass;
:exmp.
@@ -4834,7 +4832,7 @@ the same type. The following is an example of a property with an index:
:xmp.
{$mode objfpc}
-type
+type
TPoint = class(TObject)
private
FX: Longint;
@@ -4863,7 +4861,7 @@ begin
end;
end;
-var
+var
P: TPoint;
begin
@@ -4902,7 +4900,7 @@ type as the index, and the second argument is a parameter of the same
type as the property type. As an example, see the following declaration:
:xmp.
-type
+type
TIntList = class
private
Function GetInt(I: Longint): Longint;
@@ -4914,7 +4912,7 @@ type
property StrItems[S: String]: String read GetAsString write SetAsstring;
end;
-var
+var
AIntList: TIntList;
:exmp.
@@ -4977,8 +4975,8 @@ The :hp1.stored specifier:ehp1. should be either a boolean constant, a boolean
field of the class, or a parameterless function which returns a boolean
result. This specifier has no result on the class behaviour. It is an aid
for the streaming system: the stored specifier is specified in the RTTI
-generated for a class (it can only be streamed if RTTI is generated),
-and is used to determine whether a property should be streamed or not:
+generated for a class (it can only be streamed if RTTI is generated),
+and is used to determine whether a property should be streamed or not:
it saves space in a stream. It is not possible to specify the 'Stored'
directive for array properties.
@@ -5112,7 +5110,7 @@ identifier.
:p.
When the compiler looks for unit files, it adds the extension :hp1..ppu:ehp1.
-to the name of the unit. On &linux. and in operating systems where filenames
+to the name of the unit. On &linux. and in operating systems where filenames
are case sensitive when looking for a unit, the following mechanism is
used:
@@ -5123,19 +5121,19 @@ used:
:eol.
:p.
-Additionally, If a unit name is longer than 8 characters, the compiler
-will first look for a unit name with this length, and then it will
-truncate the name to 8 characters and look for it again.
-For compatibility reasons, this is also true on platforms that
+Additionally, If a unit name is longer than 8 characters, the compiler
+will first look for a unit name with this length, and then it will
+truncate the name to 8 characters and look for it again.
+For compatibility reasons, this is also true on platforms that
support long file names.
:p.
Note that the above search is performed in each directory in the search
-path.
+path.
:p.
The program block contains the statements that will be executed when the
-program is started. Note that these statements need not necessarily be the
+program is started. Note that these statements need not necessarily be the
first statements that are executed: the initialization code of the units
may also contain statements that are executed prior to the program code.
@@ -5148,38 +5146,38 @@ The structure of a program block is discussed below.
used by a program or another unit. The syntax for a unit is as follows:
:cgraphic.
-┌──────────────────────────────────────────────────────────────────────────────â”
+ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
:hp2.Units:ehp2.
-&ra.&ra.─── unit ── unit header ── interface part ── implementation part ────────────&ra.
-
-&ra.─────┬────────────────────────────────────────────┬─ :hp2.end:ehp2. ── . ─────────────────&ra.&la.
- ├─ initialization part ─┬───────────────────┬┤
- │ └ finalization part ┘│
- └─ :hp2.begin:ehp2. ─┬─ statement ─┬───────────────────┘
- ^───── ; ─────┘
-
-&ra.&ra.─── unit header ── :hp2.unit:ehp2. ── unit identifier ── ; ──────────────────────────────&ra.&la.
-
-&ra.&ra.─── interface part ── :hp2.interface:ehp2. ─┬───────────────┬┬┬─────────────────────────────┬┬──&ra.&la.
- └─ uses clause ─┘│├─ constant declaration part ─┤│
- │├─ type declatation part ─┤│
- │└─ procedure headers part ─┘│
- ^───────────────────────────────┘
-
-&ra.&ra.─── procedure headers part ─┬─ procedure header ─┬─ ; ─┬───────────────────────┬─────&ra.&la.
- └─ function header ─┘ └─ call modifiers ── ; ─┘
-
-&ra.&ra.─── implementation part ── :hp2.implementation:ehp2. ─┬───────────────┬─ declaration part ──────&ra.&la.
- ^─ uses clause ─┘
-
-&ra.&ra.─── initialization part ── :hp2.initialization:ehp2. ─┬─ statement ─┬────────────────────&ra.&la.
- ^───── ; ─────┘
-
-&ra.&ra.─── finalization part ── :hp2.finalization:ehp2. ─┬─ statement ─┬────────────────────────&ra.&la.
- ^───── ; ─────┘
-
-└──────────────────────────────────────────────────────────────────────────────┘
+&ra.&ra.ÄÄÄ unit ÄÄ unit header ÄÄ interface part ÄÄ implementation part ÄÄÄÄÄÄÄÄÄÄÄÄ&ra.
+
+&ra.ÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ :hp2.end:ehp2. ÄÄ . ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ÃÄ initialization part ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
+ ³ À finalization part Ù³
+ ÀÄ :hp2.begin:ehp2. ÄÂÄ statement ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
+ ^ÄÄÄÄÄ ; ÄÄÄÄÄÙ
+
+&ra.&ra.ÄÄÄ unit header ÄÄ :hp2.unit:ehp2. ÄÄ unit identifier ÄÄ ; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+
+&ra.&ra.ÄÄÄ interface part ÄÄ :hp2.interface:ehp2. ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÂÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÂÄÄ&ra.&la.
+ ÀÄ uses clause ÄÙ³ÃÄ constant declaration part Ä´³
+ ³ÃÄ type declatation part Ä´³
+ ³ÀÄ procedure headers part ÄÙ³
+ ^ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
+
+&ra.&ra.ÄÄÄ procedure headers part ÄÂÄ procedure header ÄÂÄ ; ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄ&ra.&la.
+ ÀÄ function header ÄÙ ÀÄ call modifiers ÄÄ ; ÄÙ
+
+&ra.&ra.ÄÄÄ implementation part ÄÄ :hp2.implementation:ehp2. ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄ declaration part ÄÄÄÄÄÄ&ra.&la.
+ ^Ä uses clause ÄÙ
+
+&ra.&ra.ÄÄÄ initialization part ÄÄ :hp2.initialization:ehp2. ÄÂÄ statement ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ^ÄÄÄÄÄ ; ÄÄÄÄÄÙ
+
+&ra.&ra.ÄÄÄ finalization part ÄÄ :hp2.finalization:ehp2. ÄÂÄ statement ÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ&ra.&la.
+ ^ÄÄÄÄÄ ; ÄÄÄÄÄÙ
+
+ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
:ecgraphic.
:p.
@@ -5228,7 +5226,7 @@ The type :hp1.SomeBType:ehp1. is defined in unit :hp1.b:ehp1..
:p.
All functions and methods that are declared in the interface part must
be implemented in the implementation part of the unit, except for
-declarations of external functions or procedures. If a declared method
+declarations of external functions or procedures. If a declared method
or function is not implemented in the implementation part, the compiler
will give an error, for example the following:
@@ -5254,23 +5252,23 @@ unita.pp(5,10) Error: Forward declaration not solved "MyFunction&colon.SmallInt;
:p.
The implementation part is primarily intended for the implementation of the
functions and procedures declared in the interface part. However, it can
-also contain declarations of it's own: The declarations inside the
-implementation part are :hp2.not:ehp2. accessible outside the unit.
+also contain declarations of it's own: The declarations inside the
+implementation part are :hp2.not:ehp2. accessible outside the unit.
:p.
The initialization and finalization part of a unit are optional:
:p.
-The initialization block is used to initialize certain variables or
-execute code that is necessary for the correct functioning of the unit.
+The initialization block is used to initialize certain variables or
+execute code that is necessary for the correct functioning of the unit.
The initialization parts of the units
-are executed in the order that the compiler loaded the units when compiling
+are executed in the order that the compiler loaded the units when compiling
a program. They are executed before the first statement of the program is
executed.
:p.
The finalization part of the units are executed in the reverse order of the
-initialization execution. They are used for instance to clean up any resources
+initialization execution. They are used for instance to clean up any resources
allocated in the initialization part of the unit, or during the lifetime of
the program. The finalization part is always executed in the case of a
normal program termination: whether it is because the final :hp1.end:ehp1. is
@@ -5292,7 +5290,7 @@ end.
:exmp.
:p.
-An initialization section by itself (i.e. without finalization) may simply be
+An initialization section by itself (i.e. without finalization) may simply be
replaced by a statement block. That is, the following:
:xmp.
@@ -5367,7 +5365,7 @@ on the target processor and emulation options.
:h2.Object Pascal Grammar
:p.This section describes the Object Pascal grammar in a EBNF
-(Extended Backus–Naur Form) like style. The syntax only covers the
+(Extended Backus-Naur Form) like style. The syntax only covers the
:hp1.ObjFPC:ehp1. mode of the &fpc. compiler.
:cgraphic.
diff --git a/docs/fpgui-docs-project.xml b/docs/fpgui-docs-project.xml
index 59d15c6b..48395aba 100644
--- a/docs/fpgui-docs-project.xml
+++ b/docs/fpgui-docs-project.xml
@@ -45,6 +45,8 @@
<unit file="../src/gui/fpg_tree.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<!-- undocumented units -->
+ <unit file="../src/corelib/fpg_dbugintf.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
+ <unit file="../src/corelib/fpg_dbugmsg.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<unit file="../src/gui/fpg_animation.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<unit file="../src/gui/fpg_checkbox.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<unit file="../src/gui/fpg_combobox.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
@@ -69,14 +71,18 @@
<unit file="../src/gui/fpg_radiobutton.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<unit file="../src/gui/fpg_readonly.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<unit file="../src/gui/fpg_scrollbar.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
+ <unit file="../src/gui/fpg_scrollframe.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<unit file="../src/gui/fpg_spinedit.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<unit file="../src/gui/fpg_splitter.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<unit file="../src/gui/fpg_style.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<unit file="../src/gui/fpg_style_bitmap.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<unit file="../src/gui/fpg_style_bluecurve.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
+ <unit file="../src/gui/fpg_style_carbon.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<unit file="../src/gui/fpg_style_clearlooks.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<unit file="../src/gui/fpg_style_motif.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
+ <unit file="../src/gui/fpg_style_plastic.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<unit file="../src/gui/fpg_style_win2k.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
+ <unit file="../src/gui/fpg_style_win8.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<unit file="../src/gui/fpg_stylemanager.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<unit file="../src/gui/fpg_tab.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
<unit file="../src/gui/fpg_trackbar.pas" options="-Fi../src -Fu../src/gui/ -Fu../src/corelib/"/>
diff --git a/docs/manifest.xml b/docs/manifest.xml
index d89f8ec5..fc0d48a0 100644
--- a/docs/manifest.xml
+++ b/docs/manifest.xml
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<packages>
<package name="fpgui">
- <version major="0" minor="6" micro="3" build="0"/>
- <filename>fpgui-0.6.3-0.zip</filename>
+ <version major="1" minor="3" micro="0" build="0"/>
+ <filename>fpgui-1.3.0-0.zip</filename>
<author>Graeme Geldenhuys</author>
<license>Modified LGPL</license>
<email>graemeg@gmail.com</email>
diff --git a/docs/xml/corelib/examples/fpg_base.fpgcanvasbase.drawarc.pas b/docs/xml/corelib/examples/fpg_base.fpgcanvasbase.drawarc.pas
new file mode 100644
index 00000000..d85fadf2
--- /dev/null
+++ b/docs/xml/corelib/examples/fpg_base.fpgcanvasbase.drawarc.pas
@@ -0,0 +1,7 @@
+{ This will draw a red arc, starting at the 6 o'clock position, and
+ drawing 90 degrees of the arc, ending at the 3 o'clock position. }
+procedure TMainForm.FormPaint; // the forms OnPaint event handler
+begin
+ Canvas.Color := clRed;
+ Canvas.DrawArc(5, 5, 100, 100, 270, 90);
+end;
diff --git a/docs/xml/corelib/examples/fpg_base.fpgcanvasbase.fillarc.pas b/docs/xml/corelib/examples/fpg_base.fpgcanvasbase.fillarc.pas
new file mode 100644
index 00000000..897ac0ec
--- /dev/null
+++ b/docs/xml/corelib/examples/fpg_base.fpgcanvasbase.fillarc.pas
@@ -0,0 +1,8 @@
+{ This will draw a red filled arc, starting at the 6 o'clock position, and
+ drawing 45 degrees of the arc, ending at the half-past-four position. }
+procedure TMainForm.FormPaint; // the form's OnPaint event handler.
+begin
+ Canvas.Color := clRed;
+ Canvas.FillArc(5, 5, 100, 100, 270, 45);
+end;
+
diff --git a/docs/xml/corelib/fpg_base.xml b/docs/xml/corelib/fpg_base.xml
index 82a83f25..32d68ac4 100644
--- a/docs/xml/corelib/fpg_base.xml
+++ b/docs/xml/corelib/fpg_base.xml
@@ -18,75 +18,70 @@ For more information, see the fpGUI Toolkit website at: <url href="http://fpgui.
<descr><p>This unit contains all the abstract classes for the CoreLib code
of fpGUI. It also defines many types and constants used throughout the toolkit.
</p>
- <p>When implementing support for a completely new windowing system
+ <p>When implementing support for a completely new windowing system
(eg: Carbon used in Mac OS-X) you would implement all the abstract methods
defined in this unit.
</p>
</descr>
- <!-- alias type Visibility: default -->
- <element name="TfpgCoord">
- <short>A custom type used to represent X and Y coordinates.</short>
- <descr>Internally TfpgCoord is actually a Integer type. We created a custom
-alias type for use in fpGUI in the event that we might want to change the
+
+<element name="TfpgCoord">
+<short>A custom type used to represent X and Y coordinates.</short>
+<descr>Internally TfpgCoord is actually a Integer type. We created a custom
+alias type for use in fpGUI in the event that we might want to change the
underlying type in the future. Example to floating points.
</descr>
- <seealso/>
- </element>
- <!-- alias type Visibility: default -->
- <element name="TfpgColor">
- <short>Represents a color in integer format.</short>
- <descr>
- <p>TfpgColor is always in RRGGBB (Red, Green, Blue) format, no matter the
+</element>
+
+<element name="TfpgColor">
+<short>Represents a color in integer format.</short>
+<descr>
+<p>TfpgColor is always in AARRGGBB (Alpha, Red, Green, Blue) format, no matter the
operating system.
</p>
- <p>The <var>fpg_base</var> unit also contains definitions of many useful color
-constants. It defines the standard predefined Delphi colors (like clRed,
-clMagenta etc.), the 140 web safe colors using the defacto standard names as
-used by Netscape and Internet Explorer web browsers. As well as some internal
-color constants used by many GUI components (like clText, clWindowBackground
-etc.).
-</p>
- </descr>
- <seealso/>
- </element>
- <!-- record type Visibility: default -->
- <element name="TRGBTriple">
- <short>A record structure holding the RGBA values of a color</short>
- <descr><printshort id="TRGBTriple"/>.</descr>
- <seealso/>
- </element>
- <!-- variable Visibility: default -->
- <element name="TRGBTriple.Alpha">
- <short>Alpha support has not really been implemented in fpGUI yet.</short>
- <descr/>
- <seealso/>
- </element>
- <!-- enumeration type Visibility: default -->
- <element name="TWindowType">
- <short>Enum type defining what types of windows can be created.</short>
- <descr/>
- <seealso/>
- </element>
- <!-- enumeration value Visibility: default -->
- <element name="TWindowType.wtChild">
- <short>The window being created is a child on another window. This normally
+<p>The <var>fpg_base</var> unit also contains definitions of many useful color
+constants. It defines the standard predefined Delphi colors (like clRed,
+clMagenta etc.), the 140 web safe colors using the defacto standard names as
+used by Netscape and Internet Explorer web browsers. As well as some internal
+color constants used by many GUI components (like clText, clWindowBackground
+etc.).</p></descr>
+<seealso>
+<link id="fpg_base.TRGBTriple">TRGBTriple</link>
+</seealso>
+</element>
+
+<element name="TRGBTriple">
+<short>A record structure holding the RGBA values of a color</short>
+<descr><printshort id="TRGBTriple"/>.</descr>
+</element>
+
+<element name="TRGBTriple.Alpha">
+<short>Alpha support has not really been implemented in fpGUI yet.</short>
+</element>
+
+<element name="TWindowType">
+<short>Enum type defining what types of windows can be created.</short>
+</element>
+
+<element name="TWindowType.wtChild">
+<short>The window being created is a child on another window. This normally
means no titlebar or window borders are going to be created.</short>
- </element>
- <!-- enumeration value Visibility: default -->
- <element name="TWindowType.wtWindow">
- <short>This would specify a standard window with titlebar and window borders.</short>
- <descr>This would specify a standard window with titlebar and window borders. It grabs input focus, and appears in the taskbar.</descr>
- </element>
- <!-- enumeration value Visibility: default -->
- <element name="TWindowType.wtModalForm">
- <short>This windows type is similar to wtWindow, but grabs focus.</short>
- <descr>This windows is the same as <link id="#fpgui.fpg_base.TWindowType.wtWindow">wtWindow</link>, but grabs the input focus until it has closed. This window normally doesn't appear in the taskbar.</descr>
- </element>
- <!-- enumeration value Visibility: default -->
- <element name="TWindowType.wtPopup">
- <short>This window will normally not have a titlebar or window borders.</short>
- <descr>This window will normally not have a titlebar or window borders and will appear above other windows. It is used for example in the dropdown window of a ComboBox or a tooltip window or popup menus. This type of window does not steal focus.</descr>
- </element>
+</element>
+
+<element name="TWindowType.wtWindow">
+<short>This would specify a standard window with titlebar and window borders. It grabs input
+focus, and appears in the taskbar.</short>
+</element>
+
+<element name="TWindowType.wtModalForm">
+<short>This windows is similar to <link id="#fpgui.fpg_base.TWindowType.wtWindow">wtWindow</link>, but grabs
+the input focus until it has closed. This window normally doesn't appear in the taskbar.</short>
+</element>
+
+<element name="TWindowType.wtPopup">
+<short>This window will normally not have a titlebar or window borders and will appear above other windows. It
+is used for example in the dropdown window of a ComboBox or a tooltip window or popup menus. This type of
+window does not steal focus.</short>
+</element>
<element name="TWindowAttribute">
<short>An enum types defining extra attributes of a window.</short>
@@ -130,7 +125,7 @@ the first time.</short>
<link id="fpg_base.TWindowAttribute">TWindowAttribute</link>
</seealso>
</element>
-
+
<!-- enumeration type Visibility: default -->
<element name="TMouseCursor">
<short>Enum types of the available mouse cursor shapes.</short>
@@ -371,7 +366,7 @@ the first time.</short>
<element name="TfpgRect">
<short>A graphical (pixel based) rectangle structure used throughout fpGUI.</short>
<descr>
- <p>Note that this structure is not a class, so static allocations are
+ <p>Note that this structure is not a class, so static allocations are
allowed. This makes it much easier to use in Widgets and in fpGUI internal
messages.</p>
<p>Think of the pixel screen/grid like the grid of a spreadsheet (or as a magnified look of the top corner of your screen).
@@ -387,11 +382,11 @@ messages.</p>
+---+---+---
| | |
</pre>
- <p>x is at (0,0). A pixel is always 1x1, you don't get smaller (we are not using sub-pixels like on LCD screens, because they don't apply to all screens).
+ <p>x is at (0,0). A pixel is always 1x1, you don't get smaller (we are not using sub-pixels like on LCD screens, because they don't apply to all screens).
</p>
- <p>So with that example, Width = 1 pixel and Height = 1 pixel. In the case of
-Classes.Bounds() the Right and Bottom values are (1,1) which looking at the
-above image will be wrong, the pixel only covers one block, so in a screen/pixel
+ <p>So with that example, Width = 1 pixel and Height = 1 pixel. In the case of
+Classes.Bounds() the Right and Bottom values are (1,1) which looking at the
+above image will be wrong, the pixel only covers one block, so in a screen/pixel
environment, Right, Bottom is also (0,0), the same as Top/Left. This is what
TfpgRect.Right and TfpgRect.Bottom will report.
</p>
@@ -406,20 +401,20 @@ TfpgRect.Right and TfpgRect.Bottom will report.
+---+---+---
| | |
</pre>
- <p>In this example we have a rectangle. Top/Left = (0,0) and Bottom/Right = (1,1).
-This means Width = 2 pixels and Height = 2 pixels. Clearly visible in the image
+ <p>In this example we have a rectangle. Top/Left = (0,0) and Bottom/Right = (1,1).
+This means Width = 2 pixels and Height = 2 pixels. Clearly visible in the image
above.
</p>
- <p>But if we call Classes.Bounds(0,0,2,2) it reports Bottom/Right as (2,2) which
-is wrong (again looking at the image above as reference). This is my point.
+ <p>But if we call Classes.Bounds(0,0,2,2) it reports Bottom/Right as (2,2) which
+is wrong (again looking at the image above as reference). This is my point.
Bounds() cannot be used in this case in a graphical environment.
</p>
- <p>The reason I don't use a grid layout as shown below, is
-because if the mouse is over the rectangle containing x, the OS (graphics system) reports its
-position as (0,0). You don't have to have the mouse pointer over the intersecting
-lines at (0,0) as indicated in the image below. The whole square containing
+ <p>The reason I don't use a grid layout as shown below, is
+because if the mouse is over the rectangle containing x, the OS (graphics system) reports its
+position as (0,0). You don't have to have the mouse pointer over the intersecting
+lines at (0,0) as indicated in the image below. The whole square containing
the x is referenced as (0,0), hence the grid layout as show in the images above,
-and what fpGUI uses. The same grid layout as used in TfpgStringGrid or any
+and what fpGUI uses. The same grid layout as used in TfpgStringGrid or any
Spreadsheet program etc.
</p>
<pre>.
@@ -646,7 +641,7 @@ redundant calculations, fpGUI allows you to set all the properties,
then act on it once you call <var>UpdateWindowPosition</var>. In most cases fpGUI
can even reduce the API calls needed, because it could pass for
example Width and Height via one API call. In the case of X11, it can actually do all
-four values in a single API call. Thus improving efficiency and reduces resize
+four values in a single API call. Thus improving efficiency and reduces resize
calculations and screen redraws.</p>
</descr>
</element>
@@ -657,7 +652,7 @@ calculations and screen redraws.</p>
of the control begins or to reposition the left side of the control.
</p>
<remark>fpGUI delays acting on the Top, Left, Width and Height properties of a control until the
-<var>UpdateWindowPosition</var> method is called. For more information on why this is so,
+<var>UpdateWindowPosition</var> method is called. For more information on why this is so,
see <link id="#fpgui.fpg_base.TfpgWindowBase.UpdateWindowPosition">UpdateWindowPosition</link>
help.</remark></descr>
<seealso>
@@ -671,7 +666,7 @@ help.</remark></descr>
of the control begins or to reposition the top side of the control.
</p>
<remark>fpGUI delays acting on the Top, Left, Width and Height properties of a control until the
-<var>UpdateWindowPosition</var> method is called. For more information on why this
+<var>UpdateWindowPosition</var> method is called. For more information on why this
is so, see <link id="#fpgui.fpg_base.TfpgWindowBase.UpdateWindowPosition">UpdateWindowPosition</link>
help.</remark></descr>
<seealso>
@@ -687,7 +682,7 @@ controls that have their Align property set to alTop, alBottom or alClient, chan
this property at runtime has no effect.
</p>
<remark>fpGUI delays acting on the Top, Left, Width and Height properties of a control until the
-<var>UpdateWindowPosition</var> method is called. For more information on why this is so,
+<var>UpdateWindowPosition</var> method is called. For more information on why this is so,
see <link id="#fpgui.fpg_base.TfpgWindowBase.UpdateWindowPosition">UpdateWindowPosition</link>
help.</remark></descr>
<seealso>
@@ -703,7 +698,7 @@ controls that have their Align property set to alLeft, alRight or alClient, chan
this property at runtime has no effect.
</p>
<remark>fpGUI delays acting on the Top, Left, Width and Height properties of a control until the
-<var>UpdateWindowPosition</var> method is called. For more information on why this
+<var>UpdateWindowPosition</var> method is called. For more information on why this
is so, see <link id="#fpgui.fpg_base.TfpgWindowBase.UpdateWindowPosition">UpdateWindowPosition</link>
help.</remark></descr>
<seealso>
@@ -722,7 +717,7 @@ this only changes the z-order, it doesn't actually change window focus.</descr>
</element>
<element name="TfpgWindowBase.ActivateWindow">
-<short>This makse the target window the active window</short>
+<short>This makes the target window the active window</short>
<descr>This doesn't have much meaning at the widget level, but at the TfpgForm level,
it makes the target window the active window. Note that depending on the operating system
and Window Manager, the active window could still be obscured by other windows. Under Windows,
@@ -807,7 +802,7 @@ you must keep copy of the original image before you call <var>Invert</var>.</des
<element name="TfpgBaseInterpolation">
<short>A abstract class representing a base Interpolation filter.</short>
<descr>This is used as the base class to implement Interpolation filters like
-Gaussian, Sinc etc... These decendant filters are used in the
+Gaussian, Sinc etc... These decendant filters are used in the
<link id="#fpgui.fpg_base.TfpgCanvasBase.StretchDraw">Canvas.StretchDraw</link> function.
</descr>
<seealso>
@@ -823,9 +818,9 @@ Gaussian, Sinc etc... These decendant filters are used in the
<!-- procedure Visibility: public -->
<element name="TfpgCanvasBase.DrawLine">
<short>Draws a line</short>
- <descr><printshort id="#fpgui.fpg_base.TfpgCanvasBase.DrawLine"/>. This method
-draws a line from (x1,y1) to (x2,y2), but does not draw the last pixel. All supported
-backends follow the Microsoft API and doesn't draw the last pixel. This optimises
+ <descr><printshort id="#fpgui.fpg_base.TfpgCanvasBase.DrawLine"/>. This method
+draws a line from (x1,y1) to (x2,y2), but does not draw the last pixel. All supported
+backends follow the Microsoft API and doesn't draw the last pixel. This optimises
consecutive lines being drawn without overlapping pixels.</descr>
</element>
@@ -897,7 +892,7 @@ returns the correct enum type detected.
<!-- function Visibility: default -->
<element name="fpgGetAvgColor">
<short>Calculates the average color using the two supplied</short>
- <descr>This function calculates and returns the average color by using AColor1
+ <descr>This function calculates and returns the average color by using AColor1
and AColor2. The Alpha value also gets taken into account.
</descr>
</element>
@@ -913,7 +908,7 @@ rectangle ARect. If it is, the function returns True, otherwise False.
<!-- procedure Visibility: default -->
<element name="SortRect">
<short>Fixes the Top, Bottom and Left, Right to always represent a valid rectangle</short>
- <descr>This function fixes a rectangle so that the Left point is always smaller than the
+ <descr>This function fixes a rectangle so that the Left point is always smaller than the
Right. And the Top is always smaller than the Bottom.
</descr>
</element>
@@ -929,7 +924,7 @@ Right. And the Top is always smaller than the Bottom.
For a detailed explanation see: http://www.nondot.org/~sabre/graphpro/line6.html
</p></descr>
</element>
-
+
<element name="TfpgCanvasBase.ClipLine">
<short>Clips the line based on AClipRect boundaries.</short>
<descr>This does not do any drawing, in only clips the line coordinates. This method is used internally by <link id="TfpgCanvasBase.DrawLineClipped"/>.</descr>
@@ -958,7 +953,7 @@ value to draw the arc.</p>
<dt>h</dt>
<dd>The height of the whole arc</dd>
<dt>a1</dt>
-<dd>This is the starting point of the arc. A value of 0 is the 3 o'clock
+<dd>This is the starting point of the arc. A value of 0 is the 3 o'clock
position. A value of 270 is the 6 o'clock position. Positive values move
counter-clockwise, and negative values move clockwise.</dd>
<dt>a2</dt>
@@ -974,7 +969,7 @@ goes counter-clockwise, and a negative values goes clockwise.</dd>
<element name="TfpgCanvasBase.FillArc.a1">
-<descr>This is the starting point of the arc. A value of 0 is the 3 o'clock
+<descr>This is the starting point of the arc. A value of 0 is the 3 o'clock
position. A value of 270 is the 6 o'clock position. Positive values move
counter-clockwise, and negative values move clockwise.</descr>
</element>
@@ -994,7 +989,7 @@ value to draw and fill the arc.</p>
<dt>h</dt>
<dd>The height of the whole arc</dd>
<dt>a1</dt>
-<dd>This is the starting point of the arc. A value of 0 is the 3 o'clock
+<dd>This is the starting point of the arc. A value of 0 is the 3 o'clock
position. A value of 270 is the 6 o'clock position. Positive values move
counter-clockwise, and negative values move clockwise.</dd>
<dt>a2</dt>
diff --git a/docs/xml/corelib/fpg_main.xml b/docs/xml/corelib/fpg_main.xml
index 613c0feb..e3945fed 100644
--- a/docs/xml/corelib/fpg_main.xml
+++ b/docs/xml/corelib/fpg_main.xml
@@ -113,6 +113,19 @@ until the timer is disabled when the Enabled property is set to False.</descr>
<descr><printshort id="TfpgWindow"/>.</descr>
</element>
+<element name="TfpgImageBase">
+<short>The base class representing a image</short>
+<descr><printshort id="TfpgImageBase"/>.</descr>
+</element>
+
+<element name="TfpgImageBase.ImageData">
+<short>Contains the pixel data of the image. The data format is in AARRGGBB format.</short>
+<descr><printshort id="TfpgImageBase.ImageData"/>.</descr>
+</element>
+
+
+
+
</module>
<!-- fpg_main -->
</package>
diff --git a/docs/xml/gui/fpg_form.xml b/docs/xml/gui/fpg_form.xml
index 6a3027b1..c6c2e3d7 100644
--- a/docs/xml/gui/fpg_form.xml
+++ b/docs/xml/gui/fpg_form.xml
@@ -25,6 +25,41 @@ horizontally.
</short>
</element>
+<element name="TfpgBaseForm">
+<short>TfpgBaseForm is the base class from which to derive a window such as a form or dialog</short>
+<descr><printshort id="TfpgBaseForm"/>.</descr>
+</element>
+
+<element name="TfpgBaseForm.OnCloseQuery">
+<short>Occurs when close is attempted</short>
+<descr><p><printshort id="TfpgBaseForm.OnCloseQuery"/>. Use OnCloseQuery to specify the conditions
+under which the form can close. An OnCloseQuery event handler returns a Boolean CanClose value
+that determines whether a form is allowed to close. Its default value is True.</p>
+<p>You can use an OnCloseQuery event handler to ask users if they are sure they really want
+the form closed immediately. For example, you can use the handler to display a message box
+that prompts the user to save a file before closing the form.</p></descr>
+<seealso>
+<link id="fpg_form.TfpgBaseForm.OnClose">OnClose</link>
+</seealso>
+</element>
+
+<element name="TfpgBaseForm.OnClose">
+<short>Occurs when the form closes</short>
+<descr><p><printshort id="TfpgBaseForm.OnClose"/>. Use OnClose to perform special processing when
+the form closes. The OnClose event specifies which event handler to call when a form is about
+to close. The handler specified by OnClose might, for example, test to make sure all fields in
+a data-entry form have valid contents before allowing the form to close.</p>
+<p>A form is closed by the Close method or when the user chooses Close from the form's system
+menu.</p>
+<remark>Closing or hiding the main form terminates the application.</remark></descr>
+<seealso>
+<link id="fpg_form.TfpgBaseForm.OnCloseQuery">OnCloseQuery</link>
+</seealso></element>
+
+<!-- inherited docs -->
+<element name="TfpgForm.OnCloseQuery" link="#fpgui.fpg_form.TfpgBaseForm.OnCloseQuery"></element>
+<element name="TfpgForm.OnClose" link="#fpgui.fpg_form.TfpgBaseForm.OnClose"></element>
+
</module>
</package>
</fpdoc-descriptions>
diff --git a/docs/xml/gui/fpg_tree.xml b/docs/xml/gui/fpg_tree.xml
index 6a69fd64..da1c631f 100644
--- a/docs/xml/gui/fpg_tree.xml
+++ b/docs/xml/gui/fpg_tree.xml
@@ -10,6 +10,20 @@ You can include icons with items' text labels and display different icons to
indicate whether a node is expanded or collapsed.</p>
</descr>
+<element name="TfpgTreeNode">
+<short>TfpgTreeNdoe describes an individual node in a tree view widget.</short>
+<descr>Each node in a tree view control consists of a label and an optional
+bitmapped image. Each item can be the parent of a list of subitems. By clicking
+an item, the user can expand or collapse the associated list of subitems.</descr>
+<seealso>
+ <link id="fpgui.fpg_tree.TfpgTreeView">TfpgTreeView</link>
+</seealso>
+</element>
+
+<element name="TfpgTreeNode.TreeView">
+<short>Specifies the tree view widget that displays the node.</short>
+<descr>Use TreeView to determine the tree view associated with the tree node.</descr>
+</element>
<element name="TfpgTreeView">
<short>Represents a window that displays a hierachy list of items</short>
@@ -21,6 +35,9 @@ in a tree view control consists of a label and a number of optional bitmapped im
Each node can have a list of subnodes associated with it. By clicking on a node,
the user can expand or collapse the associated list of subnodes.</p>
<remark>There is basic column support, but this is still very experimental.</remark></descr>
+<seealso>
+ <link id="fpgui.fpg_tree.TfpgTreeNode">TfpgTreeNode</link>
+</seealso>
</element>
<element name="TfpgTreeView.FullCollapse">
diff --git a/docview/docs/docview.ipf b/docview/docs/docview.ipf
index 94099582..c916787d 100644
--- a/docview/docs/docview.ipf
+++ b/docview/docs/docview.ipf
@@ -136,7 +136,7 @@ The following trademarks are used in this online help file:
.* ************************************************************
.* Using DocView
.* ************************************************************
-:h1 res=2 id='Using'.Using &dv.
+:h1 res=2 id='Using'.Using DocView
:hp2.Using &dv.:ehp2.
:p.
Once you have :link reftype=hd refid='OpeningFiles'.opened a
@@ -169,8 +169,7 @@ Colours and some of the behaviour of &dv. can be adjusted from the "Tools
.* ************************************************************
.* Opening Help File
.* ************************************************************
-:h1 res=3 id='OpeningFiles'.
-Opening Files
+:h1 res=3 id='OpeningFiles'.Opening Files
:i1 id=30005.open
:p.:hp2.Opening Help Files:ehp2.
:p.
diff --git a/docview/images/go-down.bmp b/docview/images/go-down.bmp
index 60676d0b..47b2b56c 100644
--- a/docview/images/go-down.bmp
+++ b/docview/images/go-down.bmp
Binary files differ
diff --git a/docview/images/go-next.bmp b/docview/images/go-next.bmp
index 1da9e144..4d1d6800 100644
--- a/docview/images/go-next.bmp
+++ b/docview/images/go-next.bmp
Binary files differ
diff --git a/docview/images/go-previous.bmp b/docview/images/go-previous.bmp
index 6143639b..f2a908c2 100644
--- a/docview/images/go-previous.bmp
+++ b/docview/images/go-previous.bmp
Binary files differ
diff --git a/docview/images/go-up.bmp b/docview/images/go-up.bmp
index 7b916d8f..af8b200a 100644
--- a/docview/images/go-up.bmp
+++ b/docview/images/go-up.bmp
Binary files differ
diff --git a/docview/src/arrows.inc b/docview/src/arrows.inc
index bfe510a5..e9d485e3 100644
--- a/docview/src/arrows.inc
+++ b/docview/src/arrows.inc
@@ -1,380 +1,208 @@
Const
- usr_arrow_up : Array[0..1549] of byte = (
- 66, 77, 14, 6, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
- 0, 22, 0, 0, 0, 22, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
- 216, 5, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255, 4,115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,
- 115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,115, 58,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255, 4,115, 58,169,227,197,133,218,175,131,219,174,131,
- 222,176,132,223,177,132,224,177,132,223,177,131,221,175, 4,115, 58,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255, 4,115, 58,169,228,198, 30,189,108, 16,190,102, 18,
- 196,106, 19,201,109, 20,203,110, 19,199,108,132,223,177, 4,115, 58,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255, 4,115, 58,169,228,198, 41,193,116, 16,191,102, 18,
- 198,107, 20,204,111, 21,208,113, 19,202,109,132,224,177, 4,115, 58,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255, 4,115, 58,166,227,196, 56,195,124, 16,189,101, 17,
- 195,105, 18,199,107, 19,200,108, 18,198,107,132,223,176, 4,115, 58,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255, 4,115, 58,165,225,194, 74,199,135, 20,186,102, 16,
- 189,101, 16,191,103, 17,192,103, 16,191,102,131,220,175, 4,115, 58,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255, 4,117, 59, 4,115, 58, 4,115,
- 58, 4,115, 58, 5,120, 61,162,222,192, 69,193,130, 42,187,114, 14,
- 182, 96, 14,184, 97, 14,184, 98, 14,183, 97,130,217,172, 5,121, 62,
- 4,115, 58, 4,115, 58, 4,115, 58, 4,118, 58,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255, 3,114, 57, 40,138, 88,160,215,
- 187,165,219,191,163,219,190,160,220,189, 65,187,125, 58,188,121, 25,
- 179,101, 12,176, 92, 12,176, 92, 12,175, 92,129,213,170,128,211,169,
- 128,209,168,121,203,160, 31,133, 79, 3,114, 59,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58, 55,148,
- 100,152,213,181, 81,184,132, 65,181,121, 59,181,119, 52,180,115, 44,
- 179,110, 17,170, 92, 10,168, 87, 9,167, 87, 9,166, 86, 23,168, 94,
- 114,200,156, 41,142, 91, 4,117, 57,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 3,118,
- 60, 73,161,116,141,209,173, 64,177,119, 52,173,111, 45,172,107, 39,
- 171,104, 28,168, 97, 9,161, 83, 7,160, 81, 14,161, 86,106,195,149,
- 57,154,104, 3,117, 60,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 0, 85,
- 85, 4,118, 58, 89,172,130,125,202,162, 49,172,108, 40,168,102, 33,
- 165, 97, 26,162, 92, 15,158, 84, 8,155, 79, 95,190,141, 72,167,118,
- 4,118, 59, 0,102, 51,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0,118, 59, 3,118, 60,101,182,140,105,194,148, 35,166, 99, 28,
- 163, 94, 22,160, 89, 14,157, 84, 80,184,131, 85,178,130, 3,117, 59,
- 0,113, 57,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255, 0,114, 62, 9,118, 62,112,191,150, 82,185,133, 24,
- 161, 90, 17,158, 86, 67,179,121,100,187,142, 8,120, 61, 7,118, 59,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255, 5,113, 59, 16,124, 69,118,195,156, 58,
- 175,114, 53,173,111,109,193,150, 15,123, 68, 4,116, 56,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255, 3,117, 58, 24,129, 75,117,
- 197,156,114,197,154, 23,131, 75, 5,117, 60,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,118, 59, 34,
- 139, 85, 34,141, 85, 3,117, 60,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 3,
- 118, 60, 4,118, 60, 0, 85, 85,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0);
+ usr_arrow_up: array[0..821] of byte = (
+ 66, 77, 54, 3, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
+ 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 0, 3, 0, 0,196, 14, 0, 0,196, 14, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,238,238,238,238,238,238,238,238,238,238,238,238, 24,117,
+ 69, 4,115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,
+ 115, 58, 24,117, 70,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238, 4,115, 58,165,223,
+ 193,129,213,170,129,215,171,130,217,172,130,218,173,130,217,173, 4,
+ 115, 58,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238, 4,115, 58,169,226,197, 22,182,
+ 101, 15,186, 99, 16,190,102, 17,193,103,131,222,176, 4,115, 58,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238, 4,115, 58,173,228,200, 31,189,109, 16,191,
+ 102, 18,197,106, 19,201,109,132,227,179, 4,115, 58,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238, 4,115, 58,176,229,202, 49,195,120, 17,192,103, 19,200,
+ 108, 21,207,113,133,229,180, 4,115, 58,238,238,238,238,238,238,238,
+ 238,238,238,238,238, 56,123, 89, 4,115, 58, 4,115, 58, 4,115, 58,
+ 10,119, 63,178,230,203, 75,201,137, 16,189,101, 17,195,105, 18,199,
+ 107,132,225,178, 11,121, 65, 4,115, 58, 4,115, 58, 4,115, 58, 56,
+ 123, 89,144,162,153, 45,137, 90,181,224,202,188,229,208,184,229,206,
+ 179,229,203, 99,205,151, 25,186,104, 15,188,100, 16,190,101,131,220,
+ 175,130,219,174,130,217,172,123,211,166, 31,131, 79,144,162,153,238,
+ 238,238, 79,129,103, 88,167,127,176,223,199,119,203,160,108,202,154,
+ 99,202,150, 67,193,129, 13,179, 94, 13,181, 95, 13,180, 95, 15,178,
+ 95,106,206,155, 57,154,104, 80,130,104,238,238,238,238,238,238,227,
+ 227,227, 31,118, 73,127,195,160,151,213,181,105,197,150, 96,197,145,
+ 86,195,139, 29,176,102, 11,172, 89, 11,171, 89, 77,193,133, 85,179,
+ 131, 31,118, 73,227,227,227,238,238,238,238,238,238,238,238,238,196,
+ 199,197, 20,119, 67,156,212,183,122,201,160, 90,190,139, 81,188,134,
+ 56,180,116, 8,163, 83, 44,175,108,110,195,151, 17,118, 65,196,199,
+ 197,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,144,
+ 162,153, 45,136, 89,160,215,187, 95,189,140, 77,182,128, 68,179,122,
+ 26,162, 92,113,196,154, 35,131, 82,144,162,153,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238, 79,
+ 129,103, 79,163,120,145,210,176, 72,180,125, 63,177,118,106,194,149,
+ 62,154,107, 80,130,104,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,227,227,227, 31,
+ 118, 73,114,188,149,114,197,154,106,194,149, 91,178,133, 31,118, 73,
+ 227,227,227,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,196,199,197, 21,
+ 120, 68,135,202,167,126,199,162, 21,120, 68,196,199,197,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,144,162,153, 45,
+ 135, 89, 44,135, 88,144,162,153,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238, 92,135,113, 92,
+ 135,113,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238);
Const
- usr_arrow_down : Array[0..1549] of byte = (
- 66, 77, 14, 6, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
- 0, 22, 0, 0, 0, 22, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
- 216, 5, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 3,
- 109, 54, 5,112, 57,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 3,110, 57, 35,
- 142, 87, 36,149, 90, 3,113, 57,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255, 3,117, 58, 22,130, 76,119,
- 216,167,120,221,170, 24,137, 79, 5,117, 60,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255, 5,113, 59, 15,123, 68,114,209,161, 57,
- 206,131, 59,211,134,117,221,169, 15,126, 69, 4,116, 56,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255, 0,114, 62, 9,119, 63,102,198,149, 72,204,137, 17,
- 195,105, 19,200,108, 74,214,143,105,208,157, 9,122, 63, 7,118, 59,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0,118, 59, 5,119, 60, 94,186,138, 85,201,142, 14,185, 98, 16,
- 189,101, 17,193,103, 17,194,104, 87,211,148, 89,193,139, 4,118, 60,
- 0,113, 57,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 0, 85,
- 85, 4,118, 58, 89,175,131,129,211,169, 19,177, 96, 13,179, 94, 14,
- 183, 97, 14,185, 98, 15,186, 99, 15,185, 99,100,208,153, 74,175,123,
- 4,119, 60, 0,102, 51,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 3,118,
- 60, 73,160,116,144,212,177, 71,186,128, 52,183,116, 15,173, 93, 12,
- 175, 92, 12,177, 93, 12,178, 94, 12,177, 93, 18,177, 96,108,204,156,
- 57,157,105, 3,118, 60,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58, 55,149,
- 100,154,213,182, 86,186,134, 70,182,125, 63,182,121, 51,180,114, 24,
- 173, 96, 10,169, 88, 10,170, 88, 10,169, 88, 10,168, 87, 23,170, 95,
- 114,201,156, 40,142, 91, 4,117, 57,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255, 3,114, 57, 41,138, 88,163,216,
- 189,168,219,193,164,218,190,160,216,187, 65,178,121, 58,178,116, 49,
- 176,111, 34,170,101, 9,162, 84, 8,161, 83,126,205,165,126,204,164,
- 126,203,163,119,198,158, 29,131, 79, 3,114, 59,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255, 4,117, 59, 4,115, 58, 4,115,
- 58, 4,115, 58, 5,119, 60,162,217,189, 69,179,123, 60,176,116, 50,
- 172,109, 42,168,103, 26,162, 92, 6,154, 78,126,202,163, 5,119, 60,
- 4,115, 58, 4,115, 58, 4,115, 58, 4,117, 58,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255, 4,115, 58,164,218,190, 71,180,124, 62,176,118, 52,
- 173,111, 44,169,105, 35,165, 98, 17,158, 86,126,202,163, 4,115, 58,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255, 4,115, 58,165,218,191, 73,181,125, 64,177,119, 54,
- 173,112, 45,169,105, 36,166, 99, 24,161, 91,126,202,163, 4,115, 58,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255, 4,115, 58,166,218,191, 74,181,126, 64,177,119, 54,
- 173,112, 46,170,106, 37,166,100, 26,162, 92,127,203,164, 4,115, 58,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255, 4,115, 58,166,218,191, 74,181,126, 64,177,119, 54,
- 173,112, 46,170,106, 36,166, 99, 26,162, 92,127,203,164, 4,115, 58,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255, 4,115, 58,165,218,191,160,216,187,156,214,184,150,
- 212,180,146,210,177,141,208,174,136,206,170,128,203,164, 4,115, 58,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255, 4,117, 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,
- 115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,117, 58,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0);
+ usr_arrow_down: array[0..821] of byte = (
+ 66, 77, 54, 3, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
+ 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 0, 3, 0, 0,196, 14, 0, 0,196, 14, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238, 92,135,113, 92,135,113,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,144,162,153, 42,137, 88, 42,137, 88,144,162,153,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,196,199,197, 21,121,
+ 69,116,209,162,117,211,163, 21,122, 69,196,199,197,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,227,227,227, 31,119, 73, 93,190,140, 76,209,
+ 141, 78,213,144, 95,196,145, 31,119, 74,227,227,227,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238, 79,130,103, 78,168,122,109,214,160, 18,196,105, 20,203,
+ 110,108,224,165, 66,166,114, 80,130,104,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,144,162,153,
+ 44,138, 89,148,219,183, 49,195,121, 17,192,103, 18,197,106, 31,201,
+ 115,120,219,168, 36,135, 84,144,162,153,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,196,199,197, 20,119, 67,144,211,177,
+ 101,204,152, 59,194,125, 15,185, 98, 15,188,101, 16,189,101, 50,197,
+ 123,113,206,159, 17,119, 66,196,199,197,238,238,238,238,238,238,238,
+ 238,238,227,227,227, 31,118, 73,117,190,152,131,209,169, 82,194,137,
+ 77,195,135, 30,182,105, 13,180, 95, 13,180, 95, 13,179, 94, 78,197,
+ 137, 85,182,131, 31,118, 73,227,227,227,238,238,238,238,238,238, 79,
+ 129,103, 81,162,122,155,214,184, 93,190,141, 88,192,138, 81,192,135,
+ 66,188,126, 12,171, 90, 11,171, 89, 10,170, 89, 12,169, 88,104,199,
+ 151, 56,152,102, 80,130,104,238,238,238,144,162,153, 44,135, 88,170,
+ 219,194,175,222,198,173,221,197,170,220,194, 86,189,136, 77,186,130,
+ 31,170, 99, 8,162, 83,127,206,165,126,205,164,126,204,164,120,199,
+ 159, 31,129, 78,144,162,153, 56,123, 89, 4,115, 58, 4,115, 58, 4,
+ 115, 58, 10,117, 62,173,221,197, 89,188,137, 80,184,130, 52,173,111,
+ 6,154, 78,126,202,163, 10,117, 62, 4,115, 58, 4,115, 58, 4,115,
+ 58, 56,123, 89,238,238,238,238,238,238,238,238,238,238,238,238, 4,
+ 115, 58,176,222,199, 93,189,140, 84,185,133, 71,180,124, 6,154, 78,
+ 126,202,163, 4,115, 58,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238, 4,115, 58,177,
+ 223,199, 95,190,141, 85,186,134, 65,178,120, 6,154, 78,126,202,163,
+ 4,115, 58,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238, 4,115, 58,177,223,200, 95,
+ 190,141, 85,186,134, 55,174,113, 6,154, 78,126,202,163, 4,115, 58,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238, 4,115, 58,176,222,199,171,220,195,166,
+ 218,191,145,210,177,126,202,163,126,202,163, 4,115, 58,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238, 24,117, 69, 4,115, 58, 4,115, 58, 4,115, 58, 4,
+ 115, 58, 4,115, 58, 4,115, 58, 24,117, 69,238,238,238,238,238,238,
+ 238,238,238,238,238,238);
Const
- usr_arrow_left : Array[0..1549] of byte = (
- 66, 77, 14, 6, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
- 0, 22, 0, 0, 0, 22, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
- 216, 5, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255, 0,102, 51, 3,110, 55,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 3,
- 89, 45, 27,129, 76, 6,116, 60,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 2,101, 51, 37,
- 139, 87,121,206,163, 8,118, 60,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255, 3,110, 55, 54,152,102,117,
- 208,161,129,216,172, 8,118, 60,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255, 0,102, 51, 3,114, 58, 69,166,117,111,206,157, 28,
- 185,105,128,219,173, 9,125, 65, 4,115, 58, 4,115, 58, 4,115, 58,
- 4,115, 58, 4,115, 58, 4,115, 59,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 3, 88, 44, 7,118, 60, 83,176,129, 99,198,148, 20,177, 97, 14,
- 182, 96,128,221,174,132,225,178,134,230,181,133,229,180,132,225,178,
- 131,221,175,130,217,173, 8,118, 60, 0,102, 51,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,109,
- 55, 13,121, 66, 97,185,140, 83,187,134, 12,165, 87, 11,172, 90, 13,
- 180, 95, 15,187,100, 17,193,104, 18,198,107, 18,197,106, 17,193,103,
- 15,186, 99,127,215,170, 8,117, 60, 0,102, 51,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255, 0,128, 0, 4,116, 58, 21,130,
- 73,108,192,149, 68,179,122, 6,154, 78, 7,160, 82, 9,167, 87, 11,
- 174, 91, 13,180, 95, 14,184, 98, 15,187,100, 15,187, 99, 14,184, 98,
- 13,179, 95,126,212,168, 8,117, 61, 0,128, 64,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255, 3,119, 59, 32,138, 84,113,196,
- 154, 54,173,112, 13,157, 83, 16,158, 85, 15,158, 84, 15,164, 87, 11,
- 167, 87, 10,171, 89, 11,174, 91, 12,176, 92, 12,176, 92, 11,174, 91,
- 11,170, 90,132,211,170, 8,117, 61, 0,128, 64,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255, 3,117, 59, 32,136, 84,116,196,
- 155, 62,177,117, 23,161, 90, 28,163, 94, 33,165, 97, 37,167,100, 43,
- 171,105, 44,175,107, 40,176,106, 35,175,103, 35,175,103, 41,175,107,
- 54,178,114,149,213,180, 8,117, 61, 0,128, 64,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,116, 58, 22,128,
- 73,116,195,154, 85,186,135, 35,166, 99, 40,168,102, 45,170,106, 50,
- 172,109, 54,173,112, 58,175,115, 61,176,117, 63,177,118, 65,178,120,
- 65,178,120,154,214,184, 9,118, 62, 0,128, 64,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 3,114,
- 57, 15,123, 68,108,188,148,107,195,150, 49,172,109, 52,173,111, 57,
- 175,114, 62,177,118, 66,178,120, 68,179,122, 71,181,125, 73,181,126,
- 74,182,127,159,216,187, 10,118, 63, 0,128, 64,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 5,117, 58, 8,119, 61, 99,182,139,127,203,164, 66,178,120, 65,
- 178,120,157,215,185,161,217,188,163,218,190,164,218,191,166,219,192,
- 166,219,192,166,219,192, 10,118, 63, 0,128, 64,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255, 0,118, 59, 4,116, 60, 85,170,126,142,209,175, 82,
- 185,132,160,217,188, 11,123, 65, 4,115, 58, 4,115, 58, 4,115, 58,
- 4,115, 58, 4,115, 58, 4,117, 59, 0,128, 64,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255, 0,116, 70, 4,117, 59, 69,158,113,152,
- 212,181,165,218,191, 11,119, 63, 0,128, 64,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255, 0,128, 0, 3,116, 58, 52,
- 146, 98,159,214,186, 11,119, 63, 0,128, 64,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 5,
- 117, 60, 37,136, 84, 7,117, 60, 0,128, 64,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255, 4,115, 57, 4,116, 58, 0,128, 64,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0);
+ usr_arrow_left: array[0..821] of byte = (
+ 66, 77, 54, 3, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
+ 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 0, 3, 0, 0,196, 14, 0, 0,196, 14, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,145,162,154, 56,
+ 123, 89,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,227,227,227, 79,130,103, 32,131, 80, 4,115, 58,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,196,199,
+ 197, 31,119, 74, 58,160,108,125,215,169, 4,115, 58,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,144,162,153, 18,120, 67, 89,195,
+ 140,110,220,165,131,222,176, 4,115, 58,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 227,227,227, 79,130,103, 36,135, 84,114,213,163, 84,218,151, 21,201,
+ 110,131,222,176, 10,120, 64, 4,115, 58, 4,115, 58, 4,115, 58, 4,
+ 115, 58, 24,117, 69,238,238,238,238,238,238,196,199,197, 31,118, 73,
+ 64,160,110,118,213,165, 51,200,124, 17,194,105, 17,193,103,130,219,
+ 174,129,216,172,128,212,169,127,207,166,126,202,163,126,202,163, 4,
+ 115, 58,238,238,238,144,162,153, 21,120, 68, 91,181,134,101,202,150,
+ 25,181,101, 13,181, 96, 14,183, 97, 14,182, 97, 13,179, 94, 11,173,
+ 90, 9,166, 86, 7,158, 81, 6,154, 78,126,202,163, 4,115, 58, 92,
+ 135,113, 44,135, 89,119,196,157, 84,187,135, 34,172,102, 32,175,102,
+ 23,175, 98, 14,173, 92, 11,172, 89, 10,169, 88, 9,164, 85, 7,158,
+ 81, 6,154, 78, 6,154, 78,126,202,163, 4,115, 58, 92,135,113, 49,
+ 138, 91,130,201,165, 99,191,144, 53,173,112, 60,178,117, 66,182,123,
+ 71,185,127, 66,183,122, 53,176,113, 39,168,101, 29,163, 94, 32,164,
+ 96, 43,169,104,155,214,184, 4,115, 58,238,238,238,144,162,153, 25,
+ 123, 72,114,188,150,132,205,167, 77,182,128, 73,181,125, 79,183,130,
+ 84,185,133, 88,187,136, 89,188,137, 90,188,138, 89,188,137, 88,187,
+ 136,166,218,191, 4,115, 58,238,238,238,238,238,238,196,199,197, 31,
+ 118, 73, 86,166,125,151,212,181,106,194,148, 87,186,135, 92,189,139,
+ 172,221,196,174,222,197,174,222,198,174,222,197,172,221,196,170,220,
+ 194, 4,115, 58,238,238,238,238,238,238,238,238,238,227,227,227, 79,
+ 129,103, 50,139, 94,150,210,179,136,207,170,100,192,145,177,223,199,
+ 10,117, 62, 4,115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 24,117,
+ 69,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,144,
+ 162,153, 23,121, 70,126,194,159,163,217,189,181,224,202, 4,115, 58,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,196,
+ 199,197, 31,118, 73, 88,167,127,177,223,200, 4,115, 58,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,227,
+ 227,227, 79,129,103, 46,137, 90, 4,115, 58,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,145,162,154, 56,123, 89,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238);
Const
- usr_arrow_right : Array[0..1549] of byte = (
- 66, 77, 14, 6, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
- 0, 22, 0, 0, 0, 22, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
- 216, 5, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 3,110, 55, 2,
- 82, 42,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,115, 58, 30,
- 131, 78, 3, 93, 47,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,122,
- 207,164, 41,141, 90, 2,102, 51,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,130,
- 216,172,118,214,166, 58,159,107, 4,112, 56,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 57, 4,115,
- 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 5,119, 61,131,
- 219,174, 31,198,113,114,222,167, 74,180,127, 4,116, 59,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,126,203,
- 163,126,203,163,126,203,164,127,207,166,129,212,169,130,216,172,131,
- 220,175, 17,195,105, 26,204,115,105,223,163, 90,195,142, 9,119, 62,
- 2, 86, 44,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,126,203,
- 163, 6,154, 78, 6,154, 78, 8,161, 82, 10,168, 87, 12,176, 92, 14,
- 183, 97, 16,189,101, 17,193,103, 19,194,105, 89,211,149,103,201,152,
- 15,125, 68, 4,110, 56,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,126,203,
- 163, 6,154, 78, 6,154, 78, 6,156, 79, 8,163, 84, 10,169, 88, 12,
- 175, 92, 13,179, 94, 14,182, 96, 14,182, 96, 13,180, 95, 71,196,132,
- 112,202,156, 22,131, 74, 3,119, 59, 0,128, 0,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,133,205,
- 168, 7,154, 79, 6,154, 78, 6,154, 78, 6,156, 79, 8,161, 82, 9,
- 165, 85, 12,170, 88, 18,174, 94, 21,175, 96, 22,173, 97, 19,170, 93,
- 58,182,119,117,199,157, 34,139, 85, 4,118, 59,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,151,213,
- 181, 52,173,111, 40,168,102, 33,165, 97, 33,165, 97, 39,167,102, 45,
- 171,107, 46,173,107, 43,173,106, 39,171,104, 34,169,100, 28,165, 95,
- 65,178,120,120,198,159, 34,138, 86, 3,117, 59,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,156,215,
- 185, 65,178,120, 65,178,120, 65,178,120, 63,177,118, 61,176,117, 58,
- 175,115, 54,173,112, 50,172,109, 45,170,106, 40,168,102, 88,188,137,
- 120,197,157, 24,129, 75, 4,115, 58,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,160,217,
- 188, 74,182,127, 74,182,127, 73,181,126, 71,181,125, 68,179,122, 66,
- 178,120, 62,177,118, 58,175,115, 54,174,112,111,197,152,113,191,151,
- 16,124, 69, 3,116, 60,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,166,219,
- 192,166,219,192,166,219,192,166,219,192,164,218,191,163,218,190,161,
- 217,188, 69,180,123, 71,180,124,130,204,166,103,183,141, 9,118, 61,
- 5,114, 57,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,117, 58, 4,115,
- 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 5,119, 60,165,
- 218,191, 87,187,135,144,210,176, 91,173,131, 3,116, 59, 0,118, 55,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,169,
- 220,193,155,213,183, 74,161,116, 4,116, 59, 0,106, 64,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,164,
- 217,190, 57,149,102, 3,118, 60, 0, 85, 85,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,115, 58, 41,
- 137, 88, 5,117, 59,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,117, 59, 3,
- 114, 57,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
- 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
- 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
- 255, 0, 0);
+ usr_arrow_right: array[0..821] of byte = (
+ 66, 77, 54, 3, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
+ 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 0, 3, 0, 0,196, 14, 0, 0,196, 14, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238, 56,123, 89,144,162,153,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238, 4,115,
+ 58, 31,131, 80, 80,130,104,227,227,227,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238, 4,115, 58,123,211,
+ 166, 58,159,107, 31,119, 74,196,199,197,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238, 4,115, 58,129,215,171,108,213,
+ 160, 88,192,138, 18,120, 67,144,162,153,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238, 24,117, 69, 4,115, 58, 4,115, 58,
+ 4,115, 58, 4,115, 58, 10,119, 63,129,214,171, 17,186,100, 82,211,
+ 146,115,215,165, 36,137, 85, 79,130,103,227,227,227,238,238,238,238,
+ 238,238,238,238,238, 4,115, 58,126,202,163,126,202,163,126,202,163,
+ 126,204,164,127,209,167,129,213,170, 14,183, 97, 16,191,102, 52,203,
+ 127,120,218,168, 65,164,113, 31,119, 73,196,199,197,238,238,238,238,
+ 238,238, 4,115, 58,126,202,163, 6,154, 78, 6,154, 78, 6,156, 79,
+ 8,164, 84, 11,172, 90, 13,179, 94, 14,185, 98, 15,188,100, 28,191,
+ 108,103,210,156, 93,186,138, 21,121, 69,144,162,153,238,238,238, 4,
+ 115, 58,126,202,163, 6,154, 78, 6,154, 78, 6,154, 78, 7,160, 82,
+ 9,167, 87, 11,174, 91, 14,178, 95, 23,184,102, 31,186,108, 38,186,
+ 111, 85,198,141,118,201,158, 44,135, 88, 92,135,113, 4,115, 58,156,
+ 215,185, 59,175,116, 51,172,110, 43,169,104, 47,172,107, 61,182,120,
+ 73,190,130, 80,195,137, 77,196,136, 73,194,132, 68,190,128,109,202,
+ 155,137,206,170, 52,141, 95, 92,135,113, 4,115, 58,163,217,189, 84,
+ 185,133, 88,187,136, 91,188,139, 92,189,139, 92,190,140, 92,193,141,
+ 90,194,141, 85,194,138, 88,195,140,140,212,175,122,194,155, 27,123,
+ 73,144,162,153,238,238,238, 4,115, 58,167,219,192,170,220,194,173,
+ 221,197,175,222,198,176,222,199,176,222,199,100,193,145, 97,193,143,
+ 115,200,157,159,217,187, 91,169,128, 31,118, 73,196,199,197,238,238,
+ 238,238,238,238, 24,117, 69, 4,115, 58, 4,115, 58, 4,115, 58, 4,
+ 115, 58, 10,117, 62,182,224,203,111,196,153,145,210,177,156,212,183,
+ 53,141, 96, 79,129,103,227,227,227,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238, 4,
+ 115, 58,187,227,206,171,220,195,131,197,163, 23,121, 70,144,162,153,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238, 4,115, 58,183,
+ 225,203, 91,169,130, 31,118, 73,196,199,197,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238, 4,115, 58, 47,138, 90, 80,
+ 130,104,227,227,227,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238,238, 56,123, 89,144,162,153,238,238,238,238,
+ 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
+ 238,238,238,238,238,238);
diff --git a/docview/src/docview.rc b/docview/src/docview.rc
index 64d63286..24dc3cfe 100644
--- a/docview/src/docview.rc
+++ b/docview/src/docview.rc
@@ -1,8 +1,8 @@
MAINICON ICON "../images/docview-48x48.ico"
1 VERSIONINFO
-FILEVERSION 1, 1, 0, 0
-PRODUCTVERSION 1, 1, 0, 0
+FILEVERSION 1, 3, 0, 0
+PRODUCTVERSION 1, 3, 0, 0
FILEFLAGSMASK 0
FILEOS 0x40000
FILETYPE 1
@@ -13,12 +13,12 @@ FILETYPE 1
{
VALUE "CompanyName", "fpGUI Toolkit"
VALUE "FileDescription", "fpGUI's INF Documentation Viewer"
- VALUE "FileVersion", "1.1.0"
+ VALUE "FileVersion", "1.3.0"
VALUE "InternalName", "docview"
VALUE "LegalCopyright", "GNU Public License"
VALUE "OriginalFilename", "docview"
VALUE "ProductName", "fpGUI Toolkit"
- VALUE "ProductVersion", "1.1.0"
+ VALUE "ProductVersion", "1.3.0"
}
}
BLOCK "VarFileInfo"
diff --git a/docview/src/frm_main.pas b/docview/src/frm_main.pas
index 802c3600..00a192ea 100644
--- a/docview/src/frm_main.pas
+++ b/docview/src/frm_main.pas
@@ -2,9 +2,16 @@ unit frm_main;
{$mode objfpc}{$H+}
+{$IFDEF WINDOWS}
+ {$define ABOUT_SYSMENU}
+{$ENDIF}
+
interface
uses
+ {$IFDEF ABOUT_SYSMENU}
+ Windows, // Used for HMENU to add a new menu to the window System Menu. This feature is just for fun.
+ {$ENDIF}
SysUtils, Classes, fpg_base, fpg_main, fpg_form, fpg_panel, fpg_tab,
fpg_tree, fpg_splitter, fpg_menu, fpg_button, fpg_listbox,
fpg_label, fpg_edit, fpg_radiobutton, fpg_progressbar, fpg_imagelist,
@@ -202,6 +209,7 @@ type
// Used in loading contents
procedure AddChildNodes(AHelpFile: THelpFile; AParentNode: TfpgTreeNode; ALevel: longint; var ATopicIndex: longint );
procedure ClearIndexComponents;
+ procedure ProcessAboutMsg(var Msg: TfpgMessageRec); message FPGM_ABOUT;
// Note manipulations --------------------------------
// make sure that note insert positions are not in
@@ -634,6 +642,11 @@ end;
procedure TMainForm.MainFormShow(Sender: TObject);
var
lFilename: TfpgString;
+ {$IFDEF ABOUT_SYSMENU}
+ hSysMenu: HMENU;
+const
+ ID_ABOUT = 200001; // Must match the definition in fpg_gdi.pas
+ {$ENDIF}
begin
bvlBody.Realign;
@@ -660,6 +673,12 @@ begin
OpenFile(lFilename, '', true);
end;
end;
+ // This is just for fun! ;-)
+ {$IFDEF ABOUT_SYSMENU}
+ hSysMenu := GetSystemMenu(self.WinHandle, false);
+ AppendMenu(hSysMenu, MF_SEPARATOR, 0, nil);
+ AppendMenu(hSysMenu, MF_STRING, ID_ABOUT, PChar('&About fpGUI Toolkit...'));
+ {$ENDIF}
end;
procedure TMainForm.MainFormDestroy(Sender: TObject);
@@ -889,7 +908,7 @@ end;
procedure TMainForm.miToolsShowEnvVariablesClicked(Sender: TObject);
function LGetEnvVarValue(const AVariable: string): string;
begin
- Result := Format('%s = ''%s''', [AVariable, GetEnvironmentVariable(AVariable)]);
+ Result := Format('%s = ''%s''', [AVariable, SysUtils.GetEnvironmentVariable(AVariable)]);
end;
begin
RichView.Clear;
@@ -2223,6 +2242,11 @@ begin
IndexLoaded := False;
end;
+procedure TMainForm.ProcessAboutMsg(var Msg: TfpgMessageRec);
+begin
+ TfpgMessageDialog.AboutFPGui;
+end;
+
procedure TMainForm.CorrectNotesPositions(Topic: TTopic; AText: pchar);
var
NoteIndex: longint;
@@ -2724,7 +2748,6 @@ begin
img := CreateImage_BMP(@dv_missing, sizeof(dv_missing));
FImages.AddImage(img);
-
// load toolbar images
fpgImages.AddMaskedBMP(
'dv.arrowleft', @usr_arrow_left,
diff --git a/examples/apps/ide/src/fpg_textedit.pas b/examples/apps/ide/src/fpg_textedit.pas
index 013ad86b..3e88f3d1 100644
--- a/examples/apps/ide/src/fpg_textedit.pas
+++ b/examples/apps/ide/src/fpg_textedit.pas
@@ -2412,7 +2412,7 @@ begin
BuffList[I] := SLine;
end;
end;
- BuffList.SaveToFile(AFileName);
+ BuffList.SaveToFile(fpgToOSEncoding(AFileName));
finally
BuffList.Free;
end;
@@ -2423,7 +2423,7 @@ begin
if not fpgFileExists(AFileName) then
Exit; //==>
Clear;
- FLines.LoadFromFile(AFileName);
+ FLines.LoadFromFile(fpgToOSEncoding(AFileName));
HandleResize(Width, Height);
Invalidate;
end;
diff --git a/examples/apps/ide/src/frm_configureide.pas b/examples/apps/ide/src/frm_configureide.pas
index fad0418f..51061a42 100644
--- a/examples/apps/ide/src/frm_configureide.pas
+++ b/examples/apps/ide/src/frm_configureide.pas
@@ -1,7 +1,7 @@
{
fpGUI IDE - Maximus
- Copyright (C) 2012 - 2013 Graeme Geldenhuys
+ Copyright (C) 2012 - 2014 Graeme Geldenhuys
See the file COPYING.modifiedLGPL, included in this distribution,
for details about redistributing fpGUI.
@@ -229,7 +229,6 @@ constructor TConfigureIDEForm.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FInternalMacroList := TIDEMacroList.Create;
- OnKeyPress := @FormKeyPressed;
end;
destructor TConfigureIDEForm.Destroy;
@@ -248,6 +247,7 @@ begin
Hint := '';
ShowHint := True;
WindowPosition := wpOneThirdDown;
+ OnKeyPress := @FormKeyPressed;
btnCancel := TfpgButton.Create(self);
with btnCancel do
diff --git a/examples/apps/ide/src/frm_main.pas b/examples/apps/ide/src/frm_main.pas
index fe903c31..8a8f3c12 100644
--- a/examples/apps/ide/src/frm_main.pas
+++ b/examples/apps/ide/src/frm_main.pas
@@ -1,7 +1,7 @@
{
fpGUI IDE - Maximus
- Copyright (C) 2012 - 2013 Graeme Geldenhuys
+ Copyright (C) 2012 - 2014 Graeme Geldenhuys
See the file COPYING.modifiedLGPL, included in this distribution,
for details about redistributing fpGUI.
@@ -118,6 +118,7 @@ type
procedure AddUnitToProject(const AUnitName: TfpgString);
procedure miProjectAddUnitToProject(Sender: TObject);
procedure tvProjectDoubleClick(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint);
+ procedure tvProjectKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean);
procedure grdMessageKeyPressed(Sender: TObject; var KeyCode: Word; var ShiftState: TShiftState; var Consumed: Boolean);
procedure TabSheetClosing(Sender: TObject; ATabSheet: TfpgTabSheet);
procedure BuildTerminated(Sender: TObject);
@@ -541,18 +542,18 @@ var
r: TfpgTreeNode;
n: TfpgTreeNode;
begin
- u := TUnit.Create;
- u.FileName := AUnitName;
- u.Opened := True;
- GProject.UnitList.Add(u);
- // add reference to tabsheet
- pcEditor.ActivePage.TagPointer := u;
- s := fpgExtractRelativepath(GProject.ProjectDir, u.FileName);
- r := GetUnitsNode;
- n := r.AppendText(s);
- // add reference to treenode
- n.Data := u;
- tvProject.Invalidate;
+ u := GProject.UnitList.AddFilename(AUnitName);
+ if Assigned(n) then
+ begin
+ // add reference to tabsheet
+ pcEditor.ActivePage.TagPointer := u;
+ s := u.GetRelativePath;
+ r := GetUnitsNode;
+ n := r.AppendText(s);
+ // add reference to treenode
+ n.Data := u;
+ tvProject.Invalidate;
+ end;
end;
procedure TMainForm.miProjectAddUnitToProject(Sender: TObject);
@@ -587,6 +588,38 @@ begin
end;
end;
+procedure TMainForm.tvProjectKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean);
+var
+ r: TfpgTreeNode;
+ n: TfpgTreeNode;
+ i: integer;
+begin
+ if keyCode = keyDelete then
+ begin
+ r := GetUnitsNode;
+ if r.FindSubNode(tvProject.Selection.Text, False) = tvProject.Selection then
+ begin
+ // remove from project, then from tree view
+ n := tvProject.Selection;
+ tvProject.GotoNextNodeUp;
+ r.Remove(n);
+ tvProject.Invalidate;
+ GProject.UnitList.Remove(TUnit(n.Data));
+
+ for i := 0 to pcEditor.PageCount-1 do
+ begin
+ if pcEditor.Pages[i].TagPointer = n.Data then
+ begin
+ pcEditor.Pages[i].TagPointer := nil;
+ break
+ end;
+ end;
+ TUnit(n.Data).Free;
+ n.Free;
+ end;
+ end;
+end;
+
procedure TMainForm.grdMessageKeyPressed(Sender: TObject; var KeyCode: Word; var ShiftState: TShiftState; var Consumed: Boolean);
var
cr: TClipboardKeyType;
@@ -1478,6 +1511,7 @@ begin
Hint := '';
TabOrder := 20;
OnDoubleClick := @tvProjectDoubleClick;
+ OnKeyPress := @tvProjectKeyPressed;
end;
tsFiles := TfpgTabSheet.Create(pnlTool);
@@ -1597,7 +1631,7 @@ begin
begin
Name := 'mnuProject';
SetPosition(476, 140, 172, 20);
- AddMenuItem('Options...', rsKeyCtrl+rsKeyShift+'O', @miProjectOptions);
+ AddMenuItem('Options...', rsKeyCtrl+rsKeyShift+'F11', @miProjectOptions);
AddMenuItem('-', '', nil);
AddMenuItem('New (empty)...', '', @miProjectNew);
AddMenuItem('New from Template...', '', @miProjectNewFromTemplate);
diff --git a/examples/apps/ide/src/frm_projectoptions.pas b/examples/apps/ide/src/frm_projectoptions.pas
index 1e1c318a..a3e43d6a 100644
--- a/examples/apps/ide/src/frm_projectoptions.pas
+++ b/examples/apps/ide/src/frm_projectoptions.pas
@@ -1,7 +1,7 @@
{
fpGUI IDE - Maximus
- Copyright (C) 2012 - 2013 Graeme Geldenhuys
+ Copyright (C) 2012 - 2014 Graeme Geldenhuys
See the file COPYING.modifiedLGPL, included in this distribution,
for details about redistributing fpGUI.
@@ -103,6 +103,7 @@ type
procedure CleanupCompilerDirs;
procedure CleanupUserMacrosGrid;
procedure SaveToMacroList(AList: TIDEMacroList);
+ procedure FormKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
@@ -582,6 +583,12 @@ begin
// AList.SetValue(cMacro_FPCSrcDir, edtFPCSrcDir.Directory);
end;
+procedure TProjectOptionsForm.FormKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean);
+begin
+ if KeyCode = keyEscape then
+ Close;
+end;
+
constructor TProjectOptionsForm.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
@@ -603,6 +610,7 @@ begin
WindowTitle := 'Project Options';
Hint := '';
ShowHint := True;
+ OnKeyPress := @FormKeyPressed;
btnCancel := TfpgButton.Create(self);
with btnCancel do
diff --git a/examples/apps/ide/src/maximus.lpi b/examples/apps/ide/src/maximus.lpi
index accb3570..01a377d7 100644
--- a/examples/apps/ide/src/maximus.lpi
+++ b/examples/apps/ide/src/maximus.lpi
@@ -42,7 +42,6 @@
<Unit0>
<Filename Value="maximus.lpr"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="maximus"/>
</Unit0>
<Unit1>
<Filename Value="frm_main.pas"/>
@@ -52,7 +51,6 @@
<Unit2>
<Filename Value="frm_configureide.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="frm_configureide"/>
</Unit2>
<Unit3>
<Filename Value="ideconst.pas"/>
@@ -67,7 +65,6 @@
<Unit5>
<Filename Value="frm_debug.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="frm_debug"/>
</Unit5>
<Unit6>
<Filename Value="project.pas"/>
@@ -77,7 +74,6 @@
<Unit7>
<Filename Value="unitlist.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="UnitList"/>
</Unit7>
<Unit8>
<Filename Value="frm_projectoptions.pas"/>
@@ -97,47 +93,42 @@
<Unit11>
<Filename Value="ideimages.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="ideimages"/>
</Unit11>
<Unit12>
<Filename Value="stringhelpers.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="stringhelpers"/>
</Unit12>
<Unit13>
<Filename Value="frm_procedurelist.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="frm_procedurelist"/>
</Unit13>
<Unit14>
- <Filename Value="mpaslex.pas"/>
+ <Filename Value="filemonitor.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="mPasLex"/>
+ <UnitName Value="filemonitor"/>
</Unit14>
<Unit15>
- <Filename Value="filemonitor.pas"/>
+ <Filename Value="synregexpr.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="filemonitor"/>
</Unit15>
<Unit16>
- <Filename Value="synregexpr.pas"/>
+ <Filename Value="fpg_textedit.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="SynRegExpr"/>
+ <UnitName Value="fpg_textedit"/>
</Unit16>
<Unit17>
- <Filename Value="fpg_textedit.pas"/>
+ <Filename Value="frm_find.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="fpg_textedit"/>
</Unit17>
<Unit18>
- <Filename Value="frm_find.pas"/>
+ <Filename Value="sha1.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="frm_find"/>
+ <UnitName Value="Sha1"/>
</Unit18>
<Unit19>
- <Filename Value="sha1.pas"/>
+ <Filename Value="mPasLex.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="Sha1"/>
+ <UnitName Value="mPasLex"/>
</Unit19>
</Units>
</ProjectOptions>
@@ -162,11 +153,7 @@
</Optimizations>
</CodeGeneration>
<Other>
- <CompilerMessages>
- <UseMsgFile Value="True"/>
- </CompilerMessages>
<CustomOptions Value="-dDEBUGSVRx"/>
- <CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</CONFIG>
diff --git a/examples/apps/ide/src/maximus.lpr b/examples/apps/ide/src/maximus.lpr
index cf9c439f..13a2047e 100644
--- a/examples/apps/ide/src/maximus.lpr
+++ b/examples/apps/ide/src/maximus.lpr
@@ -39,7 +39,6 @@ uses
ideimages,
stringhelpers,
frm_procedurelist,
- mPasLex,
filemonitor,
SynRegExpr,
fpg_textedit,
diff --git a/examples/apps/ide/src/unitlist.pas b/examples/apps/ide/src/unitlist.pas
index 827326e7..e6c09a69 100644
--- a/examples/apps/ide/src/unitlist.pas
+++ b/examples/apps/ide/src/unitlist.pas
@@ -1,7 +1,7 @@
{
fpGUI IDE - Maximus
- Copyright (C) 2012 - 2013 Graeme Geldenhuys
+ Copyright (C) 2012 - 2014 Graeme Geldenhuys
See the file COPYING.modifiedLGPL, included in this distribution,
for details about redistributing fpGUI.
@@ -31,6 +31,7 @@ type
function GetUnitName: TfpgString;
public
constructor Create;
+ function GetRelativePath: TfpgString;
property FileName: TfpgString read FFilename write FFilename;
property UnitName: TfpgString read GetUnitName;
property Opened: Boolean read FOpened write FOpened;
@@ -48,6 +49,8 @@ type
function Count: integer;
function FindByName(const AUnitName: TfpgString): TUnit;
function FileExists(const AFilename: TfpgString): Boolean;
+ function AddFileName(const AFilename: TfpgString): TUnit;
+ function Remove(AUnit: TUnit): integer;
procedure Add(NewUnit: TUnit);
procedure Clear;
procedure Delete(AIndex: integer);
@@ -58,7 +61,8 @@ type
implementation
uses
- fpg_utils;
+ fpg_utils,
+ project;
{ TUnitList }
@@ -128,6 +132,25 @@ begin
end;
end;
+function TUnitList.AddFileName(const AFilename: TfpgString): TUnit;
+var
+ u: TUnit;
+begin
+ if not FileExists(AFilename) then
+ begin
+ u := TUnit.Create;
+ u.FileName := AFilename;
+ u.Opened := True;
+ Add(u);
+ Result := u;
+ end;
+end;
+
+function TUnitList.Remove(AUnit: TUnit): integer;
+begin
+ Result := FList.Remove(AUnit);
+end;
+
procedure TUnitList.Add(NewUnit: TUnit);
var
l: Integer;
@@ -176,6 +199,11 @@ begin
Result := fpgExtractFileName(Filename);
end;
+function TUnit.GetRelativePath: TfpgString;
+begin
+ Result := fpgExtractRelativepath(GProject.ProjectDir, FileName);
+end;
+
constructor TUnit.Create;
begin
inherited Create;
diff --git a/examples/apps/nanoedit/mainfrm.pas b/examples/apps/nanoedit/mainfrm.pas
index 93f8f8a6..f652e179 100644
--- a/examples/apps/nanoedit/mainfrm.pas
+++ b/examples/apps/nanoedit/mainfrm.pas
@@ -80,7 +80,7 @@ begin
try
if dlg.RunOpenFile then
begin
- memEditor.Lines.LoadFromFile(dlg.FileName);
+ memEditor.LoadFromFile(dlg.FileName);
FFileName := dlg.FileName;
UpdateStatus(FFileName);
end;
@@ -99,7 +99,7 @@ begin
dlg.FileName := FFilename;
if dlg.RunSaveFile then
begin
- memEditor.Lines.SaveToFile(dlg.FileName);
+ memEditor.SaveToFile(dlg.FileName);
UpdateStatus(Format('<%s> successfully saved.', [FFileName]));
end;
finally
diff --git a/examples/gui/alignment/aligntest.lpi b/examples/gui/alignment/aligntest.lpi
index 586b7b90..2062f69a 100644
--- a/examples/gui/alignment/aligntest.lpi
+++ b/examples/gui/alignment/aligntest.lpi
@@ -1,20 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -39,13 +40,21 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="aligntest"/>
+ </Target>
<SearchPaths>
- <IncludeFiles Value="../src/"/>
- <OtherUnitFiles Value="../src/"/>
+ <IncludeFiles Value="../src"/>
+ <OtherUnitFiles Value="../src"/>
+ <UnitOutputDirectory Value="units"/>
</SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/alignment_resize/alignment_resize.lpi b/examples/gui/alignment_resize/alignment_resize.lpi
index e22fcc29..4bf13dfd 100644
--- a/examples/gui/alignment_resize/alignment_resize.lpi
+++ b/examples/gui/alignment_resize/alignment_resize.lpi
@@ -1,21 +1,22 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
<Title Value="alignment_resize"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -43,9 +44,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="alignment_resize"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/animation/anim_test.lpi b/examples/gui/animation/anim_test.lpi
index 16a03599..4db5823a 100644
--- a/examples/gui/animation/anim_test.lpi
+++ b/examples/gui/animation/anim_test.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=".elf"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -40,9 +42,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="anim_test"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/bevel/beveltest.lpi b/examples/gui/bevel/beveltest.lpi
index 2486d074..36486204 100644
--- a/examples/gui/bevel/beveltest.lpi
+++ b/examples/gui/bevel/beveltest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -39,9 +41,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="beveltest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/calendar/calendartest.lpi b/examples/gui/calendar/calendartest.lpi
index 20afc9c1..ccc474ab 100644
--- a/examples/gui/calendar/calendartest.lpi
+++ b/examples/gui/calendar/calendartest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -39,14 +41,20 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="calendartest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<CStyleOperator Value="False"/>
+ <UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/colorlistbox/colorlistboxtest.lpi b/examples/gui/colorlistbox/colorlistboxtest.lpi
index b74ec22a..04703732 100644
--- a/examples/gui/colorlistbox/colorlistboxtest.lpi
+++ b/examples/gui/colorlistbox/colorlistboxtest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,12 +9,14 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
<Title Value="colorlistboxtest"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -46,12 +48,22 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="colorlistboxtest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Linking>
<LinkSmart Value="True"/>
</Linking>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/colorwheel/colorwheel_test.lpi b/examples/gui/colorwheel/colorwheel_test.lpi
index 41da8416..a0be0fc2 100644
--- a/examples/gui/colorwheel/colorwheel_test.lpi
+++ b/examples/gui/colorwheel/colorwheel_test.lpi
@@ -1,20 +1,22 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
<Title Value="colorwheel_test"/>
<UseAppBundle Value="False"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -36,7 +38,6 @@
<Unit0>
<Filename Value="colorwheel_test.lpr"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="colorwheel_test"/>
</Unit0>
<Unit1>
<Filename Value="frm_main.pas"/>
@@ -46,20 +47,21 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="colorwheel_test"/>
+ </Target>
<SearchPaths>
- <IncludeFiles Value="$(ProjOutDir)/"/>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ <UnitOutputDirectory Value="units"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<CStyleOperator Value="False"/>
<AllowLabel Value="False"/>
<CPPInline Value="False"/>
+ <UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
- <Other>
- <CustomOptions Value="-FUunits"/>
- <CompilerPath Value="$(CompPath)"/>
- </Other>
</CompilerOptions>
</CONFIG>
diff --git a/examples/gui/colorwheel/frm_main.pas b/examples/gui/colorwheel/frm_main.pas
index 63518360..612ea6c1 100644
--- a/examples/gui/colorwheel/frm_main.pas
+++ b/examples/gui/colorwheel/frm_main.pas
@@ -8,10 +8,34 @@ uses
SysUtils, Classes, fpg_base, fpg_main, fpg_widget,
fpg_edit, fpg_form, fpg_label, fpg_button,
fpg_dialogs, fpg_menu, fpg_checkbox,
- fpg_panel, fpg_ColorWheel;
+ fpg_panel, fpg_ColorWheel, fpg_spinedit;
type
+ TColorPickedEvent = procedure(Sender: TObject; const AMousePos: TPoint; const AColor: TfpgColor) of object;
+
+
+ TPickerButton = class(TfpgButton)
+ private
+ FContinuousResults: Boolean;
+ FOnColorPicked: TColorPickedEvent;
+ FColorPos: TPoint;
+ FColor: TfpgColor;
+ FColorPicking: Boolean;
+ private
+ procedure DoColorPicked;
+ protected
+ procedure HandleLMouseDown(X, Y: integer; ShiftState: TShiftState); override;
+ procedure HandleLMouseUp(x, y: integer; shiftstate: TShiftState); override;
+ procedure HandleMouseMove(x, y: integer; btnstate: word; shiftstate: TShiftState); override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ published
+ property ContinuousResults: Boolean read FContinuousResults write FContinuousResults;
+ property OnColorPicked: TColorPickedEvent read FOnColorPicked write FOnColorPicked;
+ end;
+
+
TMainForm = class(TfpgForm)
private
{@VFD_HEAD_BEGIN: MainForm}
@@ -28,36 +52,134 @@ type
Label4: TfpgLabel;
Label5: TfpgLabel;
Label6: TfpgLabel;
- edR: TfpgEdit;
- edG: TfpgEdit;
- edB: TfpgEdit;
+ edR: TfpgSpinEdit;
+ edG: TfpgSpinEdit;
+ edB: TfpgSpinEdit;
+ lblHex: TfpgLabel;
Label7: TfpgLabel;
Label8: TfpgLabel;
Bevel2: TfpgBevel;
Label9: TfpgLabel;
chkCrossHair: TfpgCheckBox;
chkBGColor: TfpgCheckBox;
+ btnPicker: TPickerButton;
+ chkContinuous: TfpgCheckBox;
{@VFD_HEAD_END: MainForm}
FViaRGB: Boolean; // to prevent recursive changes
- procedure btnQuitClicked(Sender: TObject);
- procedure chkCrossHairChange(Sender: TObject);
- procedure chkBGColorChange(Sender: TObject);
- procedure UpdateHSVComponents;
- procedure UpdateRGBComponents;
- procedure ColorChanged(Sender: TObject);
- procedure RGBChanged(Sender: TObject);
+ FColorPicking: Boolean;
+ procedure btnColorPicked(Sender: TObject; const AMousePos: TPoint; const AColor: TfpgColor);
+ procedure chkContinuousChanged(Sender: TObject);
+ procedure btnQuitClicked(Sender: TObject);
+ procedure chkCrossHairChange(Sender: TObject);
+ procedure chkBGColorChange(Sender: TObject);
+ procedure UpdateHSVComponents;
+ procedure UpdateRGBComponents;
+ procedure ColorChanged(Sender: TObject);
+ procedure RGBChanged(Sender: TObject);
public
constructor Create(AOwner: TComponent); override;
- procedure AfterCreate; override;
+ procedure AfterCreate; override;
end;
{@VFD_NEWFORM_DECL}
implementation
-
{@VFD_NEWFORM_IMPL}
+function ConvertToHexa(Value: Integer): string;
+var
+ ValH,ValL: Integer;
+begin
+ValH:= Value div 16;
+ValL:= Value mod 16;
+case ValH of
+ 15:
+ Result:= 'F';
+ 14:
+ Result:= 'E';
+ 13:
+ Result:= 'D';
+ 12:
+ Result:= 'C';
+ 11:
+ Result:= 'B';
+ 10:
+ Result:= 'A';
+ else
+ Result:= IntToStr(ValH);
+ end;
+case ValL of
+ 15:
+ Result:= Result+'F';
+ 14:
+ Result:= Result+'E';
+ 13:
+ Result:= Result+'D';
+ 12:
+ Result:= Result+'C';
+ 11:
+ Result:= Result+'B';
+ 10:
+ Result:= Result+'A';
+ else
+ Result:= Result+IntToStr(ValL);
+ end;
+end;
+
+function Hexa(Red,Green,Blue: Integer): string;
+begin
+Result:= '$'+ConvertToHexa(Red)+ConvertToHexa(Green)+ConvertToHexa(Blue);
+end;
+
+{ TPickerButton }
+
+procedure TPickerButton.DoColorPicked;
+var
+ pt: TPoint;
+begin
+ pt := WindowToScreen(self, FColorPos);
+ FColor := fpgApplication.GetScreenPixelColor(pt);
+ if Assigned(FOnColorPicked) then
+ FOnColorPicked(self, FColorPos, FColor);
+end;
+
+procedure TPickerButton.HandleLMouseDown(X, Y: integer; ShiftState: TShiftState);
+begin
+ inherited HandleLMouseDown(X, Y, ShiftState);
+ MouseCursor := mcCross;
+ FColorPicking := True;
+ CaptureMouse;
+end;
+
+procedure TPickerButton.HandleLMouseUp(x, y: integer; shiftstate: TShiftState);
+begin
+ inherited HandleLMouseUp(x, y, shiftstate);
+ ReleaseMouse;
+ FColorPicking := False;
+ MouseCursor := mcDefault;
+ DoColorPicked;
+end;
+
+procedure TPickerButton.HandleMouseMove(x, y: integer; btnstate: word;
+ shiftstate: TShiftState);
+begin
+ //inherited HandleMouseMove(x, y, btnstate, shiftstate);
+ if not FColorPicking then
+ Exit;
+ FColorPos.x := x;
+ FColorPos.y := y;
+ if FContinuousResults then
+ DoColorPicked;
+end;
+
+constructor TPickerButton.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FColorPicking := False;
+ FContinuousResults := False;
+end;
+
procedure TMainForm.ColorChanged(Sender: TObject);
begin
UpdateHSVComponents;
@@ -67,22 +189,34 @@ end;
procedure TMainForm.RGBChanged(Sender: TObject);
var
- rgb: TFPColor;
+ rgb: TRGBTriple;
c: TfpgColor;
begin
FViaRGB := True; // revent recursive updates
- rgb.Red := StrToInt(edR.Text);
- rgb.Green := StrToInt(edG.Text);
- rgb.Blue := StrToInt(edB.Text);
- c := FPColorTofpgColor(rgb);
+ rgb.Red := edR.Value;
+ rgb.Green := edG.Value;
+ rgb.Blue := edB.Value;
+ c := RGBTripleTofpgColor(rgb);
ColorWheel1.SetSelectedColor(c); // This will trigger ColorWheel and ValueBar OnChange event
FViaRGB := False;
+ lblHex.Text:= 'Hex = '+ Hexa(rgb.Red,rgb.Green,rgb.Blue);
end;
constructor TMainForm.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FViaRGB := False;
+ FColorPicking := False;
+end;
+
+procedure TMainForm.btnColorPicked(Sender: TObject; const AMousePos: TPoint; const AColor: TfpgColor);
+begin
+ ColorWheel1.SetSelectedColor(AColor);
+end;
+
+procedure TMainForm.chkContinuousChanged(Sender: TObject);
+begin
+ btnPicker.ContinuousResults := chkContinuous.Checked;
end;
procedure TMainForm.btnQuitClicked(Sender: TObject);
@@ -122,14 +256,15 @@ end;
procedure TMainForm.UpdateRGBComponents;
var
- rgb: TFPColor;
+ rgb: TRGBTriple;
c: TfpgColor;
begin
c := ValueBar1.SelectedColor;
- rgb := fpgColorToFPColor(c);
- edR.Text := IntToStr(rgb.Red);
- edG.Text := IntToStr(rgb.Green);
- edB.Text := IntToStr(rgb.Blue);
+ rgb := fpgColorToRGBTriple(c);
+ edR.Value := rgb.Red;
+ edG.Value := rgb.Green;
+ edB.Value := rgb.Blue;
+ lblHex.Text:= 'Hex = '+ Hexa(rgb.Red,rgb.Green,rgb.Blue);
end;
procedure TMainForm.AfterCreate;
@@ -138,6 +273,7 @@ begin
Name := 'MainForm';
SetPosition(349, 242, 537, 411);
WindowTitle := 'ColorWheel test app';
+ Hint := '';
WindowPosition := wpUser;
Button1 := TfpgButton.Create(self);
@@ -166,6 +302,7 @@ begin
begin
Name := 'ValueBar1';
SetPosition(304, 20, 52, 244);
+ Value := 1;
OnChange := @ColorChanged;
end;
@@ -174,6 +311,7 @@ begin
begin
Name := 'Bevel1';
SetPosition(20, 288, 76, 56);
+ Hint := '';
end;
Label1 := TfpgLabel.Create(self);
@@ -275,39 +413,55 @@ begin
Text := 'Blue';
end;
- edR := TfpgEdit.Create(self);
+ edR := TfpgSpinEdit.Create(self);
with edR do
begin
Name := 'edR';
SetPosition(296, 280, 44, 26);
TabOrder := 13;
- Text := '255';
+ MinValue := 0;
+ MaxValue := 255;
+ Value := 255;
FontDesc := '#Edit1';
OnExit := @RGBChanged;
end;
- edG := TfpgEdit.Create(self);
+ edG := TfpgSpinEdit.Create(self);
with edG do
begin
Name := 'edG';
SetPosition(296, 308, 44, 26);
TabOrder := 14;
- Text := '255';
+ MinValue := 0;
+ MaxValue := 255;
+ Value := 255;
FontDesc := '#Edit1';
OnExit := @RGBChanged;
end;
- edB := TfpgEdit.Create(self);
+ edB := TfpgSpinEdit.Create(self);
with edB do
begin
Name := 'edB';
SetPosition(296, 336, 44, 26);
TabOrder := 15;
- Text := '255';
+ MinValue := 0;
+ MaxValue := 255;
+ Value := 255;
FontDesc := '#Edit1';
OnExit := @RGBChanged;
end;
+ lblHex := TfpgLabel.Create(self);
+ with lblHex do
+ begin
+ Name := 'lblHex';
+ SetPosition(380, 316, 120, 16);
+ FontDesc := '#Label2';
+ Hint := '';
+ Text := 'Hex = ';
+ end;
+
Label7 := TfpgLabel.Create(self);
with Label7 do
begin
@@ -333,6 +487,7 @@ begin
begin
Name := 'Bevel2';
SetPosition(388, 8, 2, 260);
+ Hint := '';
Style := bsLowered;
end;
@@ -353,6 +508,7 @@ begin
Name := 'chkCrossHair';
SetPosition(396, 32, 128, 20);
FontDesc := '#Label1';
+ Hint := '';
TabOrder := 20;
Text := 'Large CrossHair';
OnChange := @chkCrossHairChange;
@@ -364,11 +520,37 @@ begin
Name := 'chkBGColor';
SetPosition(396, 56, 132, 20);
FontDesc := '#Label1';
+ Hint := '';
TabOrder := 21;
Text := 'New BG Color';
OnChange := @chkBGColorChange;
end;
+ btnPicker := TPickerButton.Create(self);
+ with btnPicker do
+ begin
+ Name := 'btnPicker';
+ SetPosition(116, 372, 80, 23);
+ Text := 'Picker';
+ FontDesc := '#Label1';
+ Hint := '';
+ ImageName := '';
+ TabOrder := 24;
+ OnColorPicked := @btnColorPicked;
+ end;
+
+ chkContinuous := TfpgCheckBox.Create(self);
+ with chkContinuous do
+ begin
+ Name := 'chkContinous';
+ SetPosition(205, 375, 90, 19);
+ FontDesc := '#Label1';
+ Hint := '';
+ TabOrder := 25;
+ Text := 'Continous';
+ OnChange := @chkContinuousChanged;
+ end;
+
{@VFD_BODY_END: MainForm}
// link the two components
@@ -376,6 +558,9 @@ begin
// ColorWheel1.BackgroundColor := clFuchsia;
// ValueBar1.BackgroundColor := clFuchsia;
// ColorWheel1.CursorSize := 400;
+ UpdateHSVComponents;
+ if not FViaRGB then
+ UpdateRGBComponents;
end;
diff --git a/examples/gui/combobox/comboboxtest.lpi b/examples/gui/combobox/comboboxtest.lpi
index 41f6ae73..2163619a 100644
--- a/examples/gui/combobox/comboboxtest.lpi
+++ b/examples/gui/combobox/comboboxtest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -50,13 +52,20 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="comboboxtest"/>
+ </Target>
<SearchPaths>
- <OtherUnitFiles Value="../common/"/>
+ <OtherUnitFiles Value="../common"/>
+ <UnitOutputDirectory Value="units"/>
</SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/combobox/frm_main.pas b/examples/gui/combobox/frm_main.pas
index e1a293df..6471963d 100644
--- a/examples/gui/combobox/frm_main.pas
+++ b/examples/gui/combobox/frm_main.pas
@@ -5,12 +5,18 @@ unit frm_main;
interface
uses
- SysUtils, Classes, fpg_base, fpg_main, fpg_edit,
- fpg_widget, fpg_form, fpg_label, fpg_button,
- fpg_listbox, fpg_memo, fpg_combobox, fpg_basegrid, fpg_grid,
- fpg_dialogs, fpg_checkbox, fpg_tree, fpg_trackbar,
- fpg_progressbar, fpg_radiobutton, fpg_tab, fpg_menu,
- fpg_panel, fpg_popupcalendar, fpg_gauge, fpg_editcombo;
+ SysUtils,
+ Classes,
+ fpg_base,
+ fpg_main,
+ fpg_form,
+ fpg_label,
+ fpg_button,
+ fpg_combobox,
+ fpg_checkbox,
+ fpg_radiobutton,
+ fpg_panel,
+ fpg_editcombo;
type
diff --git a/examples/gui/command_interface/test.lpi b/examples/gui/command_interface/test.lpi
index da19eca5..cf714b52 100644
--- a/examples/gui/command_interface/test.lpi
+++ b/examples/gui/command_interface/test.lpi
@@ -1,20 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -50,7 +51,18 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="command_interface_test"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
diff --git a/examples/gui/customstyles/customstyles.lpi b/examples/gui/customstyles/customstyles.lpi
index 50b2d740..36fef016 100644
--- a/examples/gui/customstyles/customstyles.lpi
+++ b/examples/gui/customstyles/customstyles.lpi
@@ -53,6 +53,12 @@
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
+ <Target>
+ <Filename Value="customstyles_test"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<CStyleOperator Value="False"/>
@@ -73,7 +79,6 @@
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/customstyles/mystyle.pas b/examples/gui/customstyles/mystyle.pas
index 665a22b0..8ca00d33 100644
--- a/examples/gui/customstyles/mystyle.pas
+++ b/examples/gui/customstyles/mystyle.pas
@@ -1,4 +1,4 @@
-{
+(*
A very quick and basic style implementation. It took all of 10 minutes.
To apply this style, follow these instructions:
@@ -31,7 +31,7 @@
end;
end;
-}
+*)
unit mystyle;
{$mode objfpc}{$H+}
diff --git a/examples/gui/customwindow/close.bmp b/examples/gui/customwindow/close.bmp
new file mode 100644
index 00000000..af6745a5
--- /dev/null
+++ b/examples/gui/customwindow/close.bmp
Binary files differ
diff --git a/examples/gui/customwindow/custom_window.lpi b/examples/gui/customwindow/custom_window.lpi
new file mode 100644
index 00000000..2059fa29
--- /dev/null
+++ b/examples/gui/customwindow/custom_window.lpi
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+ <ProjectOptions>
+ <Version Value="9"/>
+ <General>
+ <SessionStorage Value="InProjectDir"/>
+ <MainUnit Value="0"/>
+ <Title Value="custom_window"/>
+ <UseAppBundle Value="False"/>
+ <ResourceType Value="res"/>
+ </General>
+ <i18n>
+ <EnableI18N LFM="False"/>
+ </i18n>
+ <VersionInfo>
+ <StringTable ProductVersion=""/>
+ </VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="Default" Default="True"/>
+ </BuildModes>
+ <PublishOptions>
+ <Version Value="2"/>
+ </PublishOptions>
+ <RunParams>
+ <local>
+ <FormatVersion Value="1"/>
+ </local>
+ </RunParams>
+ <RequiredPackages Count="1">
+ <Item1>
+ <PackageName Value="fpgui_toolkit"/>
+ </Item1>
+ </RequiredPackages>
+ <Units Count="2">
+ <Unit0>
+ <Filename Value="custom_window.lpr"/>
+ <IsPartOfProject Value="True"/>
+ <UnitName Value="custom_window"/>
+ </Unit0>
+ <Unit1>
+ <Filename Value="images.inc"/>
+ <IsPartOfProject Value="True"/>
+ </Unit1>
+ </Units>
+ </ProjectOptions>
+ <CompilerOptions>
+ <Version Value="11"/>
+ <SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ </SearchPaths>
+ </CompilerOptions>
+ <Debugging>
+ <Exceptions Count="3">
+ <Item1>
+ <Name Value="EAbort"/>
+ </Item1>
+ <Item2>
+ <Name Value="ECodetoolError"/>
+ </Item2>
+ <Item3>
+ <Name Value="EFOpenError"/>
+ </Item3>
+ </Exceptions>
+ </Debugging>
+</CONFIG>
diff --git a/examples/gui/customwindow/custom_window.lpr b/examples/gui/customwindow/custom_window.lpr
new file mode 100644
index 00000000..eab06e5d
--- /dev/null
+++ b/examples/gui/customwindow/custom_window.lpr
@@ -0,0 +1,352 @@
+{ This was a very quick and dirty demo to show how custom windows with your
+ own style of borders (eg: like Chrome or elementryOS) can be implement.
+ There is obviously lots of scope for improving this code and creating
+ custom widgets to make better use of code reuse and abstraction. }
+program custom_window;
+
+{$mode objfpc}{$H+}
+
+uses
+ {$IFDEF UNIX}{$IFDEF UseCThreads}
+ cthreads,
+ {$ENDIF}{$ENDIF}
+ Classes, SysUtils,
+ fpg_base, fpg_main, fpg_form, fpg_button,
+ fpg_stylemanager, fpg_cmdlineparams, fpg_grid,
+ fpg_StringGridBuilder, fpg_editbtn, fpg_checkbox,
+ fpg_panel, fpg_dialogs;
+
+type
+
+ TMainForm = class(TfpgForm)
+ procedure ResizeClicked(Sender: TObject);
+ private
+ {@VFD_HEAD_BEGIN: MainForm}
+ btnQuit: TfpgButton;
+ Grid1: TfpgStringGrid;
+ FilenameEdit1: TfpgFileNameEdit;
+ btnGo: TfpgButton;
+ CheckBox1: TfpgCheckBox;
+ bvlTitle: TfpgBevel;
+ btnClose: TfpgImagePanel;
+ btnResize: TfpgImagePanel;
+ bvlTasks: TfpgBevel;
+ {@VFD_HEAD_END: MainForm}
+ FLastPos: TPoint;
+ FMouseTracked: Boolean;
+ procedure TitleMouseDown(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint);
+ procedure TitleMouseUp(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint);
+ procedure TitleMouseMoved(Sender: TObject; AShift: TShiftState; const AMousePos: TPoint);
+ procedure btnCloseClicked(Sender: TObject);
+ procedure PaintTasksPanel(Sender: TObject);
+ procedure PaintTitle(Sender: TObject);
+ procedure FormPaint(Sender: TObject);
+ procedure btnQuitClicked(Sender: TObject);
+ procedure btnGoClicked(Sender: TObject);
+ public
+ constructor Create(AOwner: TComponent); override;
+ procedure AfterCreate; override;
+ end;
+
+{@VFD_NEWFORM_DECL}
+
+const
+ cBackground = TfpgColor($FFf5f5f5);
+ cGradientTop = TfpgColor($FFe5e5e5);
+ cGradientBottom = TfpgColor($FFbcbcbc);
+ cBorder = TfpgColor($FF7c7c7c);
+ cGrayPanel = TfpgColor($FFdedede);
+
+ { tip: probably best to use specific fonts for specific OSes }
+ cHeader1 = 'Arial-11:bold:antialias=true';
+ cHeader2 = 'Arial-10:antialias=true';
+
+{$I images.inc}
+
+{@VFD_NEWFORM_IMPL}
+
+procedure TMainForm.ResizeClicked(Sender: TObject);
+begin
+ ShowMessage('I''ll leave this one up to you to implement and experiment with. ;-)', 'Hint');
+end;
+
+procedure TMainForm.TitleMouseDown(Sender: TObject; AButton: TMouseButton;
+ AShift: TShiftState; const AMousePos: TPoint);
+begin
+ FMouseTracked := True;
+ FLastPos := bvlTitle.WindowToScreen(self, AMousePos);
+ bvlTitle.CaptureMouse;
+end;
+
+procedure TMainForm.TitleMouseUp(Sender: TObject; AButton: TMouseButton;
+ AShift: TShiftState; const AMousePos: TPoint);
+begin
+ FMouseTracked := False;
+ bvlTitle.ReleaseMouse;
+end;
+
+procedure TMainForm.TitleMouseMoved(Sender: TObject; AShift: TShiftState;
+ const AMousePos: TPoint);
+var
+ dx, dy: integer;
+ pt: TPoint;
+begin
+ pt := WindowToScreen(self, AMousePos);
+ if not FMouseTracked then
+ begin
+ FLastPos := pt;
+ Exit;
+ end;
+
+ dx := pt.X - FLastPos.X;
+ dy := pt.Y - FLastPos.Y;
+ Left := Left + dx;
+ Top := Top + dy;
+ FLastPos := pt;
+ UpdateWindowPosition;
+end;
+
+procedure TMainForm.btnCloseClicked(Sender: TObject);
+begin
+ btnQuit.Click;
+end;
+
+procedure TMainForm.PaintTasksPanel(Sender: TObject);
+begin
+ with bvlTasks do
+ begin
+ Canvas.Clear(cGrayPanel);
+
+ Canvas.Color := cBorder;
+ Canvas.DrawRectangle(0, 0, Width, Height);
+
+ Canvas.TextColor := cBorder;
+ // Output some sample text
+ Canvas.Font := fpgGetFont(cHeader1);
+ Canvas.DrawText(8, 10, 'Personal');
+ Canvas.Font := fpgGetFont(cHeader2);
+ Canvas.DrawText(20, 30, 'Home');
+ Canvas.DrawText(20, 50, 'Documents');
+ Canvas.DrawText(20, 70, 'Music');
+ Canvas.DrawText(20, 90, 'Pictures');
+ Canvas.Font := fpgGetFont(cHeader1);
+ Canvas.DrawText(8, 110, 'Network');
+ Canvas.Font := fpgGetFont(cHeader2);
+ Canvas.DrawText(20, 130, 'Entire network');
+ end;
+end;
+
+procedure TMainForm.PaintTitle(Sender: TObject);
+var
+ r: TfpgRect;
+begin
+ r.SetRect(0, 1, Width, 46);
+ with bvlTitle do
+ begin
+ Canvas.GradientFill(r, cGradientTop, cGradientBottom, gdVertical);
+
+ Canvas.Color := TfpgColor($FFc9c9c9);
+ Canvas.DrawLine(0, Height-2, Width, Height-2);
+
+ Canvas.Color := cBorder;
+ Canvas.DrawRectangle(0, 0, Width, Height);
+
+ Canvas.TextColor := cBorder;
+ Canvas.Font := fpgGetFont(cHeader1);
+ Canvas.DrawText(30, 8, Width-60, 20, WindowTitle, [txtHCenter, txtTop]);
+ end;
+end;
+
+procedure TMainForm.FormPaint(Sender: TObject);
+begin
+ Canvas.Color := cBorder;
+ Canvas.DrawRectangle(0, 0, Width, Height);
+end;
+
+procedure TMainForm.btnQuitClicked(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TMainForm.btnGoClicked(Sender: TObject);
+var
+ sgb: TStringGridBuilder;
+begin
+ try
+ sgb := TStringGridBuilder.CreateCustom(Grid1, FilenameEdit1.FileName, CheckBox1.Checked);
+ sgb.Run;
+ finally
+ sgb.Free;
+ end;
+end;
+
+constructor TMainForm.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ Include(FWindowAttributes, waBorderLess); // borderless and steals focus like a normal form
+ FMouseTracked := False;
+
+ fpgSetNamedColor(clWindowBackground, cBackground);
+
+ fpgImages.AddBMP( // 8x9 pixels.
+ 'my.close',
+ @img_close,
+ sizeof(img_close));
+
+ fpgImages.AddBMP( // 10x11 pixels.
+ 'my.resize',
+ @img_resize,
+ sizeof(img_resize));
+end;
+
+procedure TMainForm.AfterCreate;
+begin
+ {%region 'Auto-generated GUI code' -fold}
+ {@VFD_BODY_BEGIN: MainForm}
+ Name := 'MainForm';
+ SetPosition(464, 271, 866, 473);
+ WindowTitle := 'fpGUI Custom Window Demo';
+ Hint := '';
+ OnPaint := @FormPaint;
+
+ btnQuit := TfpgButton.Create(self);
+ with btnQuit do
+ begin
+ Name := 'btnQuit';
+ SetPosition(772, 436, 80, 23);
+ Text := 'Quit';
+ FontDesc := '#Label1';
+ Hint := '';
+ ImageName := '';
+ TabOrder := 1;
+ OnClick := @btnQuitClicked;
+ end;
+
+ Grid1 := TfpgStringGrid.Create(self);
+ with Grid1 do
+ begin
+ Name := 'Grid1';
+ SetPosition(182, 120, 666, 276);
+ BackgroundColor := TfpgColor($80000002);
+ FontDesc := '#Grid';
+ HeaderFontDesc := '#GridHeader';
+ Hint := '';
+ RowCount := 0;
+ RowSelect := False;
+ TabOrder := 2;
+ end;
+
+ FilenameEdit1 := TfpgFileNameEdit.Create(self);
+ with FilenameEdit1 do
+ begin
+ Name := 'FilenameEdit1';
+ SetPosition(182, 92, 510, 24);
+ ExtraHint := '';
+ FileName := '';
+ Filter := 'CSV Files (*.csv)|*.csv';
+ InitialDir := '';
+ TabOrder := 3;
+ end;
+
+ btnGo := TfpgButton.Create(self);
+ with btnGo do
+ begin
+ Name := 'btnGo';
+ SetPosition(768, 92, 80, 23);
+ Text := 'GO';
+ FontDesc := '#Label1';
+ Hint := '';
+ ImageName := '';
+ TabOrder := 4;
+ OnClick := @btnGoClicked;
+ end;
+
+ CheckBox1 := TfpgCheckBox.Create(self);
+ with CheckBox1 do
+ begin
+ Name := 'CheckBox1';
+ SetPosition(184, 68, 120, 19);
+ FontDesc := '#Label1';
+ Hint := '';
+ TabOrder := 5;
+ Text := 'Has Header';
+ end;
+
+ bvlTitle := TfpgBevel.Create(self);
+ with bvlTitle do
+ begin
+ Name := 'bvlTitle';
+ SetPosition(0, 0, 866, 48);
+ Anchors := [anLeft,anRight,anTop];
+ Hint := '';
+ Shape := bsSpacer;
+ OnPaint := @PaintTitle;
+ OnMouseMove := @TitleMouseMoved;
+ OnMouseDown := @TitleMouseDown;
+ OnMouseUp := @TitleMouseUp;
+ end;
+
+ btnClose := TfpgImagePanel.Create(bvlTitle);
+ with btnClose do
+ begin
+ Name := 'btnClose';
+ SetPosition(9, 8, 8, 9);
+ OwnsImage := False;
+ OnClick := @btnCloseClicked;
+ end;
+
+ btnResize := TfpgImagePanel.Create(bvlTitle);
+ with btnResize do
+ begin
+ Name := 'btnResize';
+ SetPosition(849, 8, 10, 11);
+ OwnsImage := False;
+ OnClick := @ResizeClicked;
+ end;
+
+ bvlTasks := TfpgBevel.Create(self);
+ with bvlTasks do
+ begin
+ Name := 'bvlTasks';
+ SetPosition(0, 47, 170, 426);
+ Anchors := [anLeft,anTop,anBottom];
+ Hint := '';
+ Shape := bsSpacer;
+ OnPaint := @PaintTasksPanel;
+ end;
+
+ {@VFD_BODY_END: MainForm}
+ {%endregion}
+
+ btnClose.Image := fpgImages.GetImage('my.close');
+ btnResize.Image := fpgImages.GetImage('my.resize');
+end;
+
+
+procedure MainProc;
+var
+ frm: TMainForm;
+begin
+ fpgApplication.Initialize;
+
+ { Set our new style as the default (before we create any forms), unless
+ a the end-user specified a different style via the command line. }
+ if not gCommandLineParams.IsParam('style') then
+ begin
+ if fpgStyleManager.SetStyle('Plastic Light Gray') then
+ fpgStyle := fpgStyleManager.Style;
+ end;
+
+ frm := TMainForm.Create(nil);
+ try
+ frm.Show;
+ fpgApplication.Run;
+ finally
+ frm.Free;
+ end;
+end;
+
+begin
+ MainProc;
+end.
+
diff --git a/examples/gui/customwindow/extrafpc.cfg b/examples/gui/customwindow/extrafpc.cfg
new file mode 100644
index 00000000..89eafa99
--- /dev/null
+++ b/examples/gui/customwindow/extrafpc.cfg
@@ -0,0 +1,10 @@
+-FUunits
+-Fu../../../lib/$fpctarget
+-Fu../common/
+-Xs
+-XX
+-CX
+#ifdef mswindows
+-WG
+#endif
+
diff --git a/examples/gui/customwindow/images.inc b/examples/gui/customwindow/images.inc
new file mode 100644
index 00000000..79663a24
--- /dev/null
+++ b/examples/gui/customwindow/images.inc
@@ -0,0 +1,57 @@
+
+const
+ img_close: array[0..337] of byte = (
+ 66, 77, 82, 1, 0, 0, 0, 0, 0, 0,122, 0, 0, 0,108, 0, 0,
+ 0, 8, 0, 0, 0, 9, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 216, 0, 0, 0,196, 14, 0, 0,196, 14, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 66, 71, 82,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,226,226,226,238,238,238,225,225,225,223,223,223,223,223,
+ 223,226,226,226,238,238,238,226,226,226,228,228,228,184,184,184,231,
+ 231,231,226,226,226,226,226,226,230,230,230,184,184,184,228,228,228,
+ 172,172,172,160,160,160,173,173,173,231,231,231,231,231,231,173,173,
+ 173,160,160,160,172,172,172,216,216,216,159,159,159,153,153,153,170,
+ 170,170,168,168,168,153,153,153,157,157,157,215,215,215,225,225,225,
+ 219,219,219,165,165,165,149,149,149,149,149,149,162,162,162,218,218,
+ 218,225,225,225,227,227,227,229,229,229,158,158,158,141,141,141,142,
+ 142,142,163,163,163,232,232,232,227,227,227,227,227,227,152,152,152,
+ 136,136,136,146,146,146,144,144,144,136,136,136,154,154,154,228,228,
+ 228,149,149,149,128,128,128,140,140,140,217,217,217,215,215,215,138,
+ 138,138,128,128,128,150,150,150,213,213,213,147,147,147,214,214,214,
+ 226,226,226,226,226,226,214,214,214,146,146,146,213,213,213);
+
+
+const
+ img_resize: array[0..473] of byte = (
+ 66, 77,218, 1, 0, 0, 0, 0, 0, 0,122, 0, 0, 0,108, 0, 0,
+ 0, 10, 0, 0, 0, 11, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 96, 1, 0, 0,196, 14, 0, 0,196, 14, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 66, 71, 82,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,242,242,242,242,242,242,242,242,242,242,242,242,233,233,
+ 233,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223, 0,
+ 0,167,167,167,167,167,167,167,167,167,162,162,162,189,189,189,223,
+ 223,223,223,223,223,223,223,223,223,223,223,223,223,223, 0, 0,157,
+ 157,157,157,157,157,157,157,157,193,193,193,226,226,226,224,224,224,
+ 224,224,224,224,224,224,224,224,224,224,224,224, 0, 0,146,146,146,
+ 141,141,141,144,144,144,164,164,164,229,229,229,224,224,224,224,224,
+ 224,224,224,224,224,224,224,224,224,224, 0, 0,131,131,131,175,175,
+ 175,146,146,146,133,133,133,153,153,153,224,224,224,224,224,224,224,
+ 224,224,224,224,224,224,224,224, 0, 0,174,174,174,225,225,225,215,
+ 215,215,146,146,146,208,208,208,228,228,228,239,239,239,227,227,227,
+ 225,225,225,235,235,235, 0, 0,225,225,225,225,225,225,225,225,225,
+ 225,225,225,225,225,225,225,225,225,183,183,183,232,232,232,235,235,
+ 235,201,201,201, 0, 0,226,226,226,226,226,226,226,226,226,226,226,
+ 226,226,226,226,167,167,167,153,153,153,167,167,167,193,193,193,154,
+ 154,154, 0, 0,226,226,226,226,226,226,226,226,226,226,226,226,226,
+ 226,226,215,215,215,152,152,152,144,144,144,144,144,144,144,144,144,
+ 0, 0,226,226,226,226,226,226,226,226,226,226,226,226,226,226,226,
+ 235,235,235,184,184,184,134,134,134,134,134,134,134,134,134, 0, 0,
+ 227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,168,168,
+ 168,115,115,115,115,115,115,115,115,115,115,115,115, 0, 0);
+
+
diff --git a/examples/gui/customwindow/resize.bmp b/examples/gui/customwindow/resize.bmp
new file mode 100644
index 00000000..8bb264cf
--- /dev/null
+++ b/examples/gui/customwindow/resize.bmp
Binary files differ
diff --git a/examples/gui/customwindow/units/.gitignore b/examples/gui/customwindow/units/.gitignore
new file mode 100644
index 00000000..72e8ffc0
--- /dev/null
+++ b/examples/gui/customwindow/units/.gitignore
@@ -0,0 +1 @@
+*
diff --git a/examples/gui/dbtest/dbtest.lpi b/examples/gui/dbtest/dbtest.lpi
index a7c9efb9..b9934e9e 100644
--- a/examples/gui/dbtest/dbtest.lpi
+++ b/examples/gui/dbtest/dbtest.lpi
@@ -1,22 +1,23 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -47,16 +48,21 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="dbtest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<AllowLabel Value="False"/>
<CPPInline Value="False"/>
+ <UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/drag_n_drop/dndexample.lpi b/examples/gui/drag_n_drop/dndexample.lpi
index 758b5887..8c0df33d 100644
--- a/examples/gui/drag_n_drop/dndexample.lpi
+++ b/examples/gui/drag_n_drop/dndexample.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@@ -46,7 +46,7 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="9"/>
+ <Version Value="11"/>
<Target>
<Filename Value="dndexample"/>
</Target>
diff --git a/examples/gui/drag_n_drop/dndexample.lpr b/examples/gui/drag_n_drop/dndexample.lpr
index 13dda563..46c5a1f6 100644
--- a/examples/gui/drag_n_drop/dndexample.lpr
+++ b/examples/gui/drag_n_drop/dndexample.lpr
@@ -64,6 +64,7 @@ procedure TMainForm.Edit1DragEnter(Sender, Source: TObject;
var
s: string;
begin
+ ShowMimeList(AMimeList);
s := 'text/plain';
if chkAccept.Checked then
Accept := False
@@ -73,7 +74,6 @@ begin
begin
if AMimeChoice <> s then
AMimeChoice := s;
- ShowMimeList(AMimeList);
end;
end;
@@ -81,9 +81,9 @@ procedure TMainForm.Bevel1DragEnter(Sender, Source: TObject;
AMimeList: TStringList; var AMimeChoice: TfpgString;
var ADropAction: TfpgDropAction; var Accept: Boolean);
var
- i: integer;
s: string;
begin
+ ShowMimeList(AMimeList);
{ the mime type we want to accept }
s := 'text/html';
{ if we wil accept the drop, set Accept to True }
@@ -94,7 +94,6 @@ begin
if AMimeChoice <> s then
AMimeChoice := s;
- ShowMimeList(AMimeList);
Bevel1.BackgroundColor := clRed;
end;
end;
@@ -108,7 +107,6 @@ procedure TMainForm.PanelDragDrop(Sender, Source: TObject; X, Y: integer;
AData: Variant);
var
s: string;
- v: variant;
begin
s := AData;
Bevel1.Text := Format('Drop event at (%d,%d) with value(s):'+LineEnding+'%s', [X, Y, s]);
@@ -123,13 +121,14 @@ end;
procedure TMainForm.btnClearClicked(Sender: TObject);
begin
Grid1.RowCount := 0;
+ Edit1.Text := '';
+ Bevel1.Text := '';
end;
procedure TMainForm.LabelDragStartDetected(Sender: TObject);
var
m: TfpgMimeData;
d: TfpgDrag;
- v: variant;
begin
m := TfpgMimeData.Create;
diff --git a/examples/gui/edits/edittest.lpi b/examples/gui/edits/edittest.lpi
index f10feccd..be69faf9 100644
--- a/examples/gui/edits/edittest.lpi
+++ b/examples/gui/edits/edittest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -40,9 +42,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="edittest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/embedded_form/demo1.lpi b/examples/gui/embedded_form/demo1.lpi
index f6200396..de9bb9a3 100644
--- a/examples/gui/embedded_form/demo1.lpi
+++ b/examples/gui/embedded_form/demo1.lpi
@@ -1,19 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
<UseAppBundle Value="False"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -50,12 +52,20 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="embedded_form_test"/>
+ </Target>
<SearchPaths>
- <IncludeFiles Value="$(ProjOutDir)/"/>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ <UnitOutputDirectory Value="units"/>
</SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/embedded_form/frm_main.pas b/examples/gui/embedded_form/frm_main.pas
index 785247c9..e2fb0f0e 100644
--- a/examples/gui/embedded_form/frm_main.pas
+++ b/examples/gui/embedded_form/frm_main.pas
@@ -56,6 +56,7 @@ var
var
j: integer;
begin
+ Result := '';
if indent = 0 then
exit;
for j := 1 to indent do
diff --git a/examples/gui/filedialog/filedialog.lpi b/examples/gui/filedialog/filedialog.lpi
index 359ca76e..f6efbd83 100644
--- a/examples/gui/filedialog/filedialog.lpi
+++ b/examples/gui/filedialog/filedialog.lpi
@@ -41,6 +41,12 @@
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
+ <Target>
+ <Filename Value="filedialog"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
@@ -48,6 +54,7 @@
</Parsing>
<Other>
<CustomOptions Value="-FUunits"/>
+ <CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</CONFIG>
diff --git a/examples/gui/filedialog/filedialog.lpr b/examples/gui/filedialog/filedialog.lpr
index 7ea47bed..1294ac06 100644
--- a/examples/gui/filedialog/filedialog.lpr
+++ b/examples/gui/filedialog/filedialog.lpr
@@ -105,6 +105,7 @@ procedure TMainForm.btnUserInputClicked(Sender: TObject);
var
lAnswer: TfpgString;
begin
+ lAnswer := '';
if fpgInputQuery('Caption here', 'And the prompt goes here', lAnswer) then
ShowMessage(Format('User entered <%s>', [lAnswer]));
end;
diff --git a/examples/gui/filegrid/filegrid.lpi b/examples/gui/filegrid/filegrid.lpi
index 1fc73d24..74fb0d20 100644
--- a/examples/gui/filegrid/filegrid.lpi
+++ b/examples/gui/filegrid/filegrid.lpi
@@ -1,20 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -40,10 +41,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="filegrid"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/fontselect/fontselect.lpi b/examples/gui/fontselect/fontselect.lpi
index 74eb6b4d..a23797f7 100644
--- a/examples/gui/fontselect/fontselect.lpi
+++ b/examples/gui/fontselect/fontselect.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -39,10 +41,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="fontselect"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/gauges/gaugetest.lpi b/examples/gui/gauges/gaugetest.lpi
index 731e6f4d..899f99cd 100644
--- a/examples/gui/gauges/gaugetest.lpi
+++ b/examples/gui/gauges/gaugetest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=".exe"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -38,16 +40,21 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="gaugetest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<AllowLabel Value="False"/>
<CPPInline Value="False"/>
+ <UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/gridediting/gridediting.lpi b/examples/gui/gridediting/gridediting.lpi
index 13caff41..dba84086 100644
--- a/examples/gui/gridediting/gridediting.lpi
+++ b/examples/gui/gridediting/gridediting.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@@ -16,6 +16,9 @@
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -46,12 +49,18 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="9"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="gridediting"/>
+ </Target>
+ <SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Other>
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/gridtest/gridtest.lpi b/examples/gui/gridtest/gridtest.lpi
index a905d222..a02b0697 100644
--- a/examples/gui/gridtest/gridtest.lpi
+++ b/examples/gui/gridtest/gridtest.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
diff --git a/examples/gui/gridtest/gridtest.lpr b/examples/gui/gridtest/gridtest.lpr
index 4c2c0e16..4b53f260 100644
--- a/examples/gui/gridtest/gridtest.lpr
+++ b/examples/gui/gridtest/gridtest.lpr
@@ -17,7 +17,8 @@ uses
fpg_checkbox,
fpg_tab,
fpg_edit,
- fpg_dialogs;
+ fpg_dialogs,
+ fpg_scrollbar;
type
@@ -227,6 +228,9 @@ begin
AddColumn('Column 1', 100, taLeftJustify);
AddColumn('Col 2', 50, taCenter);
AddColumn('Numbers', 150, taRightJustify);
+ AddColumn('Column 4', 150, taRightJustify);
+ AddColumn('Column 5', 150, taRightJustify);
+ AddColumn('Column 6', 150, taRightJustify);
FontDesc := '#Grid';
HeaderFontDesc := '#GridHeader';
Hint := '';
@@ -253,6 +257,14 @@ begin
OnDrawCell := @StringGridDrawCell;
OnDoubleClick := @StringGridDoubleClicked;
OnHeaderClick := @StringGridHeaderClicked;
+ // Testing various scrollbar styles
+// ScrollBarStyle:= ssNone;
+// ScrollBarStyle:= ssHorizontal;
+// ScrollBarStyle:= ssVertical;
+ ScrollBarStyle:= ssAutoBoth;
+// ScrollBarStyle:= ssHorizVisible;
+// ScrollBarStyle:= ssVertiVisible;
+// ScrollBarStyle:= ssBothVisible;
end;
chkShowHeader := TfpgCheckBox.Create(self);
diff --git a/examples/gui/hintwindow/hintwindowtest.lpi b/examples/gui/hintwindow/hintwindowtest.lpi
index eef2ca11..ecb49472 100644
--- a/examples/gui/hintwindow/hintwindowtest.lpi
+++ b/examples/gui/hintwindow/hintwindowtest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,12 +9,14 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
<Title Value="hintwindowtest"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -40,9 +42,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="hintwindowtest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/imgtest/bitmaptest.lpi b/examples/gui/imgtest/bitmaptest.lpi
index ec9a5f70..f10675d4 100644
--- a/examples/gui/imgtest/bitmaptest.lpi
+++ b/examples/gui/imgtest/bitmaptest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,12 +9,14 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
<Title Value="bitmaptest"/>
</General>
<VersionInfo>
- <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -40,14 +42,21 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="bitmaptest"/>
+ </Target>
<SearchPaths>
- <IncludeFiles Value="../source/"/>
- <OtherUnitFiles Value="../source/;../source/x11/;../gui/"/>
+ <IncludeFiles Value="../source"/>
+ <OtherUnitFiles Value="../source;../source/x11;../gui"/>
+ <UnitOutputDirectory Value="units"/>
</SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/imgtest_jpeg/jpeg.lpi b/examples/gui/imgtest_jpeg/jpeg.lpi
index 6b0fc630..bd592bfe 100644
--- a/examples/gui/imgtest_jpeg/jpeg.lpi
+++ b/examples/gui/imgtest_jpeg/jpeg.lpi
@@ -1,25 +1,26 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
- <UseDefaultCompilerOptions Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
<UseAppBundle Value="False"/>
<ResourceType Value="res"/>
</General>
<VersionInfo>
<Language Value=""/>
<CharSet Value=""/>
- <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -50,15 +51,14 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="jpegtest"/>
+ </Target>
<SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="units"/>
</SearchPaths>
- <Parsing>
- <SyntaxOptions>
- <UseAnsiStrings Value="True"/>
- </SyntaxOptions>
- </Parsing>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
diff --git a/examples/gui/listbox/frm_main.pas b/examples/gui/listbox/frm_main.pas
index 1c858112..cacc604f 100644
--- a/examples/gui/listbox/frm_main.pas
+++ b/examples/gui/listbox/frm_main.pas
@@ -5,13 +5,15 @@ unit frm_main;
interface
uses
- SysUtils, Classes,
- fpg_base, fpg_main, fpg_edit,
- fpg_widget, fpg_form, fpg_label, fpg_button,
- fpg_listbox, fpg_memo, fpg_combobox, fpg_basegrid, fpg_grid,
- fpg_dialogs, fpg_checkbox, fpg_tree, fpg_trackbar,
- fpg_progressbar, fpg_radiobutton, fpg_tab, fpg_menu,
- fpg_panel, fpg_popupcalendar, fpg_gauge;
+ SysUtils,
+ Classes,
+ fpg_base,
+ fpg_main,
+ fpg_form,
+ fpg_button,
+ fpg_listbox,
+ fpg_memo,
+ fpg_checkbox;
type
diff --git a/examples/gui/listbox/listboxtest.lpi b/examples/gui/listbox/listboxtest.lpi
index e745c4da..17170ebf 100644
--- a/examples/gui/listbox/listboxtest.lpi
+++ b/examples/gui/listbox/listboxtest.lpi
@@ -1,19 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -45,9 +47,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="listboxtest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/listviewtest/listviewtest.lpi b/examples/gui/listviewtest/listviewtest.lpi
index e8537f5b..50579565 100644
--- a/examples/gui/listviewtest/listviewtest.lpi
+++ b/examples/gui/listviewtest/listviewtest.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@@ -41,7 +41,13 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="9"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="listviewtest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
diff --git a/examples/gui/memo/memotest.lpi b/examples/gui/memo/memotest.lpi
index 0102fcfc..12046720 100644
--- a/examples/gui/memo/memotest.lpi
+++ b/examples/gui/memo/memotest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -40,10 +42,18 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="memotest"/>
+ </Target>
<SearchPaths>
<UnitOutputDirectory Value="units"/>
</SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
diff --git a/examples/gui/menutest/menutest.lpi b/examples/gui/menutest/menutest.lpi
index c3120df3..579cbc7c 100644
--- a/examples/gui/menutest/menutest.lpi
+++ b/examples/gui/menutest/menutest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="8"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -39,7 +41,13 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="9"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="menutest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
@@ -47,7 +55,7 @@
</Parsing>
<Linking>
<Debugging>
- <GenerateDebugInfo Value="True"/>
+ <DebugInfoType Value="dsStabs"/>
</Debugging>
<Options>
<Win32>
@@ -56,8 +64,6 @@
</Options>
</Linking>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/modalforms/modalforms.lpi b/examples/gui/modalforms/modalforms.lpi
index 938d807b..2f25e23a 100644
--- a/examples/gui/modalforms/modalforms.lpi
+++ b/examples/gui/modalforms/modalforms.lpi
@@ -41,6 +41,12 @@
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
+ <Target>
+ <Filename Value="modalformstests"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
@@ -48,6 +54,7 @@
</Parsing>
<Other>
<CustomOptions Value="-FUunits"/>
+ <CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</CONFIG>
diff --git a/examples/gui/mousecursor/cursordemo.lpi b/examples/gui/mousecursor/cursordemo.lpi
index 7aea18fa..d3e71ef7 100644
--- a/examples/gui/mousecursor/cursordemo.lpi
+++ b/examples/gui/mousecursor/cursordemo.lpi
@@ -1,23 +1,25 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
</Flags>
<SessionStorage Value="None"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
<Title Value="cursordemo"/>
<UseAppBundle Value="False"/>
<ResourceType Value="res"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
<Language Value=""/>
<CharSet Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -44,15 +46,14 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="cursordemo"/>
+ </Target>
<SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="units"/>
</SearchPaths>
- <Parsing>
- <SyntaxOptions>
- <UseAnsiStrings Value="True"/>
- </SyntaxOptions>
- </Parsing>
<Linking>
<Options>
<Win32>
diff --git a/examples/gui/panel/panel_test.lpi b/examples/gui/panel/panel_test.lpi
index 89378ec4..dc519cb0 100644
--- a/examples/gui/panel/panel_test.lpi
+++ b/examples/gui/panel/panel_test.lpi
@@ -1,20 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -45,9 +46,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="panel_test"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/reporting/pdf_demo.lpi b/examples/gui/reporting/pdf_demo.lpi
index 57598cef..9af69bbd 100644
--- a/examples/gui/reporting/pdf_demo.lpi
+++ b/examples/gui/reporting/pdf_demo.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
diff --git a/examples/gui/scrollframe/bigframe_test.lpi b/examples/gui/scrollframe/bigframe_test.lpi
new file mode 100644
index 00000000..ee242841
--- /dev/null
+++ b/examples/gui/scrollframe/bigframe_test.lpi
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+ <ProjectOptions>
+ <Version Value="9"/>
+ <General>
+ <Flags>
+ <MainUnitHasCreateFormStatements Value="False"/>
+ <MainUnitHasTitleStatement Value="False"/>
+ </Flags>
+ <SessionStorage Value="InProjectDir"/>
+ <MainUnit Value="0"/>
+ <Title Value="bigframe_test"/>
+ <UseAppBundle Value="False"/>
+ <ResourceType Value="res"/>
+ </General>
+ <i18n>
+ <EnableI18N LFM="False"/>
+ </i18n>
+ <VersionInfo>
+ <StringTable ProductVersion=""/>
+ </VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="Default" Default="True"/>
+ </BuildModes>
+ <PublishOptions>
+ <Version Value="2"/>
+ <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
+ <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
+ </PublishOptions>
+ <RunParams>
+ <local>
+ <FormatVersion Value="1"/>
+ <LaunchingApplication PathPlusParams="/usr/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
+ </local>
+ </RunParams>
+ <RequiredPackages Count="1">
+ <Item1>
+ <PackageName Value="fpgui_toolkit"/>
+ </Item1>
+ </RequiredPackages>
+ <Units Count="1">
+ <Unit0>
+ <Filename Value="bigframe_test.lpr"/>
+ <IsPartOfProject Value="True"/>
+ <UnitName Value="bigframe_test"/>
+ </Unit0>
+ </Units>
+ </ProjectOptions>
+ <CompilerOptions>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="bigframe_test"/>
+ </Target>
+ <SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/>
+ </SearchPaths>
+ <Other>
+ <CompilerMessages>
+ <MsgFileName Value=""/>
+ </CompilerMessages>
+ <CompilerPath Value="$(CompPath)"/>
+ </Other>
+ </CompilerOptions>
+ <Debugging>
+ <Exceptions Count="3">
+ <Item1>
+ <Name Value="EAbort"/>
+ </Item1>
+ <Item2>
+ <Name Value="ECodetoolError"/>
+ </Item2>
+ <Item3>
+ <Name Value="EFOpenError"/>
+ </Item3>
+ </Exceptions>
+ </Debugging>
+</CONFIG>
diff --git a/examples/gui/scrollframe/bigframe_test.lpr b/examples/gui/scrollframe/bigframe_test.lpr
new file mode 100644
index 00000000..5309e965
--- /dev/null
+++ b/examples/gui/scrollframe/bigframe_test.lpr
@@ -0,0 +1,114 @@
+program bigframe_test;
+
+{$mode objfpc}{$H+}
+
+uses
+ Classes,
+ sysutils,
+ fpg_base,
+ fpg_main,
+ fpg_button,
+ fpg_label,
+ fpg_form,
+ fpg_panel,
+ fpg_scrollframe
+ ;
+
+procedure create_buttons (f : TfpgFrame);
+var
+ i, j, ij : integer;
+ b : TfpgButton;
+const
+ num_button_cols = 4;
+ num_button_rows = 5;
+begin
+ with f do begin
+ for i := 0 to num_button_cols-1 do
+ begin
+ for j := 0 to num_button_rows-1 do
+ begin
+ if (j>4) and (j<16) then continue;
+ ij := j + num_button_rows*i;
+ b := TfpgButton.Create(f);
+ with b do begin
+ if (i=2) and (j=2)
+ then SetPosition(6000, 6000, 100, 25)
+ else SetPosition(20+i*105, 50+j*30, 100, 25);
+ name := 'button' + inttostr(ij);
+ Text := 'Button ' + inttostr(ij+1);
+ FontDesc := '#Label1';
+ end;
+ end;
+ end;
+ end;
+end;
+
+type
+
+ { t_sample_frame }
+
+ t_sample_frame = class (TfpgAutoSizingFrame)
+ protected
+ my_color : TfpgColor;
+ embed_button : TfpgButton;
+ procedure click_embed_button (Sender: TObject);
+ procedure paint_my_stuff (Sender: TObject);
+ public
+ procedure AfterCreate; override;
+ end;
+
+procedure t_sample_frame.click_embed_button(Sender: TObject);
+var
+ inner_bevel : TfpgBevel;
+ inner_frame : TfpgScrollFrame;
+begin
+ embed_button.Visible:=false;
+ inner_bevel := TfpgBevel.Create(self);
+ with inner_bevel do begin;
+ SetPosition(90, 210, 300, 300);
+ BorderStyle := bsDouble;
+ Shape := bsFrame;
+ UpdateWindowPosition;
+ end;
+ RecalcFrameSize;
+
+ inner_frame := TfpgScrollFrame.Create(inner_bevel, t_sample_frame);
+ inner_frame.Align:=alClient;
+end;
+
+procedure t_sample_frame.paint_my_stuff (Sender: TObject);
+begin
+ canvas.Color := my_color;
+ canvas.FillRectangle (30, 30, 200, 400);
+end;
+
+procedure t_sample_frame.AfterCreate;
+begin
+ inherited AfterCreate;
+ MarginBR:=7;
+ my_color:=TfpgColor(random(high(longint)));
+ embed_button := CreateButton (self, 20, 240, 270,
+ 'Click to embed another Scroll-Frame here', @click_embed_button);
+ OnPaint:=@paint_my_stuff;
+ create_buttons(self);
+end;
+
+
+var
+ form: TfpgForm;
+ outer_frame: TfpgScrollFrame;
+
+begin
+ fpgApplication.Initialize;
+ form := TfpgForm.Create(nil);
+ form.SetPosition(0,0,380,360);
+ outer_frame := TfpgScrollFrame.Create(form, t_sample_frame);
+ outer_frame.Align:=alClient;
+ try
+ form.Show;
+ fpgApplication.Run;
+ finally
+ form.Free;
+ end;
+end.
+
diff --git a/examples/gui/scrollframe/frame_test.lpi b/examples/gui/scrollframe/frame_test.lpi
new file mode 100644
index 00000000..ab3bd77f
--- /dev/null
+++ b/examples/gui/scrollframe/frame_test.lpi
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+ <ProjectOptions>
+ <Version Value="9"/>
+ <General>
+ <Flags>
+ <MainUnitHasCreateFormStatements Value="False"/>
+ <MainUnitHasTitleStatement Value="False"/>
+ </Flags>
+ <SessionStorage Value="InProjectDir"/>
+ <MainUnit Value="0"/>
+ <Title Value="frame_test"/>
+ <UseAppBundle Value="False"/>
+ <ResourceType Value="res"/>
+ </General>
+ <i18n>
+ <EnableI18N LFM="False"/>
+ </i18n>
+ <VersionInfo>
+ <StringTable ProductVersion=""/>
+ </VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="Default" Default="True"/>
+ </BuildModes>
+ <PublishOptions>
+ <Version Value="2"/>
+ <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
+ <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
+ </PublishOptions>
+ <RunParams>
+ <local>
+ <FormatVersion Value="1"/>
+ <LaunchingApplication PathPlusParams="/usr/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
+ </local>
+ </RunParams>
+ <RequiredPackages Count="1">
+ <Item1>
+ <PackageName Value="fpgui_toolkit"/>
+ </Item1>
+ </RequiredPackages>
+ <Units Count="1">
+ <Unit0>
+ <Filename Value="frame_test.lpr"/>
+ <IsPartOfProject Value="True"/>
+ <UnitName Value="frame_test"/>
+ </Unit0>
+ </Units>
+ </ProjectOptions>
+ <CompilerOptions>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="frame_test"/>
+ </Target>
+ <SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/>
+ </SearchPaths>
+ <Other>
+ <CompilerMessages>
+ <MsgFileName Value=""/>
+ </CompilerMessages>
+ <CompilerPath Value="$(CompPath)"/>
+ </Other>
+ </CompilerOptions>
+ <Debugging>
+ <Exceptions Count="3">
+ <Item1>
+ <Name Value="EAbort"/>
+ </Item1>
+ <Item2>
+ <Name Value="ECodetoolError"/>
+ </Item2>
+ <Item3>
+ <Name Value="EFOpenError"/>
+ </Item3>
+ </Exceptions>
+ </Debugging>
+</CONFIG>
diff --git a/examples/gui/scrollframe/frame_test.lpr b/examples/gui/scrollframe/frame_test.lpr
new file mode 100644
index 00000000..252f8a07
--- /dev/null
+++ b/examples/gui/scrollframe/frame_test.lpr
@@ -0,0 +1,112 @@
+program frame_test;
+
+{$mode objfpc}{$H+}
+
+uses
+ Classes,
+ sysutils,
+ fpg_base,
+ fpg_main,
+ fpg_button,
+ fpg_label,
+ fpg_form,
+ fpg_panel,
+ fpg_scrollframe
+ ;
+
+procedure create_buttons (f : TfpgFrame);
+var
+ i, j, ij : integer;
+ b : TfpgButton;
+const
+ num_button_cols = 4;
+ num_button_rows = 5;
+begin
+ with f do begin
+ for i := 0 to num_button_cols-1 do
+ begin
+ for j := 0 to num_button_rows-1 do
+ begin
+ if (j>4) and (j<16) then continue;
+ ij := j + num_button_rows*i;
+ b := TfpgButton.Create(f);
+ with b do begin
+ SetPosition(20+i*105, 50+j*30, 100, 25);
+ name := 'button' + inttostr(ij);
+ Text := 'Button ' + inttostr(ij+1);
+ FontDesc := '#Label1';
+ end;
+ end;
+ end;
+ end;
+end;
+
+type
+
+ { t_sample_frame }
+
+ t_sample_frame = class (TfpgAutoSizingFrame)
+ protected
+ my_color : TfpgColor;
+ embed_button : TfpgButton;
+ procedure click_embed_button (Sender: TObject);
+ procedure paint_my_stuff (Sender: TObject);
+ public
+ procedure AfterCreate; override;
+ end;
+
+procedure t_sample_frame.click_embed_button(Sender: TObject);
+var
+ inner_bevel : TfpgBevel;
+ inner_frame : TfpgScrollFrame;
+begin
+ embed_button.Visible:=false;
+ inner_bevel := TfpgBevel.Create(self);
+ with inner_bevel do begin;
+ SetPosition(90, 210, 300, 300);
+ BorderStyle := bsDouble;
+ Shape := bsFrame;
+ UpdateWindowPosition;
+ end;
+ RecalcFrameSize;
+
+ inner_frame := TfpgScrollFrame.Create(inner_bevel, t_sample_frame);
+ inner_frame.Align:=alClient;
+end;
+
+procedure t_sample_frame.paint_my_stuff (Sender: TObject);
+begin
+ canvas.Color := my_color;
+ canvas.FillRectangle (30, 30, 200, 400);
+end;
+
+procedure t_sample_frame.AfterCreate;
+begin
+ inherited AfterCreate;
+ MarginBR:=7;
+ my_color:=TfpgColor(random(high(longint)));
+ embed_button := CreateButton (self, 20, 240, 270,
+ 'Click to embed another Scroll-Frame here', @click_embed_button);
+ OnPaint:=@paint_my_stuff;
+ create_buttons(self);
+end;
+
+
+var
+ form: TfpgForm;
+ outer_frame: TfpgScrollFrame;
+
+begin
+ fpgApplication.Initialize;
+ form := TfpgForm.Create(nil);
+ form.SetPosition(0,0,380,360);
+ outer_frame := TfpgScrollFrame.Create(form, t_sample_frame);
+ outer_frame.Align:=alClient;
+ try
+ form.Show;
+ fpgApplication.Run;
+ finally
+ form.Free;
+ end;
+end.
+
diff --git a/examples/gui/splashscreen/frm_main.pas b/examples/gui/splashscreen/frm_main.pas
index 7ecf663c..61155fae 100644
--- a/examples/gui/splashscreen/frm_main.pas
+++ b/examples/gui/splashscreen/frm_main.pas
@@ -49,7 +49,6 @@ type
implementation
uses
- fpg_command_intf,
commands;
{@VFD_NEWFORM_IMPL}
diff --git a/examples/gui/splashscreen/test.lpi b/examples/gui/splashscreen/test.lpi
index fa0ecd6b..bd28075e 100644
--- a/examples/gui/splashscreen/test.lpi
+++ b/examples/gui/splashscreen/test.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -54,9 +56,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="splashscreen"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/splitter/splitter_test.lpi b/examples/gui/splitter/splitter_test.lpi
index 431f5ffe..6f2b669f 100644
--- a/examples/gui/splitter/splitter_test.lpi
+++ b/examples/gui/splitter/splitter_test.lpi
@@ -1,20 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=".exe"/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -40,7 +41,18 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="splitter_test"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Checks>
@@ -57,8 +69,6 @@
<LinkSmart Value="True"/>
</Linking>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/sprites/spritedemo.lpi b/examples/gui/sprites/spritedemo.lpi
index d5109e71..6b393910 100644
--- a/examples/gui/sprites/spritedemo.lpi
+++ b/examples/gui/sprites/spritedemo.lpi
@@ -1,20 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@@ -41,9 +42,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="spritedemo"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/stdimages/stdimglist.lpi b/examples/gui/stdimages/stdimglist.lpi
index f519fc99..e9d1ba25 100644
--- a/examples/gui/stdimages/stdimglist.lpi
+++ b/examples/gui/stdimages/stdimglist.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@@ -41,13 +41,18 @@
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
+ <Target>
+ <Filename Value="stdimglist"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Other>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/tabtest/tabtest.lpi b/examples/gui/tabtest/tabtest.lpi
index b29eb7a0..a3e5d6f7 100644
--- a/examples/gui/tabtest/tabtest.lpi
+++ b/examples/gui/tabtest/tabtest.lpi
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="7"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
@@ -9,11 +9,13 @@
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -39,10 +41,18 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="tabtest"/>
+ </Target>
<SearchPaths>
<UnitOutputDirectory Value="units"/>
</SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Linking>
<Debugging>
<UseHeaptrc Value="True"/>
diff --git a/examples/gui/timertest/timertest.lpi b/examples/gui/timertest/timertest.lpi
index a27e074a..c9494ac4 100644
--- a/examples/gui/timertest/timertest.lpi
+++ b/examples/gui/timertest/timertest.lpi
@@ -1,20 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -40,10 +41,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="timertest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/togglebox/ToggleBoxTest.lpi b/examples/gui/togglebox/ToggleBoxTest.lpi
new file mode 100644
index 00000000..327b4258
--- /dev/null
+++ b/examples/gui/togglebox/ToggleBoxTest.lpi
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+ <ProjectOptions>
+ <Version Value="9"/>
+ <General>
+ <Flags>
+ <MainUnitHasCreateFormStatements Value="False"/>
+ <MainUnitHasTitleStatement Value="False"/>
+ </Flags>
+ <SessionStorage Value="InProjectDir"/>
+ <MainUnit Value="0"/>
+ <Title Value="ToggleBoxTest"/>
+ <UseAppBundle Value="False"/>
+ <ResourceType Value="res"/>
+ </General>
+ <i18n>
+ <EnableI18N LFM="False"/>
+ </i18n>
+ <VersionInfo>
+ <StringTable ProductVersion=""/>
+ </VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="Default" Default="True"/>
+ </BuildModes>
+ <PublishOptions>
+ <Version Value="2"/>
+ </PublishOptions>
+ <RunParams>
+ <local>
+ <FormatVersion Value="1"/>
+ <LaunchingApplication Use="True" PathPlusParams="/usr/bin/gnome-terminal -t 'Lazarus Run Output' -e '$(LazarusDir)/tools/runwait.sh $(TargetCmdLine)'"/>
+ </local>
+ </RunParams>
+ <RequiredPackages Count="1">
+ <Item1>
+ <PackageName Value="fpgui_toolkit"/>
+ </Item1>
+ </RequiredPackages>
+ <Units Count="2">
+ <Unit0>
+ <Filename Value="ToggleBoxTest.lpr"/>
+ <IsPartOfProject Value="True"/>
+ </Unit0>
+ <Unit1>
+ <Filename Value="mainfrm.pas"/>
+ <IsPartOfProject Value="True"/>
+ <UnitName Value="mainfrm"/>
+ </Unit1>
+ </Units>
+ </ProjectOptions>
+ <CompilerOptions>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="ToggleBoxTest"/>
+ </Target>
+ <SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/>
+ </SearchPaths>
+ <Other>
+ <CompilerPath Value="$(CompPath)"/>
+ </Other>
+ </CompilerOptions>
+ <Debugging>
+ <Exceptions Count="3">
+ <Item1>
+ <Name Value="EAbort"/>
+ </Item1>
+ <Item2>
+ <Name Value="ECodetoolError"/>
+ </Item2>
+ <Item3>
+ <Name Value="EFOpenError"/>
+ </Item3>
+ </Exceptions>
+ </Debugging>
+</CONFIG>
diff --git a/examples/gui/togglebox/ToggleBoxTest.lpr b/examples/gui/togglebox/ToggleBoxTest.lpr
new file mode 100644
index 00000000..8866f9c5
--- /dev/null
+++ b/examples/gui/togglebox/ToggleBoxTest.lpr
@@ -0,0 +1,30 @@
+program ToggleBoxTest;
+
+{$mode objfpc}{$H+}
+
+uses
+ {$IFDEF UNIX}
+ cthreads,
+ {$ENDIF}
+ Classes,
+ fpg_main,
+ mainfrm;
+
+procedure MainProc;
+var
+ frmMain: TfrmMain;
+begin
+ fpgApplication.Initialize;
+ frmMain:= TfrmMain.Create(nil);
+ try
+ frmMain.Show;
+ fpgApplication.Run;
+ finally
+ frmMain.Free;
+ end;
+end;
+
+begin
+ MainProc;
+end.
+
diff --git a/examples/gui/togglebox/mainfrm.pas b/examples/gui/togglebox/mainfrm.pas
new file mode 100644
index 00000000..ff9a43da
--- /dev/null
+++ b/examples/gui/togglebox/mainfrm.pas
@@ -0,0 +1,44 @@
+unit mainfrm;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes, SysUtils, fpg_base, fpg_form, fpg_toggle;
+
+type
+
+ { TfrmMain }
+
+ TfrmMain = class(TfpgForm)
+ private
+ FToggle: TfpgToggle;
+ public
+ constructor Create(AOwner: TComponent); override;
+ end;
+
+
+implementation
+
+{ TfrmMain }
+
+constructor TfrmMain.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ WindowTitle:='Yay a toggle!';
+ SetWidth(300);
+ SetHeight(200);
+
+ FToggle := TfpgToggle.Create(Self);
+ FToggle.SetPosition(10, 10, 200, 20);
+// FToggle.Width:=200;
+
+ //FToggle.ToggleSide:=tsLeft;
+ //FToggle.ToggleWidth:=100;
+ //FToggle.UseAnimation:=False;
+
+end;
+
+end.
+
diff --git a/examples/gui/treeviewtest/treeviewtest.lpi b/examples/gui/treeviewtest/treeviewtest.lpi
index 6c19a1a9..8f925b0d 100644
--- a/examples/gui/treeviewtest/treeviewtest.lpi
+++ b/examples/gui/treeviewtest/treeviewtest.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@@ -46,7 +46,13 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="9"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="treeviewtest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
<Parsing>
<SyntaxOptions>
<CStyleOperator Value="False"/>
@@ -57,7 +63,6 @@
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
- <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/video_vlc/frmvlcplayer.pas b/examples/gui/video_vlc/frmvlcplayer.pas
index 7b44c1e1..aeea3e0c 100644
--- a/examples/gui/video_vlc/frmvlcplayer.pas
+++ b/examples/gui/video_vlc/frmvlcplayer.pas
@@ -6,7 +6,7 @@ interface
uses
SysUtils, Classes, fpg_base, fpg_panel, fpg_button, fpg_main, fpg_form,
- fpg_editbtn, fpg_memo, fpg_label, libvlc, vlc, fpg_vlc;
+ fpg_editbtn, fpg_memo, fpg_label, vlc, fpg_vlc;
type
@@ -23,8 +23,8 @@ type
Button3: TfpgButton;
Button4: TfpgButton;
Memo1: TfpgMemo;
- procedure Sync;
{@VFD_HEAD_END: VLCPlayerDemo}
+ procedure Sync;
public
P : TFpgVLCPlayer;
FMsg: String;
diff --git a/examples/gui/video_vlc/testfpguivlc.lpi b/examples/gui/video_vlc/testfpguivlc.lpi
index fc6715f3..7839f71a 100644
--- a/examples/gui/video_vlc/testfpguivlc.lpi
+++ b/examples/gui/video_vlc/testfpguivlc.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@@ -50,17 +50,17 @@
<UnitName Value="frmvlcplayer"/>
</Unit1>
<Unit2>
- <Filename Value="../fpg_vlc.pas"/>
+ <Filename Value="../../../src/3rdparty/libvlc/fpg_vlc.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="fpg_vlc"/>
</Unit2>
<Unit3>
- <Filename Value="../../libvlc/libvlc.pp"/>
+ <Filename Value="../../../src/3rdparty/libvlc/libvlc.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="libvlc"/>
</Unit3>
<Unit4>
- <Filename Value="../../libvlc/vlc.pas"/>
+ <Filename Value="../../../src/3rdparty/libvlc/vlc.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="vlc"/>
</Unit4>
@@ -74,7 +74,7 @@
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="../../../src/3rdparty/libvlc"/>
- <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
+ <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Other>
<CompilerMessages>
diff --git a/examples/gui/wulinetest/wuline_test.lpi b/examples/gui/wulinetest/wuline_test.lpi
index 7a54bb83..55fd3864 100644
--- a/examples/gui/wulinetest/wuline_test.lpi
+++ b/examples/gui/wulinetest/wuline_test.lpi
@@ -1,20 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="6"/>
+ <Version Value="9"/>
<General>
<Flags>
<SaveOnlyProjectUnits Value="True"/>
+ <LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
</General>
<VersionInfo>
- <ProjectVersion Value=""/>
+ <StringTable ProductVersion=""/>
</VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
@@ -40,10 +41,19 @@
</Units>
</ProjectOptions>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="wulinetest"/>
+ </Target>
+ <SearchPaths>
+ <UnitOutputDirectory Value="units"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <UseAnsiStrings Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
<Other>
- <CustomOptions Value="-FUunits
-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/extras/contributed/editgrid/u_editgrid.pas b/extras/contributed/editgrid/u_editgrid.pas
index 17446fa6..30193580 100644
--- a/extras/contributed/editgrid/u_editgrid.pas
+++ b/extras/contributed/editgrid/u_editgrid.pas
@@ -551,6 +551,7 @@ begin
IniCalendarCell;
end;
FEditing := True;
+ Enabled:= False;
end;
procedure TfpgCustomEditGrid.EditGridMouseDown(Sender: TObject; AButton: TMouseButton; AShift: TShiftState;
@@ -736,17 +737,26 @@ procedure TfpgCustomEditGrid.SetReturnWay;
begin
case FEditWay of
edNone:
+ begin
FEditing:= False;
+ Enabled:= True;
+ end;
edColumn:
if FocusCol < Pred(ColumnCount) then
FocusCol := FocusCol + 1
else
+ begin
FEditing:= False;
+ Enabled:= True;
+ end;
edRow:
if FocusRow < Pred(RowCount) then
FocusRow := FocusRow + 1
else
+ begin
FEditing:= False;
+ Enabled:= True;
+ end;
end;
SetFocus;
if FEditing then
@@ -764,6 +774,7 @@ begin
if FocusCol < Pred(ColumnCount) then
FocusCol := FocusCol + 1;
FEditing := False;
+ Enabled:= True;
SetFocus;
end;
@@ -811,6 +822,7 @@ begin
FCellEditText.Text := '';
FCellEditText.Visible := False;
FEditing := False;
+ Enabled:= True;
SetFocus;
end;
end;
@@ -937,6 +949,7 @@ begin
FCellEditInteger.Text := '';
FCellEditInteger.Visible := False;
FEditing := False;
+ Enabled:= True;
SetFocus;
end;
end;
@@ -1051,6 +1064,7 @@ begin
FCellEditFloat.Text := '';
FCellEditFloat.Visible := False;
FEditing := False;
+ Enabled:= True;
SetFocus;
end;
end;
@@ -1151,6 +1165,7 @@ begin
FCellEditCurrency.Text := '';
FCellEditCurrency.Visible := False;
FEditing := False;
+ Enabled:= True;
SetFocus;
end;
end;
@@ -1239,6 +1254,7 @@ begin
FCellComboBox.Text := '';
FCellComboBox.Visible := False;
FEditing := False;
+ Enabled:= True;
SetFocus;
end;
end;
@@ -1307,6 +1323,7 @@ begin
FCellEditCombo.Text := '';
FCellEditCombo.Visible := False;
FEditing := False;
+ Enabled:= True;
SetFocus;
end;
end;
@@ -1393,6 +1410,7 @@ begin
FCellCheckBox.Text := '';
FCellCheckBox.Visible := False;
FEditing := False;
+ Enabled:= True;
SetFocus;
end;
end;
@@ -1482,6 +1500,7 @@ begin
//FCellCalendar.Text := '';
FCellCalendar.Visible := False;
FEditing := False;
+ Enabled:= True;
SetFocus;
end;
end;
@@ -1671,6 +1690,7 @@ begin
IniCalendarCell;
end;
FEditing := True;
+ Enabled:= False;
end;
keyTab:
begin
diff --git a/extras/contributed/nicegrid/extrafpc.cfg b/extras/contributed/nicegrid/extrafpc.cfg
new file mode 100644
index 00000000..49dd2ec7
--- /dev/null
+++ b/extras/contributed/nicegrid/extrafpc.cfg
@@ -0,0 +1,10 @@
+-FUunits
+-Fu../../../lib/$fpctarget
+-Fi.
+-Xs
+-XX
+-CX
+#ifdef mswindows
+-WG
+#endif
+
diff --git a/extras/contributed/nicegrid/fpg_nicegrid.pas b/extras/contributed/nicegrid/fpg_nicegrid.pas
index 2a27f771..a65448fb 100644
--- a/extras/contributed/nicegrid/fpg_nicegrid.pas
+++ b/extras/contributed/nicegrid/fpg_nicegrid.pas
@@ -386,7 +386,7 @@ type
property HeaderFontColor: TfpgColor read FHeaderFontColor write SetHeaderFontColor;
property FooterFont: string read FFooterFont write SetFooterFont;
property FooterFontColor: TfpgColor read FFooterFontColor write SetFooterFontColor;
- property SelectionColor: TfpgColor read FSelectionColor write SetSelectionColor default $00CAFFFF;
+ property SelectionColor: TfpgColor read FSelectionColor write SetSelectionColor default $FFCAFFFF;
property FitToWidth: Boolean read FFitToWidth write SetFitToWidth default False;
property AutoColWidth: Boolean read FAutoColWidth write SetAutoColWidth default False;
property ReadOnly: Boolean read FReadOnly write SetReadOnly default False;
@@ -491,7 +491,7 @@ begin
FHeaderLightColor := clHilite1;
FHeaderDarkColor := clShadow1;
FHeaderFont:='Arial-8';
- FSelectionColor := $00CAFFFF;
+ FSelectionColor := $FFCAFFFF;
FFooterFont := 'Arial-8';
FooterFontColor := clRed;
FDefRowHeight := 18;
diff --git a/extras/contributed/nicegrid/main1.pas b/extras/contributed/nicegrid/main1.pas
index 67a39621..27d7a3bd 100644
--- a/extras/contributed/nicegrid/main1.pas
+++ b/extras/contributed/nicegrid/main1.pas
@@ -78,7 +78,7 @@ begin
RowCount := 20;
AutoAddRow := True;
DefColWidth := 100;
- Color:=$ECE9D8;
+ Color := $ffece9d8;
GridColor := clSilver;
HeaderLine := 2;
HeaderColor := clButtonFace;
@@ -87,7 +87,7 @@ begin
HeaderFontColor := clWhite;
HeaderFont := 'MS Sans Serif';
FooterFontColor := clRed;
- SelectionColor := 13816575;
+ SelectionColor := $ffD2D2FF;
BeginUpdate; // JP
with Columns.Add do
begin
@@ -105,7 +105,7 @@ begin
Width:=100;
Font:='Arial-8';
FontColor:=clRed;
- Color:=$FFFACD;//14024703;
+ Color:=$FFFFFACD;//14024703;
HorzAlign:=haCenter;
end;
with Columns.Add do
@@ -302,9 +302,9 @@ begin
begin
BeginUpdate;
GridColor := clGray;
- HeaderColor := $000000DF;
+ HeaderColor := $FF0000DF;
HeaderDarkColor := clBlack;
- HeaderLightColor := $000080FF;
+ HeaderLightColor := $FF0080FF;
HeaderFontColor := clWhite;
GutterFontColor:=clWhite;
EndUpdate;
diff --git a/extras/contributed/nicegrid/nicegrid1.project b/extras/contributed/nicegrid/nicegrid1.project
new file mode 100644
index 00000000..580224ad
--- /dev/null
+++ b/extras/contributed/nicegrid/nicegrid1.project
@@ -0,0 +1,68 @@
+[ProjectOptions]
+ProjectName=nicegrid1.project
+MainUnit=nicegrid1.lpr
+TargetFile=nicegrid1${EXEEXT}
+DefaultMake=0
+MakeOptionsCount=7
+MakeOptionEnabled1=1,1,1,1,1,1
+MakeOptionEnabled2=1,1,1,1,1,0
+MakeOptionEnabled3=1,1,0,0,0,1
+MakeOptionEnabled4=0,0,0,0,1,1
+MacroCount=4
+Macro1=TargetCPU=i386
+Macro2=TargetOS=win32
+Macro3=FPGUI_DIR=/home/graemeg/programming/fpgui/
+Macro4=tiOPF_fpGUI_Dir=/home/graemeg/programming/3rdParty/tiOPF2/src/
+Macro5=FPGUI_DIR=/home/graemeg/programming/fpgui/
+Macro6=tiOPF_fpGUI_Dir=/home/graemeg/programming/3rdParty/tiOPF2/src/
+UnitDirsCount=8
+UnitDirEnabled1=1,1,1,1,0,0,0,1,0,0
+UnitDirEnabled2=1,1,1,1,0,0,1,1,0,0
+UnitDirEnabled3=1,1,1,0,0,0,1,1,0,0
+UnitDirEnabled4=0,0,0,1,0,0,1,1,0,0
+UnitDirEnabled5=1,1,1,1,0,0,1,1,0,0
+UnitDirEnabled6=1,1,1,1,0,0,1,0,0,0
+UnitDirEnabled7=0,0,0,0,1,1,1,0,0,0
+UnitDirEnabled8=1,0,0,0,0,0,1,1,0,0
+UnitOutputDir=units/${TARGET}/
+MakeOptionEnabled5=1,0,0,0,0,0
+MakeOptionEnabled6=1,0,0,0,0,0
+MakeOptionEnabled7=0,0,0,0,0,0
+MakeOption1=-l -Mobjfpc -Sch
+MakeOption2=-g -gl -O- -gw2 -godwarfsets
+MakeOption3=-B
+MakeOption4=-O2 -XX -Xs -CX
+MakeOption5=-veiw
+MakeOption6=-dDEBUGSVR
+MakeOption7=-dAGGCanvas
+UnitDir1=${FPGUIDIR}src/
+UnitDir2=${FPGUIDIR}src/corelib/
+UnitDir3=${FPGUIDIR}src/corelib/x11/
+UnitDir4=${FPGUIDIR}src/corelib/gdi/
+UnitDir5=${FPGUIDIR}src/gui/
+UnitDir6=${FPGUIDIR}src/gui/db/
+UnitDir7=${FPGUILIBDIR}
+UnitDir8=${FPGUIDIR}src/corelib/render/software/
+
+[Units]
+UnitCount=20
+Unit1=builderthread.pas,0
+Unit2=filemonitor.pas,0
+Unit3=fpg_textedit.pas,-1
+Unit4=frm_configureide.pas,0
+Unit5=frm_debug.pas,0
+Unit6=frm_find.pas,-1
+Unit7=frm_main.pas,-1
+Unit8=frm_procedurelist.pas,-1
+Unit9=frm_projectoptions.pas,-1
+Unit10=ideconst.pas,0
+Unit11=ideimages.pas,0
+Unit12=idemacros.pas,-1
+Unit13=ideutils.pas,0
+Unit14=maximus.lpr,0
+Unit15=mPasLex.pas,0
+Unit16=project.pas,-1
+Unit17=sha1.pas,0
+Unit18=stringhelpers.pas,0
+Unit19=synregexpr.pas,0
+Unit20=unitlist.pas,0
diff --git a/languages/fpgui.af.po b/languages/fpgui.af.po
index 7a6bb628..98ac495d 100644
--- a/languages/fpgui.af.po
+++ b/languages/fpgui.af.po
@@ -76,6 +76,10 @@ msgstr "Augustus"
msgid "BkSp"
msgstr ""
+#: fpg_constants:rscolorblue
+msgid "Blue"
+msgstr ""
+
#: fpg_constants:rsbold
msgid "Bold"
msgstr "Vetdruk"
@@ -100,6 +104,10 @@ msgstr "Verander Titel"
msgid "Character Map"
msgstr "Karakter Kaart"
+#: fpg_constants:rscolorpickerhint
+msgid "Click on Picker and maintain click => release to get the color"
+msgstr ""
+
#: fpg_constants:rsclose
msgid "Close"
msgstr "Sluit"
@@ -108,6 +116,10 @@ msgstr "Sluit"
msgid "Collection"
msgstr "Versameling"
+#: fpg_constants:rstabsheetcolorwheel
+msgid "Color Wheel"
+msgstr ""
+
#: fpg_constants:rsconfigurebookmarks
msgid "Configure Bookmarks"
msgstr "Instel Boekmerke"
@@ -120,6 +132,10 @@ msgstr "Bevestig"
msgid "Confirmation"
msgstr "Bevestiging"
+#: fpg_constants:rscontinuous
+msgid "Continuous"
+msgstr ""
+
#: fpg_constants:rscopy
msgid "Copy"
msgstr "Kopieer"
@@ -280,6 +296,10 @@ msgstr "Vr"
msgid "Friday"
msgstr "Vrydag"
+#: fpg_constants:rscolorgreen
+msgid "Green"
+msgstr ""
+
#: fpg_constants:rsfilegroup
msgid "Group"
msgstr "Groep"
@@ -288,6 +308,10 @@ msgstr "Groep"
msgid "Help"
msgstr "Help"
+#: fpg_constants:rshexadecimal
+msgid "Hexadecimal"
+msgstr ""
+
#: fpg_constants:rskeyhome
msgid "Home"
msgstr ""
@@ -464,6 +488,10 @@ msgstr ""
msgid "PgUp"
msgstr ""
+#: fpg_constants:rstabpredefined
+msgid "Predefined"
+msgstr ""
+
#: fpg_constants:rsreportpreview
msgid "Preview"
msgstr "Voorskou"
@@ -472,6 +500,10 @@ msgstr "Voorskou"
msgid "Recently Used"
msgstr "Onlangs gebruik"
+#: fpg_constants:rscolorred
+msgid "Red"
+msgstr ""
+
#: fpg_constants:rsreplace
msgid "Replace"
msgstr "Vervang"
diff --git a/languages/fpgui.de.po b/languages/fpgui.de.po
index e079f440..09e4ae1a 100644
--- a/languages/fpgui.de.po
+++ b/languages/fpgui.de.po
@@ -75,6 +75,10 @@ msgstr "August"
msgid "BkSp"
msgstr ""
+#: fpg_constants:rscolorblue
+msgid "Blue"
+msgstr ""
+
#: fpg_constants:rsbold
msgid "Bold"
msgstr "Fett"
@@ -99,6 +103,10 @@ msgstr ""
msgid "Character Map"
msgstr ""
+#: fpg_constants:rscolorpickerhint
+msgid "Click on Picker and maintain click => release to get the color"
+msgstr ""
+
#: fpg_constants:rsclose
msgid "Close"
msgstr "Schließen"
@@ -107,6 +115,10 @@ msgstr "Schließen"
msgid "Collection"
msgstr "Sammlung"
+#: fpg_constants:rstabsheetcolorwheel
+msgid "Color Wheel"
+msgstr ""
+
#: fpg_constants:rsconfigurebookmarks
msgid "Configure Bookmarks"
msgstr ""
@@ -119,6 +131,10 @@ msgstr "Bestätigen"
msgid "Confirmation"
msgstr "Bestätigung"
+#: fpg_constants:rscontinuous
+msgid "Continuous"
+msgstr ""
+
#: fpg_constants:rscopy
msgid "Copy"
msgstr "Kopieren"
@@ -279,6 +295,10 @@ msgstr "Fre"
msgid "Friday"
msgstr "Freitag"
+#: fpg_constants:rscolorgreen
+msgid "Green"
+msgstr ""
+
#: fpg_constants:rsfilegroup
msgid "Group"
msgstr "Gruppe"
@@ -287,6 +307,10 @@ msgstr "Gruppe"
msgid "Help"
msgstr "Hilfe"
+#: fpg_constants:rshexadecimal
+msgid "Hexadecimal"
+msgstr ""
+
#: fpg_constants:rskeyhome
msgid "Home"
msgstr ""
@@ -463,6 +487,10 @@ msgstr ""
msgid "PgUp"
msgstr ""
+#: fpg_constants:rstabpredefined
+msgid "Predefined"
+msgstr ""
+
#: fpg_constants:rsreportpreview
msgid "Preview"
msgstr ""
@@ -471,6 +499,10 @@ msgstr ""
msgid "Recently Used"
msgstr "Zuletzt verwendet"
+#: fpg_constants:rscolorred
+msgid "Red"
+msgstr ""
+
#: fpg_constants:rsreplace
msgid "Replace"
msgstr "Ersetzen"
diff --git a/languages/fpgui.en.po b/languages/fpgui.en.po
index fe4e5c70..20f85e86 100644
--- a/languages/fpgui.en.po
+++ b/languages/fpgui.en.po
@@ -76,6 +76,10 @@ msgstr ""
msgid "BkSp"
msgstr ""
+#: fpg_constants:rscolorblue
+msgid "Blue"
+msgstr ""
+
#: fpg_constants:rsbold
msgid "Bold"
msgstr ""
@@ -100,6 +104,10 @@ msgstr ""
msgid "Character Map"
msgstr ""
+#: fpg_constants:rscolorpickerhint
+msgid "Click on Picker and maintain click => release to get the color"
+msgstr ""
+
#: fpg_constants:rsclose
msgid "Close"
msgstr ""
@@ -108,6 +116,10 @@ msgstr ""
msgid "Collection"
msgstr ""
+#: fpg_constants:rstabsheetcolorwheel
+msgid "Color Wheel"
+msgstr ""
+
#: fpg_constants:rsconfigurebookmarks
msgid "Configure Bookmarks"
msgstr ""
@@ -120,6 +132,10 @@ msgstr ""
msgid "Confirmation"
msgstr ""
+#: fpg_constants:rscontinuous
+msgid "Continuous"
+msgstr ""
+
#: fpg_constants:rscopy
msgid "Copy"
msgstr ""
@@ -280,6 +296,10 @@ msgstr ""
msgid "Friday"
msgstr ""
+#: fpg_constants:rscolorgreen
+msgid "Green"
+msgstr ""
+
#: fpg_constants:rsfilegroup
msgid "Group"
msgstr ""
@@ -288,6 +308,10 @@ msgstr ""
msgid "Help"
msgstr ""
+#: fpg_constants:rshexadecimal
+msgid "Hexadecimal"
+msgstr ""
+
#: fpg_constants:rskeyhome
msgid "Home"
msgstr ""
@@ -464,6 +488,10 @@ msgstr ""
msgid "PgUp"
msgstr ""
+#: fpg_constants:rstabpredefined
+msgid "Predefined"
+msgstr ""
+
#: fpg_constants:rsreportpreview
msgid "Preview"
msgstr ""
@@ -472,6 +500,10 @@ msgstr ""
msgid "Recently Used"
msgstr ""
+#: fpg_constants:rscolorred
+msgid "Red"
+msgstr ""
+
#: fpg_constants:rsreplace
msgid "Replace"
msgstr ""
diff --git a/languages/fpgui.es.po b/languages/fpgui.es.po
index c33ce8af..181fa6a3 100644
--- a/languages/fpgui.es.po
+++ b/languages/fpgui.es.po
@@ -76,6 +76,10 @@ msgstr ""
msgid "BkSp"
msgstr ""
+#: fpg_constants:rscolorblue
+msgid "Blue"
+msgstr ""
+
#: fpg_constants:rsbold
msgid "Bold"
msgstr "Negrita"
@@ -100,6 +104,10 @@ msgstr ""
msgid "Character Map"
msgstr ""
+#: fpg_constants:rscolorpickerhint
+msgid "Click on Picker and maintain click => release to get the color"
+msgstr ""
+
#: fpg_constants:rsclose
msgid "Close"
msgstr "Cerrar"
@@ -108,6 +116,10 @@ msgstr "Cerrar"
msgid "Collection"
msgstr "Colección"
+#: fpg_constants:rstabsheetcolorwheel
+msgid "Color Wheel"
+msgstr ""
+
#: fpg_constants:rsconfigurebookmarks
msgid "Configure Bookmarks"
msgstr ""
@@ -120,6 +132,10 @@ msgstr "Confirmar"
msgid "Confirmation"
msgstr "Confirmación"
+#: fpg_constants:rscontinuous
+msgid "Continuous"
+msgstr ""
+
#: fpg_constants:rscopy
msgid "Copy"
msgstr "Copiar"
@@ -280,6 +296,10 @@ msgstr "Vie"
msgid "Friday"
msgstr "Viernes"
+#: fpg_constants:rscolorgreen
+msgid "Green"
+msgstr ""
+
#: fpg_constants:rsfilegroup
msgid "Group"
msgstr "Grupo"
@@ -288,6 +308,10 @@ msgstr "Grupo"
msgid "Help"
msgstr "Ayuda"
+#: fpg_constants:rshexadecimal
+msgid "Hexadecimal"
+msgstr ""
+
#: fpg_constants:rskeyhome
msgid "Home"
msgstr ""
@@ -464,6 +488,10 @@ msgstr ""
msgid "PgUp"
msgstr ""
+#: fpg_constants:rstabpredefined
+msgid "Predefined"
+msgstr ""
+
#: fpg_constants:rsreportpreview
msgid "Preview"
msgstr ""
@@ -472,6 +500,10 @@ msgstr ""
msgid "Recently Used"
msgstr "Usados Recientemente"
+#: fpg_constants:rscolorred
+msgid "Red"
+msgstr ""
+
#: fpg_constants:rsreplace
msgid "Replace"
msgstr "Reemplazar"
diff --git a/languages/fpgui.fr.po b/languages/fpgui.fr.po
index 9bbc641c..303891bb 100644
--- a/languages/fpgui.fr.po
+++ b/languages/fpgui.fr.po
@@ -76,6 +76,10 @@ msgstr "Août"
msgid "BkSp"
msgstr ""
+#: fpg_constants:rscolorblue
+msgid "Blue"
+msgstr ""
+
#: fpg_constants:rsbold
msgid "Bold"
msgstr "Gras"
@@ -100,6 +104,10 @@ msgstr "Changer le titre"
msgid "Character Map"
msgstr "Table de caractères"
+#: fpg_constants:rscolorpickerhint
+msgid "Click on Picker and maintain click => release to get the color"
+msgstr ""
+
#: fpg_constants:rsclose
msgid "Close"
msgstr "Fermer"
@@ -108,6 +116,10 @@ msgstr "Fermer"
msgid "Collection"
msgstr "Collection"
+#: fpg_constants:rstabsheetcolorwheel
+msgid "Color Wheel"
+msgstr ""
+
#: fpg_constants:rsconfigurebookmarks
msgid "Configure Bookmarks"
msgstr "Configurer les signets"
@@ -120,6 +132,10 @@ msgstr "Confirmer"
msgid "Confirmation"
msgstr "Confirmation"
+#: fpg_constants:rscontinuous
+msgid "Continuous"
+msgstr ""
+
#: fpg_constants:rscopy
msgid "Copy"
msgstr "Copier"
@@ -280,6 +296,10 @@ msgstr "Ven"
msgid "Friday"
msgstr "Vendredi"
+#: fpg_constants:rscolorgreen
+msgid "Green"
+msgstr ""
+
#: fpg_constants:rsfilegroup
msgid "Group"
msgstr "Groupe"
@@ -288,6 +308,10 @@ msgstr "Groupe"
msgid "Help"
msgstr "Aide"
+#: fpg_constants:rshexadecimal
+msgid "Hexadecimal"
+msgstr ""
+
#: fpg_constants:rskeyhome
msgid "Home"
msgstr ""
@@ -464,6 +488,10 @@ msgstr ""
msgid "PgUp"
msgstr ""
+#: fpg_constants:rstabpredefined
+msgid "Predefined"
+msgstr ""
+
#: fpg_constants:rsreportpreview
msgid "Preview"
msgstr "Prévisualisation"
@@ -472,6 +500,10 @@ msgstr "Prévisualisation"
msgid "Recently Used"
msgstr "Récemment utilisé"
+#: fpg_constants:rscolorred
+msgid "Red"
+msgstr ""
+
#: fpg_constants:rsreplace
msgid "Replace"
msgstr "Remplacer"
diff --git a/languages/fpgui.it.po b/languages/fpgui.it.po
index 9231802a..795ed273 100644
--- a/languages/fpgui.it.po
+++ b/languages/fpgui.it.po
@@ -76,6 +76,10 @@ msgstr "Agosto"
msgid "BkSp"
msgstr ""
+#: fpg_constants:rscolorblue
+msgid "Blue"
+msgstr ""
+
#: fpg_constants:rsbold
msgid "Bold"
msgstr "Grassetto"
@@ -100,6 +104,10 @@ msgstr ""
msgid "Character Map"
msgstr ""
+#: fpg_constants:rscolorpickerhint
+msgid "Click on Picker and maintain click => release to get the color"
+msgstr ""
+
#: fpg_constants:rsclose
msgid "Close"
msgstr "Chiudi"
@@ -108,6 +116,10 @@ msgstr "Chiudi"
msgid "Collection"
msgstr "Collezione"
+#: fpg_constants:rstabsheetcolorwheel
+msgid "Color Wheel"
+msgstr ""
+
#: fpg_constants:rsconfigurebookmarks
msgid "Configure Bookmarks"
msgstr ""
@@ -120,6 +132,10 @@ msgstr "Conferma"
msgid "Confirmation"
msgstr "Conferma"
+#: fpg_constants:rscontinuous
+msgid "Continuous"
+msgstr ""
+
#: fpg_constants:rscopy
msgid "Copy"
msgstr "Copia"
@@ -280,6 +296,10 @@ msgstr "Ven"
msgid "Friday"
msgstr "Venerdì"
+#: fpg_constants:rscolorgreen
+msgid "Green"
+msgstr ""
+
#: fpg_constants:rsfilegroup
msgid "Group"
msgstr "Gruppo"
@@ -288,6 +308,10 @@ msgstr "Gruppo"
msgid "Help"
msgstr "Aiuto"
+#: fpg_constants:rshexadecimal
+msgid "Hexadecimal"
+msgstr ""
+
#: fpg_constants:rskeyhome
msgid "Home"
msgstr ""
@@ -464,6 +488,10 @@ msgstr ""
msgid "PgUp"
msgstr ""
+#: fpg_constants:rstabpredefined
+msgid "Predefined"
+msgstr ""
+
#: fpg_constants:rsreportpreview
msgid "Preview"
msgstr ""
@@ -472,6 +500,10 @@ msgstr ""
msgid "Recently Used"
msgstr "Usati Recentemente"
+#: fpg_constants:rscolorred
+msgid "Red"
+msgstr ""
+
#: fpg_constants:rsreplace
msgid "Replace"
msgstr "Sostituisci"
diff --git a/languages/fpgui.po b/languages/fpgui.po
index d84c2be4..7ecf17b4 100644
--- a/languages/fpgui.po
+++ b/languages/fpgui.po
@@ -254,6 +254,10 @@ msgstr ""
msgid "Font Aliases"
msgstr ""
+#: fpg_constants:rserrreportfontfilemissing
+msgid "Font file <%s.fnt> not found"
+msgstr ""
+
#: fpg_constants:rsshortfri
msgid "Fri"
msgstr ""
@@ -278,6 +282,10 @@ msgstr ""
msgid "Ignore"
msgstr ""
+#: fpg_constants:rserrreportimagefilemissing
+msgid "Image <%s> is missing"
+msgstr ""
+
#: fpg_constants:rsinformation
msgid "Information"
msgstr ""
@@ -422,6 +430,14 @@ msgstr ""
msgid "Owner"
msgstr ""
+#: fpg_constants:rsfiletypepdf
+msgid "PDF Documents"
+msgstr ""
+
+#: fpg_constants:rsreportpage
+msgid "Page"
+msgstr ""
+
#: fpg_constants:rspassword
msgid "Password"
msgstr ""
@@ -438,6 +454,10 @@ msgstr ""
msgid "PgUp"
msgstr ""
+#: fpg_constants:rsreportpreview
+msgid "Preview"
+msgstr ""
+
#: fpg_constants:rscollectionrecentlyused
msgid "Recently Used"
msgstr ""
@@ -482,6 +502,10 @@ msgstr ""
msgid "Search"
msgstr ""
+#: fpg_constants:rsreportsection
+msgid "Section"
+msgstr ""
+
#: fpg_constants:rsselect
msgid "Select"
msgstr ""
@@ -542,6 +566,10 @@ msgstr ""
msgid "Text to Insert"
msgstr ""
+#: fpg_constants:rserrreportnopagestoprint
+msgid "There are no pages to print"
+msgstr ""
+
#: fpg_constants:rsshortthu
msgid "Thu"
msgstr ""
@@ -610,35 +638,39 @@ msgstr ""
msgid "Yes to All"
msgstr ""
-#: fpg_constants:rserrreportimagefilemissing
-msgid "Image <%s> is missing"
+#: fpg_constants:rsreportpageof
+msgid "of"
msgstr ""
-#: fpg_constants:rserrreportnopagestoprint
-msgid "There are no pages to print"
+#: fpg_constants:rscontinuous
+msgid "Continuous"
msgstr ""
-#: fpg_constants:rserrreportfontfilemissing
-msgid "Font file <%s.fnt> not found"
+#: fpg_constants:rscolorpickerhint
+msgid "Click on Picker and maintain click => release to get the color"
msgstr ""
-#: fpg_constants:rsfiletypepdf
-msgid "PDF Documents"
+#: fpg_constants:rscolorred
+msgid "Red"
msgstr ""
-#: fpg_constants:rsreportpage
-msgid "Page"
+#: fpg_constants:rscolorgreen
+msgid "Green"
msgstr ""
-#: fpg_constants:rsreportsection
-msgid "Section"
+#: fpg_constants:rscolorblue
+msgid "Blue"
msgstr ""
-#: fpg_constants:rsreportpageof
-msgid "of"
+#: fpg_constants:rshexadecimal
+msgid "Hexadecimal"
msgstr ""
-#: fpg_constants:rsreportpreview
-msgid "Preview"
+#: fpg_constants:rstabsheetcolorwheel
+msgid "Color Wheel"
+msgstr ""
+
+#: fpg_constants:rstabpredefined
+msgid "Predefined"
msgstr ""
diff --git a/languages/fpgui.pt.po b/languages/fpgui.pt.po
index ab5cddb2..e3ea6725 100644
--- a/languages/fpgui.pt.po
+++ b/languages/fpgui.pt.po
@@ -76,6 +76,10 @@ msgstr "Agosto"
msgid "BkSp"
msgstr ""
+#: fpg_constants:rscolorblue
+msgid "Blue"
+msgstr ""
+
#: fpg_constants:rsbold
msgid "Bold"
msgstr "Negrito"
@@ -100,6 +104,10 @@ msgstr "Mudar Título"
msgid "Character Map"
msgstr "Mapa de Caracteres"
+#: fpg_constants:rscolorpickerhint
+msgid "Click on Picker and maintain click => release to get the color"
+msgstr ""
+
#: fpg_constants:rsclose
msgid "Close"
msgstr "Fechar"
@@ -108,6 +116,10 @@ msgstr "Fechar"
msgid "Collection"
msgstr "Coleção"
+#: fpg_constants:rstabsheetcolorwheel
+msgid "Color Wheel"
+msgstr ""
+
#: fpg_constants:rsconfigurebookmarks
msgid "Configure Bookmarks"
msgstr ""
@@ -120,6 +132,10 @@ msgstr "Confirmar"
msgid "Confirmation"
msgstr "Confirmação"
+#: fpg_constants:rscontinuous
+msgid "Continuous"
+msgstr ""
+
#: fpg_constants:rscopy
msgid "Copy"
msgstr "Copiar"
@@ -280,6 +296,10 @@ msgstr "Sex"
msgid "Friday"
msgstr "Sexta-feira"
+#: fpg_constants:rscolorgreen
+msgid "Green"
+msgstr ""
+
#: fpg_constants:rsfilegroup
msgid "Group"
msgstr "Grupo"
@@ -288,6 +308,10 @@ msgstr "Grupo"
msgid "Help"
msgstr "Ajuda"
+#: fpg_constants:rshexadecimal
+msgid "Hexadecimal"
+msgstr ""
+
#: fpg_constants:rskeyhome
msgid "Home"
msgstr ""
@@ -464,6 +488,10 @@ msgstr ""
msgid "PgUp"
msgstr ""
+#: fpg_constants:rstabpredefined
+msgid "Predefined"
+msgstr ""
+
#: fpg_constants:rsreportpreview
msgid "Preview"
msgstr ""
@@ -472,6 +500,10 @@ msgstr ""
msgid "Recently Used"
msgstr "Recentemente Usado"
+#: fpg_constants:rscolorred
+msgid "Red"
+msgstr ""
+
#: fpg_constants:rsreplace
msgid "Replace"
msgstr "Substituir"
diff --git a/languages/fpgui.ru.po b/languages/fpgui.ru.po
index 7cf1cc80..2b501756 100644
--- a/languages/fpgui.ru.po
+++ b/languages/fpgui.ru.po
@@ -30,7 +30,7 @@ msgstr "Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ %s"
#: fpg_constants:rsaddcurrentdirectory
msgid "Add current directory"
-msgstr ""
+msgstr "Добавить текущую директорию"
#: fpg_constants:rsall
msgid "All"
@@ -76,6 +76,10 @@ msgstr "ÐвгуÑÑ‚"
msgid "BkSp"
msgstr ""
+#: fpg_constants:rscolorblue
+msgid "Blue"
+msgstr "Синий"
+
#: fpg_constants:rsbold
msgid "Bold"
msgstr "Жирный"
@@ -94,12 +98,16 @@ msgstr "Изменить"
#: fpg_constants:rschangetitle
msgid "Change Title"
-msgstr ""
+msgstr "Изменить Заголовок"
#: fpg_constants:rscharactermap
msgid "Character Map"
msgstr ""
+#: fpg_constants:rscolorpickerhint
+msgid "Click on Picker and maintain click => release to get the color"
+msgstr ""
+
#: fpg_constants:rsclose
msgid "Close"
msgstr "Закрыть"
@@ -108,9 +116,13 @@ msgstr "Закрыть"
msgid "Collection"
msgstr "Группа"
+#: fpg_constants:rstabsheetcolorwheel
+msgid "Color Wheel"
+msgstr ""
+
#: fpg_constants:rsconfigurebookmarks
msgid "Configure Bookmarks"
-msgstr ""
+msgstr "ÐаÑтроить Закладки"
#: fpg_constants:rsconfirm
msgid "Confirm"
@@ -120,6 +132,10 @@ msgstr "Подтвердить"
msgid "Confirmation"
msgstr "Подтверждение"
+#: fpg_constants:rscontinuous
+msgid "Continuous"
+msgstr ""
+
#: fpg_constants:rscopy
msgid "Copy"
msgstr "Копировать"
@@ -174,7 +190,7 @@ msgstr "Директории"
#: fpg_constants:rsdirectory
msgid "Directory"
-msgstr ""
+msgstr "ДиректориÑ"
#: fpg_constants:rskeydown
msgid "Down"
@@ -270,7 +286,7 @@ msgstr "ПÑевдонимы шрифтов"
#: fpg_constants:rserrreportfontfilemissing
msgid "Font file <%s.fnt> not found"
-msgstr ""
+msgstr "Файл шрифта <%s.fnt> не найден"
#: fpg_constants:rsshortfri
msgid "Fri"
@@ -280,6 +296,10 @@ msgstr "Пт"
msgid "Friday"
msgstr "ПÑтница"
+#: fpg_constants:rscolorgreen
+msgid "Green"
+msgstr ""
+
#: fpg_constants:rsfilegroup
msgid "Group"
msgstr "Группа"
@@ -288,6 +308,10 @@ msgstr "Группа"
msgid "Help"
msgstr "Справка"
+#: fpg_constants:rshexadecimal
+msgid "Hexadecimal"
+msgstr ""
+
#: fpg_constants:rskeyhome
msgid "Home"
msgstr ""
@@ -298,7 +322,7 @@ msgstr "ПропуÑтить"
#: fpg_constants:rserrreportimagefilemissing
msgid "Image <%s> is missing"
-msgstr ""
+msgstr "Изображение <%s> не найдено"
#: fpg_constants:rsinformation
msgid "Information"
@@ -442,7 +466,7 @@ msgstr "Владелец"
#: fpg_constants:rsfiletypepdf
msgid "PDF Documents"
-msgstr ""
+msgstr "PDF Документы"
#: fpg_constants:rsreportpage
msgid "Page"
@@ -464,6 +488,10 @@ msgstr ""
msgid "PgUp"
msgstr ""
+#: fpg_constants:rstabpredefined
+msgid "Predefined"
+msgstr ""
+
#: fpg_constants:rsreportpreview
msgid "Preview"
msgstr ""
@@ -472,6 +500,10 @@ msgstr ""
msgid "Recently Used"
msgstr "Ранее иÑпользованные"
+#: fpg_constants:rscolorred
+msgid "Red"
+msgstr ""
+
#: fpg_constants:rsreplace
msgid "Replace"
msgstr "Заменить"
@@ -578,7 +610,7 @@ msgstr ""
#: fpg_constants:rserrreportnopagestoprint
msgid "There are no pages to print"
-msgstr ""
+msgstr "Ðет Ñтраниц Ð´Ð»Ñ Ð¿ÐµÑ‡Ð°Ñ‚Ð¸"
#: fpg_constants:rsshortthu
msgid "Thu"
diff --git a/src/VERSION_FILE.inc b/src/VERSION_FILE.inc
index b47293e2..518bafb7 100644
--- a/src/VERSION_FILE.inc
+++ b/src/VERSION_FILE.inc
@@ -1 +1 @@
-FPGUI_VERSION = '1.1';
+FPGUI_VERSION = '1.3';
diff --git a/src/corelib/fpg_base.pas b/src/corelib/fpg_base.pas
index 18333335..e6e3ab7e 100644
--- a/src/corelib/fpg_base.pas
+++ b/src/corelib/fpg_base.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -121,6 +121,8 @@ const
FPGM_FREEME = 19;
FPGM_DROPENTER = 20;
FPGM_DROPEXIT = 21;
+ FPGM_HSCROLL = 22;
+ FPGM_ABOUT = 23;
FPGM_USER = 50000;
FPGM_KILLME = MaxInt;
@@ -137,6 +139,7 @@ var
FPG_DEFAULT_FONT_DESC: string = 'Liberation Sans-10:antialias=true';
FPG_DEFAULT_SANS: string = 'Liberation Sans';
{$ENDIF}
+ FPG_DEFAULT_FIXED_FONT_DESC: string = 'Courier New-10';
const
UserNamedColorStart = 128;
@@ -574,6 +577,7 @@ type
procedure CreateForm(InstanceClass: TComponentClass; out Reference);
function GetScreenWidth: TfpgCoord; virtual; abstract;
function GetScreenHeight: TfpgCoord; virtual; abstract;
+ function GetScreenPixelColor(APos: TPoint): TfpgColor; virtual; abstract;
function Screen_dpi_x: integer; virtual; abstract;
function Screen_dpi_y: integer; virtual; abstract;
function Screen_dpi: integer; virtual; abstract;
@@ -726,8 +730,8 @@ type
destructor Destroy; override;
function Execute(const ADropActions: TfpgDropActions; const ADefaultAction: TfpgDropAction = daCopy): TfpgDropAction; virtual; abstract;
end;
-
-
+
+
{ TfpgBaseTimer }
TfpgBaseTimer = class(TObject)
@@ -1744,6 +1748,9 @@ begin
else
count := ARect.Right - ARect.Left;
+ if count < 1 then
+ Exit; // there is nothing to paint
+
RDiff := RGBStop.Red - RGBStart.Red;
GDiff := RGBStop.Green - RGBStart.Green;
BDiff := RGBStop.Blue - RGBStart.Blue;
@@ -2104,7 +2111,7 @@ end;
procedure TfpgBaseInterpolation.Execute(x, y, w, h: integer);
begin
- tempimage := TfpgImageBase.Create;
+ tempimage := TfpgImage.Create;
tempimage.AllocateImage(image.ColorDepth, w, image.Height);
xfactor := image.Width / w;
@@ -2180,7 +2187,7 @@ begin
p := FImageData;
Inc(p, (FWidth * y) + x);
p^ := AValue;
-// write(IntToHex(AValue, 6) + ' ');
+// write(IntToHex(AValue, 8) + ' ');
end;
constructor TfpgImageBase.Create;
@@ -2245,7 +2252,7 @@ begin
FMasked := False;
FWidth := 0;
FHeight := 0;
-// DoFreeImage;
+ DoFreeImage;
end;
procedure TfpgImageBase.AllocateImage(acolordepth, awidth, aheight: integer);
@@ -2731,7 +2738,7 @@ var
e: TFileEntry;
begin
e := TFileEntry.Create;
- e.Name := fpgFromOSEncoding(sr.Name);
+ e.Name := sr.Name;
e.Extension := fpgExtractFileExt(e.Name);
e.Size := sr.Size;
// e.Attributes := sr.Attr; // this is incorrect and needs to improve!
diff --git a/src/corelib/fpg_constants.pas b/src/corelib/fpg_constants.pas
index 37b3f135..60bd18e7 100644
--- a/src/corelib/fpg_constants.pas
+++ b/src/corelib/fpg_constants.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
diff --git a/src/corelib/fpg_csvparser.pas b/src/corelib/fpg_csvparser.pas
new file mode 100644
index 00000000..f5c0d0ed
--- /dev/null
+++ b/src/corelib/fpg_csvparser.pas
@@ -0,0 +1,320 @@
+{
+ fpGUI - Free Pascal GUI Toolkit
+
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
+ distribution, for details of the copyright.
+
+ See the file COPYING.modifiedLGPL, included in this distribution,
+ for details about redistributing fpGUI.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ Description:
+ Uses a Finite State Machine to parse CSV files.
+ Graeme Geldenhuys <graemeg@gmail.com>
+
+ This unit shows how one could use the State Design Pattern to implement a
+ FSM (Finite State Machine) to create a CSV Parser. It handles invalid
+ CSV as well and will raise an appropriate exception. In the State pattern,
+ each of the states becomes a subclass of the base class. Each subclass must
+ implement the abstract method which will handle the input character and
+ decide on the next state.
+}
+
+unit fpg_CSVParser;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes;
+
+type
+ { forward declarations }
+ TCSVParser = class;
+ TParserStateClass = class of TCSVParserState;
+
+
+ { Abstract State object }
+ TCSVParserState = class(TObject)
+ private
+ FParser: TCSVParser;
+ procedure ChangeState(NewState: TParserStateClass);
+ procedure AddCharToCurrField(Ch: char);
+ procedure AddCurrFieldToList;
+ public
+ constructor Create(AParser: TCSVParser);
+ { Must be implemented in the concrete classes to handle the input character
+ and decide on the next state. }
+ procedure ProcessChar(Ch: AnsiChar; Pos: integer); virtual; abstract;
+ end;
+
+
+ { A concrete state object - used when starting a new field }
+ TCSVParserFieldStartState = class(TCSVParserState)
+ public
+ procedure ProcessChar(Ch: AnsiChar; Pos: integer); override;
+ end;
+
+
+ { A concrete state object - used while scanning a field }
+ TCSVParserScanFieldState = class(TCSVParserState)
+ public
+ procedure ProcessChar(Ch: AnsiChar; Pos: integer); override;
+ end;
+
+
+ { A concrete state object - used while scanning double quoted fields }
+ TCSVParserScanQuotedState = class(TCSVParserState)
+ public
+ procedure ProcessChar(Ch: AnsiChar; Pos: integer); override;
+ end;
+
+
+ { A concrete state object - used when found the ending double quote }
+ TCSVParserEndQuotedState = class(TCSVParserState)
+ public
+ procedure ProcessChar(Ch: AnsiChar; Pos: integer); override;
+ end;
+
+
+ { A concrete state object - some error occured / invalid CSV structure }
+ TCSVParserGotErrorState = class(TCSVParserState)
+ public
+ procedure ProcessChar(Ch: AnsiChar; Pos: integer); override;
+ end;
+
+
+ { The actual state machine - CSV parser }
+ TCSVParser = class(TObject)
+ private
+ FCurrentLine: string;
+ FState: TCSVParserState;
+ { Cache state objects for greater performance. This comes in handy when
+ parsing a large CSV file. For smaller files you might want to create them
+ on the fly. }
+ FFieldStartState: TCSVParserFieldStartState;
+ FScanFieldState: TCSVParserScanFieldState;
+ FScanQuotedState: TCSVParserScanQuotedState;
+ FEndQuotedState: TCSVParserEndQuotedState;
+ FGotErrorState: TCSVParserGotErrorState;
+ { Fields used during parsing }
+ FCurrField: string;
+ FFieldList: TStrings;
+ function GetState: TParserStateClass;
+ procedure SetState(const Value: TParserStateClass);
+ protected
+ procedure AddCharToCurrField(Ch: char);
+ procedure AddCurrFieldToList;
+ { An example of Self Encapsulating Field refactoring }
+ property State: TParserStateClass read GetState write SetState;
+ public
+ constructor Create;
+ destructor Destroy; override;
+ { prodecure to call, to start the parsing process }
+ procedure ExtractFields(const S: string; const pFieldList: TStrings);
+ property CurrentLine: string read FCurrentLine;
+ end;
+
+
+// global singleton function
+function gCSVParser: TCSVParser;
+
+
+implementation
+
+uses
+ SysUtils;
+
+var
+ uCSVParser: TCSVParser;
+
+
+// Lazy mans singleton
+function gCSVParser: TCSVParser;
+begin
+ if uCSVParser = nil then
+ uCSVParser := TCSVParser.Create;
+ Result := uCSVParser;
+end;
+
+{ TCSVParser }
+
+constructor TCSVParser.Create;
+begin
+ inherited Create;
+ FCurrentLine := '';
+ FFieldStartState := TCSVParserFieldStartState.Create(Self);
+ FScanFieldState := TCSVParserScanFieldState.Create(Self);
+ FScanQuotedState := TCSVParserScanQuotedState.Create(Self);
+ FEndQuotedState := TCSVParserEndQuotedState.Create(Self);
+ FGotErrorState := TCSVParserGotErrorState.Create(Self);
+end;
+
+destructor TCSVParser.Destroy;
+begin
+ FFieldStartState.Free;
+ FScanFieldState.Free;
+ FScanQuotedState.Free;
+ FEndQuotedState.Free;
+ FGotErrorState.Free;
+ inherited;
+end;
+
+function TCSVParser.GetState: TParserStateClass;
+begin
+ Result := TParserStateClass(FState.ClassType);
+end;
+
+procedure TCSVParser.SetState(const Value: TParserStateClass);
+begin
+ if Value = TCSVParserFieldStartState then
+ FState := FFieldStartState
+ else if Value = TCSVParserScanFieldState then
+ FState := FScanFieldState
+ else if Value = TCSVParserScanQuotedState then
+ FState := FScanQuotedState
+ else if Value = TCSVParserEndQuotedState then
+ FState := FEndQuotedState
+ else if Value = TCSVParserGotErrorState then
+ FState := FGotErrorState;
+end;
+
+procedure TCSVParser.ExtractFields(const S: string; const pFieldList: TStrings);
+var
+ i: integer;
+ Ch: AnsiChar;
+begin
+ FCurrentLine := S;
+ FFieldList := pFieldList;
+ Assert(Assigned(FFieldList), 'FieldList not assigned');
+ { Initialize by clearing the string list, and starting in FieldStart state }
+ FFieldList.Clear;
+ State := TCSVParserFieldStartState;
+ FCurrField := '';
+
+ { Read through all the characters in the string }
+ for i := 1 to Length(s) do
+ begin
+ { Get the next character }
+ Ch := s[i];
+ FState.ProcessChar(Ch, i);
+ end;
+
+ { If we are in the ScanQuoted or GotError state at the end of the string,
+ there was a problem with a closing quote. You can add the second if test
+ for an extra failsafe! }
+ if (State = TCSVParserScanQuotedState) then
+ // or (State = TCSVParserGotErrorState) then
+ raise Exception.Create('Missing closing quote');
+
+ { If the current field is not empty, add it to the list }
+ if (FCurrField <> '') then
+ AddCurrFieldToList;
+end;
+
+procedure TCSVParser.AddCharToCurrField(Ch: char);
+begin
+ FCurrField := FCurrField + Ch;
+end;
+
+procedure TCSVParser.AddCurrFieldToList;
+begin
+ FFieldList.Add(FCurrField);
+ // Clear the field in preparation for collecting the next one
+ FCurrField := '';
+end;
+
+{ TCSVParserState }
+
+constructor TCSVParserState.Create(AParser: TCSVParser);
+begin
+ inherited Create;
+ FParser := AParser;
+end;
+
+procedure TCSVParserState.ChangeState(NewState: TParserStateClass);
+begin
+ FParser.State := NewState;
+end;
+
+procedure TCSVParserState.AddCharToCurrField(Ch: char);
+begin
+ FParser.AddCharToCurrField(Ch);
+end;
+
+procedure TCSVParserState.AddCurrFieldToList;
+begin
+ FParser.AddCurrFieldToList;
+end;
+
+{ TCSVParserFieldStartState }
+
+procedure TCSVParserFieldStartState.ProcessChar(Ch: AnsiChar; Pos: integer);
+begin
+ case Ch of
+ '"': ChangeState(TCSVParserScanQuotedState);
+ ',': AddCurrFieldToList;
+ else
+ AddCharToCurrField(Ch);
+ ChangeState(TCSVParserScanFieldState);
+ end;
+end;
+
+{ TCSVParserScanFieldState }
+
+procedure TCSVParserScanFieldState.ProcessChar(Ch: AnsiChar; Pos: integer);
+begin
+ if (Ch = ',') then
+ begin
+ AddCurrFieldToList;
+ ChangeState(TCSVParserFieldStartState);
+ end
+ else
+ AddCharToCurrField(Ch);
+end;
+
+{ TCSVParserScanQuotedState }
+
+procedure TCSVParserScanQuotedState.ProcessChar(Ch: AnsiChar; Pos: integer);
+begin
+ if (Ch = '"') then
+ ChangeState(TCSVParserEndQuotedState)
+ else
+ AddCharToCurrField(Ch);
+end;
+
+{ TCSVParserEndQuotedState }
+
+procedure TCSVParserEndQuotedState.ProcessChar(Ch: AnsiChar; Pos: integer);
+begin
+ if (Ch = ',') then
+ begin
+ AddCurrFieldToList;
+ ChangeState(TCSVParserFieldStartState);
+ end
+ else
+ ChangeState(TCSVParserGotErrorState);
+end;
+
+{ TCSVParserGotErrorState }
+
+procedure TCSVParserGotErrorState.ProcessChar(Ch: AnsiChar; Pos: integer);
+begin
+ raise Exception.Create(Format('Error in line at position %d: ' + #10 +
+ '<%s>', [Pos, FParser.CurrentLine]));
+end;
+
+
+initialization
+ uCSVParser := nil;
+
+finalization
+ if uCSVParser <> nil then
+ uCSVParser.Free;
+
+end.
+
diff --git a/src/corelib/fpg_imgfmt_bmp.pas b/src/corelib/fpg_imgfmt_bmp.pas
index 00637f3b..fe827405 100644
--- a/src/corelib/fpg_imgfmt_bmp.pas
+++ b/src/corelib/fpg_imgfmt_bmp.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -64,7 +64,7 @@ begin
if not fpgFileExists(AFileName) then
Exit; //==>
- AssignFile(AFile, AFileName);
+ AssignFile(AFile, fpgToOSEncoding(AFileName));
FileMode := fmOpenRead; // read-only
Reset(AFile);
AImageDataSize := FileSize(AFile);
diff --git a/src/corelib/fpg_imgfmt_jpg.pas b/src/corelib/fpg_imgfmt_jpg.pas
index 33704643..4fe67692 100644
--- a/src/corelib/fpg_imgfmt_jpg.pas
+++ b/src/corelib/fpg_imgfmt_jpg.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -34,10 +34,11 @@ type
EJPEG = class(Exception);
procedure ReadImage_JPG(img: TfpgImage; bmp: TStream; const AScale: integer = 1);
-function LoadImage_JPG(const AFileName: String; const AScale: integer = 1): TfpgImage;
+function LoadImage_JPG(const AFileName: TfpgString; const AScale: integer = 1): TfpgImage;
implementation
uses
+ fpg_utils,
{PASJPG10 library}
jmorecfg,
jpeglib,
@@ -360,21 +361,21 @@ begin
img.UpdateImage;
end;
-function LoadImage_JPG(const AFileName: String; const AScale: integer): TfpgImage;
+function LoadImage_JPG(const AFileName: TfpgString; const AScale: integer): TfpgImage;
var
inFile: TStream;
begin
Result := nil;
- if not FileExists(AFileName) then
+ if not fpgFileExists(AFileName) then
Exit; //==>
- inFile:=TFileStream.Create(AFileName,fmOpenRead);
- try
- Result:=TfpgImage.Create;
- ReadImage_JPG(Result, inFile, AScale);
- finally
- inFile.Free;
- end;
+ inFile := TFileStream.Create(fpgToOSEncoding(AFileName), fmOpenRead);
+ try
+ Result := TfpgImage.Create;
+ ReadImage_JPG(Result, inFile, AScale);
+ finally
+ inFile.Free;
+ end;
end;
diff --git a/src/corelib/fpg_imgfmt_png.pas b/src/corelib/fpg_imgfmt_png.pas
index d9683bbe..3148a5b4 100644
--- a/src/corelib/fpg_imgfmt_png.pas
+++ b/src/corelib/fpg_imgfmt_png.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -78,7 +78,7 @@ begin
try
PNGReader := TFPReaderPNG.Create;
try
- imga.LoadFromFile(AFileName, PNGReader); // auto size image
+ imga.LoadFromFile(fpgToOSEncoding(AFileName), PNGReader); // auto size image
finally
PNGReader.Free;
end;
@@ -165,7 +165,7 @@ begin
// Calculated to fit the image within required size: xlocal, ylocal
imga := TFPMemoryImage.Create(0, 0);
try
- imga.LoadFromFile(AFileName, TFPReaderPNG.Create); // auto size image
+ imga.LoadFromFile(fpgToOSEncoding(AFileName), TFPReaderPNG.Create); // auto size image
except
imga := nil;
imgb := nil;
diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas
index df9a78e7..d74a9be4 100644
--- a/src/corelib/fpg_main.pas
+++ b/src/corelib/fpg_main.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -51,7 +51,7 @@ type
TfpgMenuItemFlags = set of (mifSelected, mifHasFocus, mifSeparator,
mifEnabled, mifChecked, mifSubMenu);
-
+
TfpgTextFlags = set of (txtLeft, txtHCenter, txtRight, txtTop, txtVCenter,
txtBottom, txtWrap, txtDisabled, txtAutoSize);
@@ -62,7 +62,7 @@ type
const
AllAnchors = [anLeft, anRight, anTop, anBottom];
TextFlagsDflt = [txtLeft, txtTop];
-
+
type
{ *******************************************
@@ -183,6 +183,7 @@ type
function DrawText(x, y, w, h: TfpgCoord; const AText: TfpgString; AFlags: TfpgTextFlags = TextFlagsDflt; ALineSpace: integer = 2): integer; overload;
function DrawText(x, y: TfpgCoord; const AText: TfpgString; AFlags: TfpgTextFlags = TextFlagsDflt; ALineSpace: integer = 2): integer; overload;
function DrawText(r: TfpgRect; const AText: TfpgString; AFlags: TfpgTextFlags = TextFlagsDflt; ALineSpace: integer = 2): integer; overload;
+ property Window: TfpgWindowBase read FWindow;
end;
@@ -190,19 +191,32 @@ type
will rework this to use a Style Manager like the previous fpGUI.
Also support Bitmap based styles for easier theme implementations. }
TfpgStyle = class(TObject)
+ protected
+ FDefaultFont: TfpgFont;
+ FFixedFont: TfpgFont;
+ FMenuAccelFont: TfpgFont;
+ FMenuDisabledFont: TfpgFont;
+ FMenuFont: TfpgFont;
+ procedure SetDefaultFont(AValue: TfpgFont);
+ procedure SetFixedFont(AValue: TfpgFont);
+ procedure SetMenuAccelFont(AValue: TfpgFont);
+ procedure SetMenuDisabledFont(AValue: TfpgFont);
+ procedure SetMenuFont(AValue: TfpgFont);
public
- DefaultFont: TfpgFont;
- FixedFont: TfpgFont;
- MenuFont: TfpgFont;
- MenuAccelFont: TfpgFont;
- MenuDisabledFont: TfpgFont;
constructor Create; virtual;
destructor Destroy; override;
+ { font objects }
+ property DefaultFont: TfpgFont read FDefaultFont write SetDefaultFont;
+ property FixedFont: TfpgFont read FFixedFont write SetFixedFont;
+ property MenuFont: TfpgFont read FMenuFont write SetMenuFont;
+ property MenuAccelFont: TfpgFont read FMenuAccelFont write SetMenuAccelFont;
+ property MenuDisabledFont: TfpgFont read FMenuDisabledFont write SetMenuDisabledFont;
{ General }
procedure DrawControlFrame(ACanvas: TfpgCanvas; x, y, w, h: TfpgCoord); virtual; overload;
procedure DrawControlFrame(ACanvas: TfpgCanvas; r: TfpgRect); overload;
function GetControlFrameBorders: TRect; virtual;
procedure DrawBevel(ACanvas: TfpgCanvas; x, y, w, h: TfpgCoord; ARaised: Boolean = True); virtual;
+ function GetBevelWidth: TfpgCoord; virtual;
procedure DrawDirectionArrow(ACanvas: TfpgCanvas; x, y, w, h: TfpgCoord; direction: TArrowDirection); virtual;
procedure DrawString(ACanvas: TfpgCanvas; x, y: TfpgCoord; AText: string; AEnabled: boolean = True); virtual;
procedure DrawFocusRect(ACanvas: TfpgCanvas; r: TfpgRect); virtual;
@@ -228,7 +242,7 @@ type
function GetCheckBoxSize: integer; virtual;
procedure DrawCheckbox(ACanvas: TfpgCanvas; x, y: TfpgCoord; ix, iy: TfpgCoord); virtual;
end;
-
+
TMsgHookItem = class
Dest: TObject;
@@ -326,12 +340,12 @@ type
property Width: integer read FWidth;
property Height: integer read FHeight;
end;
-
-
+
+
TfpgClipboard = class(TfpgClipboardImpl)
end;
-
+
TfpgFileList = class(TfpgFileListImpl)
end;
@@ -508,7 +522,7 @@ type
end;
- TNamedFontItem = class
+ TNamedFontItem = class(TObject)
public
FontID: string;
FontDesc: string;
@@ -1295,7 +1309,7 @@ begin
Result := TStringList.Create
else
Exit; //==>
-
+
for n := 0 to fpgNamedFonts.Count-1 do
begin
oFont := TNamedFontItem(fpgNamedFonts[n]);
@@ -1364,7 +1378,7 @@ begin
fpgStyleManager.FreeStyleInstance;
fpgStyle := nil;
fpgCaret.Free;
-
+
for i := fpgTimers.Count-1 downto 0 do
if fpgTimers[i] <> nil then
TfpgTimer(fpgTimers[i]).Free;
@@ -1380,7 +1394,7 @@ begin
FFontResList.Free;
FreeAndNil(FModalFormStack);
-
+
for i := 0 to FMessageHookList.Count-1 do
TMsgHookItem(FMessageHookList[i]).Free;
FreeAndNil(FMessageHookList);
@@ -1391,7 +1405,7 @@ begin
uMsgQueueList.Delete(i);
end;
uMsgQueueList.Free;
-
+
inherited Destroy;
end;
@@ -1502,7 +1516,7 @@ begin
ShortDayNames[5] := rsShortThu;
ShortDayNames[6] := rsShortFri;
ShortDayNames[7] := rsShortSat;
-
+
LongDayNames[1] := rsLongSun;
LongDayNames[2] := rsLongMon;
LongDayNames[3] := rsLongTue;
@@ -1936,10 +1950,10 @@ begin
end;
end;
nw := Max(wtxt, w);
-
+
wraplst := TStringList.Create;
wraplst.Text := AText;
-
+
if (txtWrap in AFlags) then
begin
for i := 0 to wraplst.Count-1 do
@@ -1949,7 +1963,7 @@ begin
end;
htxt := (Font.Height * wraplst.Count) + (ALineSpace * Pred(wraplst.Count));
-
+
// Now paint the actual text
for i := 0 to wraplst.Count-1 do
begin
@@ -1964,7 +1978,7 @@ begin
nx := x + (w - wtxt) div 2
else // txtLeft is default
nx := x;
-
+
// vertical alignment
if (txtBottom in AFlags) then
ny := y + l + h - htxt
@@ -1975,7 +1989,7 @@ begin
fpgStyle.DrawString(self, nx, ny, wraplst[i], lEnabled);
end;
-
+
wraplst.Free;
Result := htxt;
end;
@@ -2050,13 +2064,48 @@ end;
{ TfpgStyle }
+procedure TfpgStyle.SetDefaultFont(AValue: TfpgFont);
+begin
+ if FDefaultFont = AValue then Exit;
+ FDefaultFont.Free;
+ FDefaultFont := AValue;
+end;
+
+procedure TfpgStyle.SetFixedFont(AValue: TfpgFont);
+begin
+ if FFixedFont = AValue then Exit;
+ FFixedFont.Free;
+ FFixedFont := AValue;
+end;
+
+procedure TfpgStyle.SetMenuAccelFont(AValue: TfpgFont);
+begin
+ if FMenuAccelFont = AValue then Exit;
+ FMenuAccelFont.Free;
+ FMenuAccelFont := AValue;
+end;
+
+procedure TfpgStyle.SetMenuDisabledFont(AValue: TfpgFont);
+begin
+ if FMenuDisabledFont = AValue then Exit;
+ FMenuDisabledFont.Free;
+ FMenuDisabledFont := AValue;
+end;
+
+procedure TfpgStyle.SetMenuFont(AValue: TfpgFont);
+begin
+ if FMenuFont = AValue then Exit;
+ FMenuFont.Free;
+ FMenuFont := AValue;
+end;
+
constructor TfpgStyle.Create;
begin
// Setup font aliases
fpgSetNamedFont('Label1', FPG_DEFAULT_FONT_DESC);
fpgSetNamedFont('Label2', FPG_DEFAULT_FONT_DESC + ':bold');
fpgSetNamedFont('Edit1', FPG_DEFAULT_FONT_DESC);
- fpgSetNamedFont('Edit2', 'Courier New-10');
+ fpgSetNamedFont('Edit2', FPG_DEFAULT_FIXED_FONT_DESC);
fpgSetNamedFont('List', FPG_DEFAULT_FONT_DESC);
fpgSetNamedFont('Grid', FPG_DEFAULT_SANS + '-9');
fpgSetNamedFont('GridHeader', FPG_DEFAULT_SANS + '-9:bold');
@@ -2102,20 +2151,20 @@ begin
// Global Font Objects
- DefaultFont := fpgGetFont(fpgGetNamedFontDesc('Label1'));
- FixedFont := fpgGetFont(fpgGetNamedFontDesc('Edit2'));
- MenuFont := fpgGetFont(fpgGetNamedFontDesc('Menu'));
- MenuAccelFont := fpgGetFont(fpgGetNamedFontDesc('MenuAccel'));
- MenuDisabledFont := fpgGetFont(fpgGetNamedFontDesc('MenuDisabled'));
+ FDefaultFont := fpgGetFont(fpgGetNamedFontDesc('Label1'));
+ FFixedFont := fpgGetFont(fpgGetNamedFontDesc('Edit2'));
+ FMenuFont := fpgGetFont(fpgGetNamedFontDesc('Menu'));
+ FMenuAccelFont := fpgGetFont(fpgGetNamedFontDesc('MenuAccel'));
+ FMenuDisabledFont := fpgGetFont(fpgGetNamedFontDesc('MenuDisabled'));
end;
destructor TfpgStyle.Destroy;
begin
- DefaultFont.Free;
- FixedFont.Free;
- MenuFont.Free;
- MenuAccelFont.Free;
- MenuDisabledFont.Free;
+ FDefaultFont.Free;
+ FFixedFont.Free;
+ FMenuFont.Free;
+ FMenuAccelFont.Free;
+ FMenuDisabledFont.Free;
inherited Destroy;
end;
@@ -2148,17 +2197,17 @@ begin
if (btfIsPressed in AFlags) then
begin
if (btfIsEmbedded in AFlags) then
- ACanvas.SetColor(clHilite2)
+ ACanvas.SetColor(clShadow1)
else
begin
if (btfFlat in AFlags) or (btfHover in AFlags) then
ACanvas.SetColor(clShadow1) { light shadow }
else
- ACanvas.SetColor(clShadow2); { dark shadow }
+ ACanvas.SetColor(clShadow1); { light shadow }
end;
end
else
- ACanvas.SetColor(clHilite2);
+ ACanvas.SetColor(clHilite2); { white }
ACanvas.DrawLine(r.Left, r.Bottom, r.Left, r.Top); // left
ACanvas.DrawLine(r.Left, r.Top, r.Right, r.Top); // top
@@ -2167,13 +2216,13 @@ begin
if (btfIsPressed in AFlags) then
begin
if (btfIsEmbedded in AFlags) then
- ACanvas.SetColor(clHilite1)
+ ACanvas.SetColor(clShadow1)
else
begin
if (btfFlat in AFlags) or (btfHover in AFlags) then
- ACanvas.SetColor(clHilite2) { light shadow }
+ ACanvas.SetColor(clHilite2) { white }
else
- ACanvas.SetColor(clShadow2); { dark shadow }
+ ACanvas.SetColor(clHilite2); { white }
end;
end
else
@@ -2190,13 +2239,24 @@ begin
if (btfFlat in AFlags) or (btfHover in AFlags) then
exit; { "toolbar" style buttons need a nice thin/flat border }
+ // Left and Top (inner)
+ if btfIsPressed in AFlags then
+ begin
+ if not (btfIsEmbedded in AFlags) then
+ begin
+ ACanvas.SetColor(clShadow2); { dark shadow }
+ ACanvas.DrawLine(r.Left+1, r.Bottom-1, r.Left+1, r.Top+1); // left
+ ACanvas.DrawLine(r.Left+1, r.Top+1, r.Right-1, r.Top+1); // top
+ end;
+ end;
+
// Right and Bottom (inner)
if btfIsPressed in AFlags then
begin
if (btfIsEmbedded in AFlags) then
ACanvas.SetColor(clButtonFace)
else
- ACanvas.SetColor(clHilite1);
+ ACanvas.SetColor(clButtonFace);
end
else
ACanvas.SetColor(clShadow1);
@@ -2245,7 +2305,7 @@ begin
ACanvas.SetColor(clWindowBackground);
ACanvas.SetLineStyle(1, lsSolid);
ACanvas.FillRectangle(x, y, w, h);
-
+
if ARaised then
ACanvas.SetColor(clHilite2)
else
@@ -2267,6 +2327,11 @@ begin
ACanvas.DrawLine(r.Right, r.Bottom, r.Left-1, r.Bottom);
end;
+function TfpgStyle.GetBevelWidth: TfpgCoord;
+begin
+ Result := 1;
+end;
+
procedure TfpgStyle.DrawDirectionArrow(ACanvas: TfpgCanvas; x, y, w, h: TfpgCoord; direction: TArrowDirection);
var
{
diff --git a/src/corelib/fpg_stdimages.pas b/src/corelib/fpg_stdimages.pas
index b02331aa..a641fa32 100644
--- a/src/corelib/fpg_stdimages.pas
+++ b/src/corelib/fpg_stdimages.pas
@@ -288,7 +288,12 @@ begin
'stdimg.executable',
@stdimg_executable_16,
sizeof(stdimg_executable_16), 0,0);
-
+
+ fpgImages.AddMaskedBMP(
+ 'stdimg.colpicker',
+ @stdimg_colpicker,
+ sizeof(stdimg_colpicker), 0,0);
+
// Dialog icons
fpgImages.AddMaskedBMP(
diff --git a/src/corelib/fpg_widget.pas b/src/corelib/fpg_widget.pas
index 1f9bda21..150a8284 100644
--- a/src/corelib/fpg_widget.pas
+++ b/src/corelib/fpg_widget.pas
@@ -57,6 +57,7 @@ type
FOnMouseMove: TMouseMoveEvent;
FOnMouseUp: TMouseButtonEvent;
FOnMouseScroll: TMouseWheelEvent;
+ FOnMouseHorizScroll: TMouseWheelEvent;
FOnPaint: TPaintEvent;
FOnKeyPress: TKeyPressEvent;
FOnResize: TNotifyEvent;
@@ -82,6 +83,7 @@ type
procedure MsgMouseEnter(var msg: TfpgMessageRec); message FPGM_MOUSEENTER;
procedure MsgMouseExit(var msg: TfpgMessageRec); message FPGM_MOUSEEXIT;
procedure MsgMouseScroll(var msg: TfpgMessageRec); message FPGM_SCROLL;
+ procedure MsgMouseHorizScroll(var msg: TfpgMessageRec); message FPGM_HSCROLL;
procedure MsgDropEnter(var msg: TfpgMessageRec); message FPGM_DROPENTER;
procedure MsgDropExit(var msg: TfpgMessageRec); message FPGM_DROPEXIT;
protected
@@ -135,6 +137,7 @@ type
procedure HandleMouseEnter; virtual;
procedure HandleMouseExit; virtual;
procedure HandleMouseScroll(x, y: integer; shiftstate: TShiftState; delta: smallint); virtual;
+ procedure HandleMouseHorizScroll(x, y: integer; shiftstate: TShiftState; delta: smallint); virtual;
function FindFocusWidget(startwg: TfpgWidget; direction: TFocusSearchDirection): TfpgWidget;
procedure HandleAlignments(const dwidth, dheight: TfpgCoord); virtual;
procedure HandleShow; virtual;
@@ -155,6 +158,7 @@ type
property OnMouseMove: TMouseMoveEvent read FOnMouseMove write FOnMouseMove;
property OnMouseUp: TMouseButtonEvent read FOnMouseUp write FOnMouseUp;
property OnMouseScroll: TMouseWheelEvent read FOnMouseScroll write FOnMouseScroll;
+ property OnMouseHorizScroll: TMouseWheelEvent read FOnMouseHorizScroll write FOnMouseHorizScroll;
property OnPaint: TPaintEvent read FOnPaint write FOnPaint;
property OnResize: TNotifyEvent read FOnResize write FOnResize;
property OnShowHint: THintEvent read GetOnShowHint write SetOnShowHint;
@@ -170,7 +174,7 @@ type
procedure KillFocus;
procedure MoveAndResizeBy(const dx, dy, dw, dh: TfpgCoord);
procedure SetPosition(aleft, atop, awidth, aheight: TfpgCoord); virtual;
- procedure Invalidate; // double check this works as developers expect????
+ procedure Invalidate;
property FormDesigner: TObject read FFormDesigner write SetFormDesigner;
property Parent: TfpgWidget read GetParent write SetParent;
property AcceptDrops: boolean read FAcceptDrops write SetAcceptDrops default False;
@@ -862,6 +866,12 @@ begin
msg.Params.mouse.shiftstate, msg.Params.mouse.delta);
end;
+procedure TfpgWidget.MsgMouseHorizScroll(var msg: TfpgMessageRec);
+begin
+ HandleMouseHorizScroll(msg.Params.mouse.x, msg.Params.mouse.y,
+ msg.Params.mouse.shiftstate, msg.Params.mouse.delta);
+end;
+
procedure TfpgWidget.MsgDropEnter(var msg: TfpgMessageRec);
begin
// do nothing
@@ -1201,6 +1211,12 @@ begin
FOnMouseScroll(self, shiftstate, delta, Point(x, y));
end;
+procedure TfpgWidget.HandleMouseHorizScroll(x, y: integer; shiftstate: TShiftState; delta: smallint);
+begin
+ if Assigned(FOnMouseHorizScroll) then
+ FOnMouseHorizScroll(self, shiftstate, delta, Point(x, y));
+end;
+
function TfpgWidget.FindFocusWidget(startwg: TfpgWidget; direction: TFocusSearchDirection): TfpgWidget;
var
w: TfpgWidget;
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas
index 4b3a9ab3..b24b04be 100644
--- a/src/corelib/gdi/fpg_gdi.pas
+++ b/src/corelib/gdi/fpg_gdi.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -246,6 +246,7 @@ type
procedure DoFlush;
function GetScreenWidth: TfpgCoord; override;
function GetScreenHeight: TfpgCoord; override;
+ function GetScreenPixelColor(APos: TPoint): TfpgColor; override;
function Screen_dpi_x: integer; override;
function Screen_dpi_y: integer; override;
function Screen_dpi: integer; override;
@@ -263,10 +264,13 @@ type
TfpgGDIFileList = class(TfpgFileListBase)
+ private
function EncodeAttributesString(attrs: longword): TFileModeString;
- constructor Create; override;
+ protected
function InitializeEntry(sr: TSearchRec): TFileEntry; override;
procedure PopulateSpecialDirs(const aDirectory: TfpgString); override;
+ public
+ constructor Create; override;
end;
@@ -344,6 +348,10 @@ var
OldMousePos: TPoint; // used to detect fake MouseMove events
NeedToUnitialize: Boolean;
+
+const
+ ID_ABOUT = 200001;
+
// some required keyboard functions
{$INCLUDE fpg_keys_gdi.inc}
@@ -1201,6 +1209,13 @@ begin
Windows.EndPaint(w.WinHandle, @PaintStruct);
end;
+ WM_SYSCOMMAND:
+ begin
+ if wParam = ID_ABOUT then
+ fpgSendMessage(nil, w, FPGM_ABOUT, msgp)
+ else
+ Windows.DefWindowProc(hwnd, uMsg, wParam, lParam);
+ end
else
Result := Windows.DefWindowProc(hwnd, uMsg, wParam, lParam);
end;
@@ -1276,7 +1291,7 @@ begin
if MainForm <> nil then
lHandle := TfpgGDIWindow(MainForm).FWinHandle
else
- lHandle := -1;
+ lHandle := 0;
FHiddenWindow := CreateWindow('FPGHIDDEN', '',
DWORD(WS_POPUP), 0, 0, 0, 0, lHandle, 0, MainInstance, nil);
end;
@@ -1402,6 +1417,14 @@ begin
// Result := Windows.GetSystemMetrics(SM_CYSCREEN);
end;
+function TfpgGDIApplication.GetScreenPixelColor(APos: TPoint): TfpgColor;
+var
+ c: longword;
+begin
+ c := Windows.GetPixel(FDisplay, APos.X, APos.Y);
+ Result := WinColorTofpgColor(c);
+end;
+
function TfpgGDIApplication.Screen_dpi_x: integer;
begin
Result := GetDeviceCaps(wapplication.display, LOGPIXELSX)
@@ -2252,8 +2275,10 @@ var
c: longword;
begin
c := Windows.GetPixel(FWinGC, X, Y);
+ {$IFDEF DEBUG}
if c = CLR_INVALID then
- Writeln('fpGFX/GDI: TfpgGDICanvas.GetPixel returned an invalid color');
+ SendDebug('fpGFX/GDI: TfpgGDICanvas.GetPixel returned an invalid color');
+ {$ENDIF}
Result := WinColorTofpgColor(c);
end;
@@ -2969,7 +2994,7 @@ end;
destructor TfpgGDIDrag.Destroy;
begin
{$IFDEF DND_DEBUG}
- writeln('TfpgGDIDrag.Destroy ');
+ SendDebug('TfpgGDIDrag.Destroy ');
{$ENDIF}
inherited Destroy;
end;
@@ -2991,14 +3016,14 @@ begin
if FDragging then
begin
{$IFDEF DND_DEBUG}
- writeln('TfpgGDIDrag.Execute (already dragging)');
+ SendDebug('TfpgGDIDrag.Execute (already dragging)');
{$ENDIF}
Result := daIgnore;
end
else
begin
{$IFDEF DND_DEBUG}
- writeln('TfpgGDIDrag.Execute (new drag)');
+ SendDebug('TfpgGDIDrag.Execute (new drag)');
{$ENDIF}
FDragging := True;
wapplication.Drag := self;
@@ -3013,7 +3038,7 @@ begin
{$Note OLE DND: We are only handling strings at the moment, this needs to be extended to other types too }
itm := FMimeData[i];
{$IFDEF DND_DEBUG}
- writeln(' Processing mime-type: ', itm.Format);
+ SendDebug(' Processing mime-type: ', itm.Format);
{$ENDIF}
{ description of data we are sending }
diff --git a/src/corelib/gdi/fpgui_toolkit.lpk b/src/corelib/gdi/fpgui_toolkit.lpk
index f2dc4202..487a5e06 100644
--- a/src/corelib/gdi/fpgui_toolkit.lpk
+++ b/src/corelib/gdi/fpgui_toolkit.lpk
@@ -30,8 +30,8 @@
</CompilerOptions>
<Description Value="fpGUI Toolkit"/>
<License Value="LGPL 2 with static linking exception."/>
- <Version Major="1"/>
- <Files Count="103">
+ <Version Major="1" Minor="3"/>
+ <Files Count="107">
<Item1>
<Filename Value="..\stdimages.inc"/>
<Type Value="Include"/>
@@ -444,6 +444,22 @@
<Filename Value="..\..\gui\fpg_style_win8.pas"/>
<UnitName Value="fpg_style_win8"/>
</Item103>
+ <Item104>
+ <Filename Value="..\..\gui\inputquerydialog.inc"/>
+ <Type Value="Include"/>
+ </Item104>
+ <Item105>
+ <Filename Value="..\..\gui\fpg_toggle.pas"/>
+ <UnitName Value="fpg_toggle"/>
+ </Item105>
+ <Item106>
+ <Filename Value="..\..\gui\fpg_stringgridbuilder.pas"/>
+ <UnitName Value="fpg_StringGridBuilder"/>
+ </Item106>
+ <Item107>
+ <Filename Value="..\fpg_csvparser.pas"/>
+ <UnitName Value="fpg_CSVParser"/>
+ </Item107>
</Files>
<LazDoc Paths="..\..\..\docs\xml\corelib;..\..\..\docs\xml\corelib\x11;..\..\..\docs\xml\corelib\gdi;..\..\..\docs\xml\gui"/>
<RequiredPkgs Count="1">
diff --git a/src/corelib/gdi/fpgui_toolkit.pas b/src/corelib/gdi/fpgui_toolkit.pas
index 12ac41b9..4704d56a 100644
--- a/src/corelib/gdi/fpgui_toolkit.pas
+++ b/src/corelib/gdi/fpgui_toolkit.pas
@@ -22,7 +22,8 @@ uses
fpg_style_win2k, fpg_style_motif, fpg_style_clearlooks, fpg_style_bluecurve,
fpg_style_bitmap, fpg_readonly, fpg_imgfmt_png, U_Command, U_Pdf, U_Report,
U_ReportImages, U_Visu, fpg_trayicon, Agg2D, fpg_dbugintf, fpg_dbugmsg,
- fpg_style_carbon, fpg_style_plastic, fpg_style_win8;
+ fpg_style_carbon, fpg_style_plastic, fpg_style_win8, fpg_toggle,
+ fpg_StringGridBuilder, fpg_CSVParser;
implementation
diff --git a/src/corelib/lang_af.inc b/src/corelib/lang_af.inc
index bd15fe69..173dd6b2 100644
--- a/src/corelib/lang_af.inc
+++ b/src/corelib/lang_af.inc
@@ -19,17 +19,21 @@ rsfileattributes = 'Eienskape';
rsshortaug = 'Aug';
rslongaug = 'Augustus';
rskeybksp = 'BkSp';
+rscolorblue = 'Blue';
rsbold = 'Vetdruk';
rscancel = 'Kanselleer';
rscannotcreatedir = 'Kan nie die lêergids skep nie';
rschange = 'Verander';
-rschangetitle = 'Change Title';
+rschangetitle = 'Verander Titel';
rscharactermap = 'Karakter Kaart';
+rscolorpickerhint = 'Click on Picker and maintain click => release to get the color';
rsclose = 'Sluit';
rscollection = 'Versameling';
-rsconfigurebookmarks = 'Configure Bookmarks';
+rstabsheetcolorwheel = 'Color Wheel';
+rsconfigurebookmarks = 'Instel Boekmerke';
rsconfirm = 'Bevestig';
rsconfirmation = 'Bevestiging';
+rscontinuous = 'Continuous';
rscopy = 'Kopieer';
rserrcouldnotopendir = 'Kon nie die lêergids <%s> oop maak nie';
rscreate = 'Skep';
@@ -43,7 +47,7 @@ rslongdec = 'Desember';
rskeydel = 'Del';
rsdelete = 'Skrap';
rsdirectories = 'Lêergidse';
-rsdirectory = 'Directory';
+rsdirectory = 'Lêergids';
rskeydown = 'Down';
rsdrive = 'Dryf';
rsedit = 'Redigeer';
@@ -56,7 +60,7 @@ rskeyesc = 'Esc';
rsexampletext = 'Teks Voorbeeld';
rsexit = 'Staak';
rserrfailedtocreatedir = 'Kon nie die lêergids <%s> skep nie';
-rsfailedtofindhelpviewer = 'Failed to find the help viewer.';
+rsfailedtofindhelpviewer = 'Kon nie die help program find nie.';
rsfalse = 'Onwaar';
rscollectionfavourites = 'Gunstelinge';
rsshortfeb = 'Feb';
@@ -67,14 +71,16 @@ rsfiles = 'Lêers';
rsfind = 'Vind';
rscollectionfixedwidth = 'Vaste wydte';
rscollectionfontaliases = 'Font Kenname';
-rserrreportfontfilemissing = 'Font file <%s.fnt> not found';
+rserrreportfontfilemissing = 'Font lêer" <%s.fnt> is nie gevind nie';
rsshortfri = 'Vr';
rslongfri = 'Vrydag';
+rscolorgreen = 'Green';
rsfilegroup = 'Groep';
rshelp = 'Help';
+rshexadecimal = 'Hexadecimal';
rskeyhome = 'Home';
rsignore = 'Ignoreer';
-rserrreportimagefilemissing = 'Image <%s> is missing';
+rserrreportimagefilemissing = 'Beeld-lêer <%s> is vermis';
rsinformation = 'Informasie';
rskeyins = 'Ins';
rsinsert = 'Invoeg';
@@ -98,8 +104,8 @@ rskeymeta = 'Meta+';
rsfilemodifiedtime = 'Wysigings Tyd';
rsshortmon = 'Ma';
rslongmon = 'Maandag';
-rsmovedown = 'Move Down';
-rsmoveup = 'Move Up';
+rsmovedown = 'Skyf Af';
+rsmoveup = 'Skyf Op';
rsname = 'Naam';
rsno = 'Nee';
rsnotoall = 'Nee vir Alles';
@@ -111,14 +117,16 @@ rslongoct = 'Oktober';
rsopen = 'Open';
rsopenafile = 'Maak ''n leêr op';
rsfileowner = 'Eienaar';
-rsfiletypepdf = 'PDF Documents';
-rsreportpage = 'Page';
+rsfiletypepdf = 'PDF Dokumente';
+rsreportpage = 'Bladsy';
rspassword = 'Wagwoord';
rspaste = 'Plak';
rskeypgdn = 'PgDn';
rskeypgup = 'PgUp';
-rsreportpreview = 'Preview';
+rstabpredefined = 'Predefined';
+rsreportpreview = 'Voorskou';
rscollectionrecentlyused = 'Onlangs gebruik';
+rscolorred = 'Red';
rsreplace = 'Vervang';
rsretry = 'Herprobeer';
rskeyright = 'Right';
@@ -129,7 +137,7 @@ rslongsat = 'Saterdag';
rssave = 'Stoor';
rssaveafile = 'Stoor ''n lêer as';
rssearch = 'Soek';
-rsreportsection = 'Section';
+rsreportsection = 'Seksie';
rsselect = 'Kies';
rsselectadirectory = 'Kies ''n lêergids';
rsselectafont = 'Kies ''n lettertipe';
@@ -145,7 +153,7 @@ rsshortsun = 'So';
rslongsun = 'Sondag';
rskeytab = 'Tab';
rstexttoinsert = 'Teks om in te voeg';
-rserrreportnopagestoprint = 'There are no pages to print';
+rserrreportnopagestoprint = 'Daar is geen bladsye om te druk nie';
rsshortthu = 'Do';
rslongthu = 'Donderdag';
rstoday = 'Vandag';
@@ -163,4 +171,4 @@ rslongwed = 'Woensdag';
rsaddnewitem = 'Wil jy die nuwe item <%s> in die lys bylas?';
rsyes = 'Ja';
rsyestoall = 'Ja vir Alles';
-rsreportpageof = 'of';
+rsreportpageof = 'van';
diff --git a/src/corelib/lang_de.inc b/src/corelib/lang_de.inc
index e8fe0a9a..a261926f 100644
--- a/src/corelib/lang_de.inc
+++ b/src/corelib/lang_de.inc
@@ -19,17 +19,21 @@ rsfileattributes = 'Attribute';
rsshortaug = 'Aug';
rslongaug = 'August';
rskeybksp = 'BkSp';
+rscolorblue = 'Blue';
rsbold = 'Fett';
rscancel = 'Abbrechen';
rscannotcreatedir = 'Kann Verzeichnis nicht anlegen';
rschange = 'Ändern';
rschangetitle = 'Change Title';
rscharactermap = 'Character Map';
+rscolorpickerhint = 'Click on Picker and maintain click => release to get the color';
rsclose = 'Schließen';
rscollection = 'Sammlung';
+rstabsheetcolorwheel = 'Color Wheel';
rsconfigurebookmarks = 'Configure Bookmarks';
rsconfirm = 'Bestätigen';
rsconfirmation = 'Bestätigung';
+rscontinuous = 'Continuous';
rscopy = 'Kopieren';
rserrcouldnotopendir = 'Konnte Verzeichnis <%> nicht anlegen';
rscreate = 'Anlegen';
@@ -70,8 +74,10 @@ rscollectionfontaliases = 'Font-Aliase';
rserrreportfontfilemissing = 'Font file <%s.fnt> not found';
rsshortfri = 'Fre';
rslongfri = 'Freitag';
+rscolorgreen = 'Green';
rsfilegroup = 'Gruppe';
rshelp = 'Hilfe';
+rshexadecimal = 'Hexadecimal';
rskeyhome = 'Home';
rsignore = 'Ãœbergehen';
rserrreportimagefilemissing = 'Image <%s> is missing';
@@ -117,8 +123,10 @@ rspassword = 'Passwort';
rspaste = 'Einfügen';
rskeypgdn = 'PgDn';
rskeypgup = 'PgUp';
+rstabpredefined = 'Predefined';
rsreportpreview = 'Preview';
rscollectionrecentlyused = 'Zuletzt verwendet';
+rscolorred = 'Red';
rsreplace = 'Ersetzen';
rsretry = 'Wiederholen';
rskeyright = 'Right';
diff --git a/src/corelib/lang_en.inc b/src/corelib/lang_en.inc
index 6a681932..aec26b22 100644
--- a/src/corelib/lang_en.inc
+++ b/src/corelib/lang_en.inc
@@ -19,17 +19,21 @@ rsfileattributes = 'Attributes';
rsshortaug = 'Aug';
rslongaug = 'August';
rskeybksp = 'BkSp';
+rscolorblue = 'Blue';
rsbold = 'Bold';
rscancel = 'Cancel';
rscannotcreatedir = 'Cannot create directory';
rschange = 'Change';
rschangetitle = 'Change Title';
rscharactermap = 'Character Map';
+rscolorpickerhint = 'Click on Picker and maintain click => release to get the color';
rsclose = 'Close';
rscollection = 'Collection';
+rstabsheetcolorwheel = 'Color Wheel';
rsconfigurebookmarks = 'Configure Bookmarks';
rsconfirm = 'Confirm';
rsconfirmation = 'Confirmation';
+rscontinuous = 'Continuous';
rscopy = 'Copy';
rserrcouldnotopendir = 'Could not open the directory <%s>';
rscreate = 'Create';
@@ -70,8 +74,10 @@ rscollectionfontaliases = 'Font Aliases';
rserrreportfontfilemissing = 'Font file <%s.fnt> not found';
rsshortfri = 'Fri';
rslongfri = 'Friday';
+rscolorgreen = 'Green';
rsfilegroup = 'Group';
rshelp = 'Help';
+rshexadecimal = 'Hexadecimal';
rskeyhome = 'Home';
rsignore = 'Ignore';
rserrreportimagefilemissing = 'Image <%s> is missing';
@@ -117,8 +123,10 @@ rspassword = 'Password';
rspaste = 'Paste';
rskeypgdn = 'PgDn';
rskeypgup = 'PgUp';
+rstabpredefined = 'Predefined';
rsreportpreview = 'Preview';
rscollectionrecentlyused = 'Recently Used';
+rscolorred = 'Red';
rsreplace = 'Replace';
rsretry = 'Retry';
rskeyright = 'Right';
diff --git a/src/corelib/lang_es.inc b/src/corelib/lang_es.inc
index 780af188..f53ccb76 100644
--- a/src/corelib/lang_es.inc
+++ b/src/corelib/lang_es.inc
@@ -19,17 +19,21 @@ rsfileattributes = 'Atributos';
rsshortaug = 'Aug';
rslongaug = 'August';
rskeybksp = 'BkSp';
+rscolorblue = 'Blue';
rsbold = 'Negrita';
rscancel = 'Cancelar';
rscannotcreatedir = 'No se puede crear la carpeta';
rschange = 'Cambiar';
rschangetitle = 'Change Title';
rscharactermap = 'Character Map';
+rscolorpickerhint = 'Click on Picker and maintain click => release to get the color';
rsclose = 'Cerrar';
rscollection = 'Colección';
+rstabsheetcolorwheel = 'Color Wheel';
rsconfigurebookmarks = 'Configure Bookmarks';
rsconfirm = 'Confirmar';
rsconfirmation = 'Confirmación';
+rscontinuous = 'Continuous';
rscopy = 'Copiar';
rserrcouldnotopendir = 'No se puede abrir la carpeta <%s>';
rscreate = 'Create';
@@ -70,8 +74,10 @@ rscollectionfontaliases = 'Aliases de Fuentes';
rserrreportfontfilemissing = 'Font file <%s.fnt> not found';
rsshortfri = 'Vie';
rslongfri = 'Viernes';
+rscolorgreen = 'Green';
rsfilegroup = 'Grupo';
rshelp = 'Ayuda';
+rshexadecimal = 'Hexadecimal';
rskeyhome = 'Home';
rsignore = 'Ignorar';
rserrreportimagefilemissing = 'Image <%s> is missing';
@@ -117,8 +123,10 @@ rspassword = 'Contraseña';
rspaste = 'Pegar';
rskeypgdn = 'PgDn';
rskeypgup = 'PgUp';
+rstabpredefined = 'Predefined';
rsreportpreview = 'Preview';
rscollectionrecentlyused = 'Usados Recientemente';
+rscolorred = 'Red';
rsreplace = 'Reemplazar';
rsretry = 'Reintentar';
rskeyright = 'Right';
diff --git a/src/corelib/lang_fr.inc b/src/corelib/lang_fr.inc
index 7409c5ff..0a9a8e21 100644
--- a/src/corelib/lang_fr.inc
+++ b/src/corelib/lang_fr.inc
@@ -19,17 +19,21 @@ rsfileattributes = 'Attributs';
rsshortaug = 'Aoû';
rslongaug = 'Août';
rskeybksp = 'BkSp';
+rscolorblue = 'Blue';
rsbold = 'Gras';
rscancel = 'Annuler';
rscannotcreatedir = 'Impossible de créer le répertoire';
rschange = 'Modifier';
rschangetitle = 'Changer le titre';
rscharactermap = 'Table de caractères';
+rscolorpickerhint = 'Click on Picker and maintain click => release to get the color';
rsclose = 'Fermer';
rscollection = 'Collection';
+rstabsheetcolorwheel = 'Color Wheel';
rsconfigurebookmarks = 'Configurer les signets';
rsconfirm = 'Confirmer';
rsconfirmation = 'Confirmation';
+rscontinuous = 'Continuous';
rscopy = 'Copier';
rserrcouldnotopendir = 'Le répertoire <%s> n''''a pas pu être ouvert';
rscreate = 'Créer';
@@ -56,8 +60,8 @@ rskeyesc = 'Esc';
rsexampletext = 'Texte exemple';
rsexit = 'Sortir';
rserrfailedtocreatedir = 'Le répertoire <%s> n''''a pas pu être ouvert';
-rsfailedtofindhelpviewer = 'Failed to find the help viewer.';
-rsfalse = 'False';
+rsfailedtofindhelpviewer = 'Visualiseur d''aide non trouvé';
+rsfalse = 'Faux';
rscollectionfavourites = 'Favoris';
rsshortfeb = 'Fév';
rslongfeb = 'Février';
@@ -67,14 +71,16 @@ rsfiles = 'Fichiers';
rsfind = 'Trouver';
rscollectionfixedwidth = 'Longueur fixe';
rscollectionfontaliases = 'Alias';
-rserrreportfontfilemissing = 'Font file <%s.fnt> not found';
+rserrreportfontfilemissing = 'Fichier de police <%s.fnt> non trouvé';
rsshortfri = 'Ven';
rslongfri = 'Vendredi';
+rscolorgreen = 'Green';
rsfilegroup = 'Groupe';
rshelp = 'Aide';
+rshexadecimal = 'Hexadecimal';
rskeyhome = 'Home';
rsignore = 'Ignorer';
-rserrreportimagefilemissing = 'Image <%s> is missing';
+rserrreportimagefilemissing = 'Image <%s> introuvable';
rsinformation = 'Information';
rskeyins = 'Ins';
rsinsert = 'Insérer';
@@ -111,14 +117,16 @@ rslongoct = 'Octobre';
rsopen = 'Ouvrir';
rsopenafile = 'Ouvrir un fichier';
rsfileowner = 'Propriétaire';
-rsfiletypepdf = 'PDF Documents';
+rsfiletypepdf = 'Documents PDF';
rsreportpage = 'Page';
rspassword = 'Mot de passe';
rspaste = 'Coller';
rskeypgdn = 'PgDn';
rskeypgup = 'PgUp';
-rsreportpreview = 'Preview';
+rstabpredefined = 'Predefined';
+rsreportpreview = 'Prévisualisation';
rscollectionrecentlyused = 'Récemment utilisé';
+rscolorred = 'Red';
rsreplace = 'Remplacer';
rsretry = 'Retenter';
rskeyright = 'Right';
@@ -145,7 +153,7 @@ rsshortsun = 'Dim';
rslongsun = 'Dimanche';
rskeytab = 'Tab';
rstexttoinsert = 'Texte à insérer';
-rserrreportnopagestoprint = 'There are no pages to print';
+rserrreportnopagestoprint = 'Il n''y a pas de page à imprimer';
rsshortthu = 'Jeu';
rslongthu = 'Jeudi';
rstoday = 'Aujourd''''hui';
@@ -163,4 +171,4 @@ rslongwed = 'Mercredi';
rsaddnewitem = 'Voulez-vous ajouter l''''item <%s> à la liste?';
rsyes = 'Oui';
rsyestoall = 'Oui à tous';
-rsreportpageof = 'of';
+rsreportpageof = 'de';
diff --git a/src/corelib/lang_it.inc b/src/corelib/lang_it.inc
index 2ab860ad..26eb36d8 100644
--- a/src/corelib/lang_it.inc
+++ b/src/corelib/lang_it.inc
@@ -19,17 +19,21 @@ rsfileattributes = 'Attributi';
rsshortaug = 'Ago';
rslongaug = 'Agosto';
rskeybksp = 'BkSp';
+rscolorblue = 'Blue';
rsbold = 'Grassetto';
rscancel = 'Annulla';
rscannotcreatedir = 'Non riesco a creare la cartella';
rschange = 'Cambia';
rschangetitle = 'Change Title';
rscharactermap = 'Character Map';
+rscolorpickerhint = 'Click on Picker and maintain click => release to get the color';
rsclose = 'Chiudi';
rscollection = 'Collezione';
+rstabsheetcolorwheel = 'Color Wheel';
rsconfigurebookmarks = 'Configure Bookmarks';
rsconfirm = 'Conferma';
rsconfirmation = 'Conferma';
+rscontinuous = 'Continuous';
rscopy = 'Copia';
rserrcouldnotopendir = 'Impossibile aprire la cartella <%s>';
rscreate = 'Crea';
@@ -70,8 +74,10 @@ rscollectionfontaliases = 'Font Aliases';
rserrreportfontfilemissing = 'Font file <%s.fnt> not found';
rsshortfri = 'Ven';
rslongfri = 'Venerdì';
+rscolorgreen = 'Green';
rsfilegroup = 'Gruppo';
rshelp = 'Aiuto';
+rshexadecimal = 'Hexadecimal';
rskeyhome = 'Home';
rsignore = 'Ignora';
rserrreportimagefilemissing = 'Image <%s> is missing';
@@ -117,8 +123,10 @@ rspassword = 'Password';
rspaste = 'Incolla';
rskeypgdn = 'PgDn';
rskeypgup = 'PgUp';
+rstabpredefined = 'Predefined';
rsreportpreview = 'Preview';
rscollectionrecentlyused = 'Usati Recentemente';
+rscolorred = 'Red';
rsreplace = 'Sostituisci';
rsretry = 'Riprova';
rskeyright = 'Right';
diff --git a/src/corelib/lang_pt.inc b/src/corelib/lang_pt.inc
index f9c4aa13..fb3dd92b 100644
--- a/src/corelib/lang_pt.inc
+++ b/src/corelib/lang_pt.inc
@@ -19,17 +19,21 @@ rsfileattributes = 'Atributos';
rsshortaug = 'Ago';
rslongaug = 'Agosto';
rskeybksp = 'BkSp';
+rscolorblue = 'Blue';
rsbold = 'Negrito';
rscancel = 'Cancelar';
rscannotcreatedir = 'Não foi possível criar diretório';
rschange = 'Editar';
rschangetitle = 'Mudar Título';
rscharactermap = 'Mapa de Caracteres';
+rscolorpickerhint = 'Click on Picker and maintain click => release to get the color';
rsclose = 'Fechar';
rscollection = 'Coleção';
+rstabsheetcolorwheel = 'Color Wheel';
rsconfigurebookmarks = 'Configure Bookmarks';
rsconfirm = 'Confirmar';
rsconfirmation = 'Confirmação';
+rscontinuous = 'Continuous';
rscopy = 'Copiar';
rserrcouldnotopendir = 'Não pode abrir o diretório <%s>';
rscreate = 'Criar';
@@ -70,8 +74,10 @@ rscollectionfontaliases = 'Font Aliases';
rserrreportfontfilemissing = 'Font file <%s.fnt> not found';
rsshortfri = 'Sex';
rslongfri = 'Sexta-feira';
+rscolorgreen = 'Green';
rsfilegroup = 'Grupo';
rshelp = 'Ajuda';
+rshexadecimal = 'Hexadecimal';
rskeyhome = 'Home';
rsignore = 'Ignorar';
rserrreportimagefilemissing = 'Image <%s> is missing';
@@ -117,8 +123,10 @@ rspassword = 'Senha';
rspaste = 'Colar';
rskeypgdn = 'PgDn';
rskeypgup = 'PgUp';
+rstabpredefined = 'Predefined';
rsreportpreview = 'Preview';
rscollectionrecentlyused = 'Recentemente Usado';
+rscolorred = 'Red';
rsreplace = 'Substituir';
rsretry = 'Retentar';
rskeyright = 'Right';
diff --git a/src/corelib/lang_ru.inc b/src/corelib/lang_ru.inc
index a6d8a46e..d3f35c2f 100644
--- a/src/corelib/lang_ru.inc
+++ b/src/corelib/lang_ru.inc
@@ -19,17 +19,21 @@ rsfileattributes = 'Ðтрибуты';
rsshortaug = 'Ðвг';
rslongaug = 'ÐвгуÑÑ‚';
rskeybksp = 'BkSp';
+rscolorblue = 'Blue';
rsbold = 'Жирный';
rscancel = 'Отмена';
rscannotcreatedir = 'Ðевозможно Ñоздать директорию';
rschange = 'Изменить';
rschangetitle = 'Change Title';
rscharactermap = 'Character Map';
+rscolorpickerhint = 'Click on Picker and maintain click => release to get the color';
rsclose = 'Закрыть';
rscollection = 'Группа';
+rstabsheetcolorwheel = 'Color Wheel';
rsconfigurebookmarks = 'Configure Bookmarks';
rsconfirm = 'Подтвердить';
rsconfirmation = 'Подтверждение';
+rscontinuous = 'Continuous';
rscopy = 'Копировать';
rserrcouldnotopendir = 'Ðевозможно открыть директорию <%s>';
rscreate = 'Создать';
@@ -70,8 +74,10 @@ rscollectionfontaliases = 'ПÑевдонимы шрифтов';
rserrreportfontfilemissing = 'Font file <%s.fnt> not found';
rsshortfri = 'Пт';
rslongfri = 'ПÑтница';
+rscolorgreen = 'Green';
rsfilegroup = 'Группа';
rshelp = 'Справка';
+rshexadecimal = 'Hexadecimal';
rskeyhome = 'Home';
rsignore = 'ПропуÑтить';
rserrreportimagefilemissing = 'Image <%s> is missing';
@@ -117,8 +123,10 @@ rspassword = 'Пароль';
rspaste = 'Ð’Ñтавить';
rskeypgdn = 'PgDn';
rskeypgup = 'PgUp';
+rstabpredefined = 'Predefined';
rsreportpreview = 'Preview';
rscollectionrecentlyused = 'Ранее иÑпользованные';
+rscolorred = 'Red';
rsreplace = 'Заменить';
rsretry = 'Повторить';
rskeyright = 'Right';
diff --git a/src/corelib/render/software/Agg2D.pas b/src/corelib/render/software/Agg2D.pas
index 229294d2..b77b9ce9 100644
--- a/src/corelib/render/software/Agg2D.pas
+++ b/src/corelib/render/software/Agg2D.pas
@@ -2653,9 +2653,10 @@ procedure TAgg2D.Font(
italic : boolean = false;
cache : TAggFontCacheType = AGG_VectorFontCache;
angle : double = 0.0 );
+{$IFDEF AGG2D_USE_WINFONTS}
var
b : int;
-
+{$ENDIF}
begin
m_textAngle :=angle;
m_fontHeight :=height;
@@ -3559,7 +3560,7 @@ procedure TAgg2D.DoSetFontRes(fntres: TfpgFontResourceBase);
{$IFDEF WINDOWS}
begin
{$IFDEF AGG2D_USE_FREETYPE }
- Font('c:\WINNT\Fonts\arial.ttf', 10);
+ Font(GetWindowsFontDir + 'arial.ttf', 10);
{$ENDIF }
{$IFDEF AGG2D_USE_WINFONTS}
Font('Arial', 13);
diff --git a/src/corelib/render/software/agg-demos/extrafpc.cfg b/src/corelib/render/software/agg-demos/extrafpc.cfg
new file mode 100644
index 00000000..94482a02
--- /dev/null
+++ b/src/corelib/render/software/agg-demos/extrafpc.cfg
@@ -0,0 +1,21 @@
+-FUunits
+-Fu../
+-Fu../ctrl/
+#IFDEF UNIX
+ -Fu../platform/linux/
+#ENDIF
+#IFDEF WINDOWS
+ -Fu../platform/win/
+ -WG
+#ENDIF
+#IFDEF Carbon
+ -Fu../platform/mac/
+#ENDIF
+-Fu../svg/
+-Fu../util/
+-Fi../
+-Xs
+-XX
+-CX
+-Mdelphi
+
diff --git a/src/corelib/render/software/agg_2D.pas b/src/corelib/render/software/agg_2D.pas
index 45d88e44..0fcbc3d9 100644
--- a/src/corelib/render/software/agg_2D.pas
+++ b/src/corelib/render/software/agg_2D.pas
@@ -414,9 +414,9 @@ type
opt : ViewportOption = XMidYMid );
// Basic Shapes
- procedure line (x1 ,y1 ,x2 ,y2 : double );
+ procedure line (const x1 ,y1 ,x2 ,y2 : double; AFixAlignment: boolean = false );
procedure triangle (x1 ,y1 ,x2 ,y2 ,x3 ,y3 : double );
- procedure rectangle(x1 ,y1 ,x2 ,y2 : double );
+ procedure rectangle(const x1 ,y1 ,x2 ,y2 : double; AFixAlignment: boolean = false);
procedure roundedRect(x1 ,y1 ,x2 ,y2 ,r : double ); overload;
procedure roundedRect(x1 ,y1 ,x2 ,y2 ,rx ,ry : double ); overload;
@@ -443,7 +443,7 @@ type
fileName : char_ptr; height : double;
bold : boolean = false;
italic : boolean = false;
- ch : FontCacheType = RasterFontCache;
+ ch : FontCacheType = VectorFontCache;
angle : double = 0.0 );
function fontHeight : double;
@@ -1876,13 +1876,25 @@ begin
end;
{ LINE }
-procedure Agg2D.line(x1 ,y1 ,x2 ,y2 : double );
+procedure Agg2D.line(const x1, y1, x2, y2: double; AFixAlignment: boolean = false);
+var
+ lx1, ly1, lx2, ly2: double;
begin
m_path.remove_all;
- addLine (x1 ,y1 ,x2 ,y2 );
- drawPath(StrokeOnly );
+ lx1 := x1;
+ ly1 := y1;
+ lx2 := x2;
+ ly2 := y2;
+ if AFixAlignment then
+ begin
+ AlignPoint(@lx1, @ly1);
+ AlignPoint(@lx2, @ly2);
+ end;
+
+ addLine(lx1, ly1, lx2, ly2);
+ drawPath(StrokeOnly);
end;
{ TRIANGLE }
@@ -1899,13 +1911,27 @@ begin
end;
{ RECTANGLE }
-procedure Agg2D.rectangle(x1 ,y1 ,x2 ,y2 : double );
+procedure Agg2D.rectangle(const x1 ,y1 ,x2 ,y2 : double; AFixAlignment: boolean);
+var
+ lx1, ly1, lx2, ly2: double;
begin
m_path.remove_all;
- m_path.move_to(x1 ,y1 );
- m_path.line_to(x2 ,y1 );
- m_path.line_to(x2 ,y2 );
- m_path.line_to(x1 ,y2 );
+
+ lx1 := x1;
+ ly1 := y1;
+ lx2 := x2;
+ ly2 := y2;
+
+ if AFixAlignment then
+ begin
+ AlignPoint(@lx1, @ly1);
+ AlignPoint(@lx2, @ly2);
+ end;
+
+ m_path.move_to(lx1 ,ly1 );
+ m_path.line_to(lx2 ,ly1 );
+ m_path.line_to(lx2 ,ly2 );
+ m_path.line_to(lx1 ,ly2 );
m_path.close_polygon;
drawPath(FillAndStroke );
@@ -2102,7 +2128,7 @@ procedure Agg2D.font(
fileName : char_ptr; height : double;
bold : boolean = false;
italic : boolean = false;
- ch : FontCacheType = RasterFontCache;
+ ch : FontCacheType = VectorFontCache;
angle : double = 0.0 );
var
b : int;
@@ -2121,10 +2147,11 @@ begin
m_fontEngine.hinting_(m_textHints );
if ch = VectorFontCache then
- m_fontEngine.height_(height )
+ {$NOTE We need to fix this. Translating from font pt to pixels is inaccurate. This is just a temp fix for now. }
+ m_fontEngine.height_(height * 1.3333 ) // 9pt = ~12px so that is a ratio of 1.3333
else
m_fontEngine.height_(worldToScreen(height ) );
-{$ENDIF }
+{$ENDIF}
{$IFDEF AGG2D_USE_WINFONTS}
m_fontEngine.hinting_(m_textHints );
@@ -2167,7 +2194,9 @@ end;
procedure Agg2D.textHints(hints : boolean );
begin
m_textHints:=hints;
-
+ {$IFNDEF AGG2D_NO_FONT}
+ m_fontEngine.hinting_(m_textHints );
+ {$ENDIF}
end;
{ TEXTWIDTH }
@@ -2350,6 +2379,7 @@ end;
procedure Agg2D.resetPath;
begin
m_path.remove_all;
+ m_path.move_to(0 ,0 );
end;
diff --git a/src/corelib/render/software/agg_blur.pas b/src/corelib/render/software/agg_blur.pas
index 5ddda2bc..78e6df72 100644
--- a/src/corelib/render/software/agg_blur.pas
+++ b/src/corelib/render/software/agg_blur.pas
@@ -25,7 +25,7 @@
// http://incubator.quasimondo.com/processing/fast_blur_deluxe.php
// (search phrase "Stackblur: Fast But Goodlooking").
// The major improvement is that there's no more division table
-// that was very expensive to create for large blur radii. Insted,
+// that was very expensive to create for large blur radii. Instead,
// for 8-bit per channel and radius not exceeding 254 the division is
// replaced by multiplication and shift.
//
diff --git a/src/corelib/render/software/agg_platform_gdi.inc b/src/corelib/render/software/agg_platform_gdi.inc
index 88d3b586..c61d068f 100644
--- a/src/corelib/render/software/agg_platform_gdi.inc
+++ b/src/corelib/render/software/agg_platform_gdi.inc
@@ -21,6 +21,19 @@ type
// to get access to protected methods (seeing that FPC doesn't support Friend-classes)
TImageHack = class(TfpgImage);
+function GetWindowsFontDir: string;
+var
+ lWinFontPath: array[0..MAX_PATH] of WideChar;
+ lPasWinFontPath: string;
+ i: Integer;
+begin
+ // Find for example C:\Windows\Fonts or C:\WINNT\Fonts
+ Windows.GetWindowsDirectoryW(@lWinFontPath[0], MAX_PATH);
+ lPasWinFontPath := lWinFontPath;
+ lPasWinFontPath := IncludeTrailingPathDelimiter(lPasWinFontPath) + 'Fonts' + PathDelim;
+ Result := lPasWinFontPath;
+end;
+
procedure TAgg2D.DoPutBufferToScreen(x, y, w, h: TfpgCoord);
var
srcdc: HDC;
diff --git a/src/corelib/stdimages.inc b/src/corelib/stdimages.inc
index 36255154..510a1ce6 100644
--- a/src/corelib/stdimages.inc
+++ b/src/corelib/stdimages.inc
@@ -3222,4 +3222,26 @@ Const
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,255, 0,255,255, 0,255,255, 0,255);
+const
+ stdimg_colpicker: array[0..333] of byte = (
+ 66, 77, 78, 1, 0, 0, 0, 0, 0, 0,118, 0, 0, 0, 40, 0, 0,
+ 0, 18, 0, 0, 0, 18, 0, 0, 0, 1, 0, 4, 0, 0, 0, 0, 0,
+ 216, 0, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 16, 0, 0, 0, 16,
+ 0, 0, 0, 0, 0, 0, 0,132,132, 0, 0,255,255, 0, 0, 0, 0,
+ 132, 0,132,132,132, 0,206,214,214, 0, 0, 0,255, 0,255,255,255,
+ 0,255,255,255, 0,255,255,255, 0,255,255,255, 0,255,255,255, 0,
+ 255,255,255, 0,255,255,255, 0,255,255,255, 0,255,255,255, 0, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 0, 0, 0, 85, 34, 34, 37, 85, 85,
+ 85, 85, 85, 0, 0, 0, 82, 34, 34, 34, 37, 85, 85, 85, 85, 0, 0,
+ 0, 85, 80, 5, 85, 85, 85, 85, 85, 85, 0, 0, 0, 85, 80, 32, 5,
+ 85, 85, 85, 85, 85, 0, 0, 0, 85, 85, 1, 64, 85, 85, 85, 85, 85,
+ 0, 0, 0, 85, 85, 2, 20, 5, 85, 85, 85, 85, 0, 0, 0, 85, 85,
+ 80, 33, 64, 85, 85, 85, 85, 0, 0, 0, 85, 85, 85, 5,116, 5, 85,
+ 85, 85, 0, 0, 0, 85, 85, 85, 80, 87, 64, 85, 85, 85, 0, 0, 0,
+ 85, 85, 85, 85, 5,116, 3, 85, 85, 0, 0, 0, 85, 85, 85, 85, 80,
+ 83, 48, 69, 85, 0, 0, 0, 85, 85, 85, 85, 85, 54, 3, 52, 85, 0,
+ 0, 0, 85, 85, 85, 85, 85, 99, 99, 51, 69, 0, 0, 0, 85, 85, 85,
+ 85, 85, 85, 54, 99, 53, 0, 0, 0, 85, 85, 85, 85, 85, 85, 55, 99,
+ 53, 0, 0, 0, 85, 85, 85, 85, 85, 85, 83, 51, 69, 0, 0, 0, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 0, 0, 0);
diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas
index bae72c40..381b81a3 100644
--- a/src/corelib/x11/fpg_x11.pas
+++ b/src/corelib/x11/fpg_x11.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -24,7 +24,7 @@ unit fpg_x11;
{ TODO : Compiz effects: Menu popup with correct window hint. Same for Combo dropdown window. }
{ TODO : Under Compiz restoring a window position moves the window down/right the width and height
- of the window borders. This as something to do with win_gravity = StaticGravity setting. }
+ of the window borders. This has something to do with win_gravity = StaticGravity setting. }
interface
@@ -222,6 +222,7 @@ type
TfpgX11Window = class(TfpgWindowBase)
private
QueueEnabledDrops: boolean;
+ procedure ApplyFormIcon;
protected
FWinFlags: TXWindowStateFlags;
FWinHandle: TfpgWinHandle;
@@ -315,6 +316,7 @@ type
xia_wm_protocols: TAtom;
xia_wm_delete_window: TAtom;
xia_wm_state: TAtom;
+ xia_net_wm_icon: TAtom;
xia_targets: TAtom;
xia_save_targets: TAtom;
netlayer: TNETWindowLayer;
@@ -331,6 +333,7 @@ type
procedure DoFlush;
function GetScreenWidth: TfpgCoord; override;
function GetScreenHeight: TfpgCoord; override;
+ function GetScreenPixelColor(APos: TPoint): TfpgColor; override;
function Screen_dpi_x: integer; override;
function Screen_dpi_y: integer; override;
function Screen_dpi: integer; override;
@@ -1483,6 +1486,7 @@ begin
xia_wm_protocols := XInternAtom(FDisplay, 'WM_PROTOCOLS', TBool(False));
xia_wm_delete_window := XInternAtom(FDisplay, 'WM_DELETE_WINDOW', TBool(False));
xia_wm_state := XInternAtom(FDisplay, 'WM_STATE', TBool(False));
+ xia_net_wm_icon := XInternAtom(FDisplay, '_NET_WM_ICON', TBool(False));
{ initializa the XDND atoms }
FDNDTypeList := TObjectList.Create;
@@ -1685,7 +1689,7 @@ begin
OnIdle(self);
fpFD_ZERO(rfds);
fpFD_SET(xfd, rfds);
- r := fpSelect(xfd + 1, @rfds, nil, nil, {atimeoutms} 50);
+ r := fpSelect(xfd + 1, @rfds, nil, nil, Min(atimeoutms, 50));
if r <> 0 then // We got a X event or the timeout happened
XNextEvent(display, @ev)
else
@@ -1842,31 +1846,50 @@ begin
if not blockmsg then
begin
if (ev.xbutton.button >= 4) and (ev.xbutton.button <= 7) then // mouse wheel
+ // 4=up, 5=down, 6=left, 7=right
begin
// generate scroll events:
if ev._type = X.ButtonPress then
begin
- if ev.xbutton.button = Button4 then
+ if (ev.xbutton.button = Button4) or (ev.xbutton.button = 6) then // x.pp lacks Button6, Button7
i := -1
else
i := 1;
// Check for other mouse wheel messages in the queue
- while XCheckTypedWindowEvent(display, ev.xbutton.window, X.ButtonPress, @NewEvent) do
- begin
- if NewEvent.xbutton.Button = 4 then
- Dec(i)
- else if NewEvent.xbutton.Button = 5 then
- Inc(i)
- else
- begin
- XPutBackEvent(display, @NewEvent);
- break;
- end;
- end;
+ if ev.xbutton.button in [Button4,Button5] then
+ while XCheckTypedWindowEvent(display, ev.xbutton.window, X.ButtonPress, @NewEvent) do
+ begin
+ if NewEvent.xbutton.Button = 4 then
+ Dec(i)
+ else if NewEvent.xbutton.Button = 5 then
+ Inc(i)
+ else
+ begin
+ XPutBackEvent(display, @NewEvent);
+ break;
+ end;
+ end
+ else // button is 6 or 7
+ while XCheckTypedWindowEvent(display, ev.xbutton.window, X.ButtonPress, @NewEvent) do
+ begin
+ if NewEvent.xbutton.Button = 6 then
+ Dec(i)
+ else if NewEvent.xbutton.Button = 7 then
+ Inc(i)
+ else
+ begin
+ XPutBackEvent(display, @NewEvent);
+ break;
+ end;
+ end;
msgp.mouse.delta := i;
- fpgPostMessage(nil, w, FPGM_SCROLL, msgp);
+
+ if ev.xbutton.button in [Button4,Button5] then
+ fpgPostMessage(nil, w, FPGM_SCROLL, msgp)
+ else
+ fpgPostMessage(nil, w, FPGM_HSCROLL, msgp);
end;
end
else
@@ -2221,6 +2244,28 @@ begin
Result := wa.Height;
end;
+function TfpgX11Application.GetScreenPixelColor(APos: TPoint): TfpgColor;
+var
+ Image: PXImage;
+ Pixel: Cardinal;
+ x_Color: TXColor;
+begin
+ Result := 0;
+ Image := XGetImage(Display, FRootWindow, APos.X, APos.Y, 1, 1, $FFFFFFFF, ZPixmap);
+ if Image = nil then
+ raise Exception.Create('fpGFX/X11: Invalid XImage');
+ try
+ Pixel := XGetPixel(Image, 0, 0);
+ x_Color.pixel := Pixel;
+ XQueryColor(Display, DefaultColorMap, @x_Color);
+ Result := TfpgColor(((x_Color.red and $00FF) shl 16) or
+ ((x_Color.green and $00FF) shl 8) or
+ (x_Color.blue and $00FF));
+ finally
+ XDestroyImage(Image);
+ end;
+end;
+
function TfpgX11Application.Screen_dpi_x: integer;
var
mm: integer;
@@ -2259,6 +2304,45 @@ end;
{ TfpgX11Window }
+procedure TfpgX11Window.ApplyFormIcon;
+var
+ ico: TfpgImage;
+ ar1: array of longword; // 32 bit CPU's
+ ar2: array of qword; // 64 bit CPU's
+ ps: pbyte;
+ pd: ^TRGBTriple;
+ i: integer;
+ iconName: string;
+begin
+ if self is TfpgForm then
+ iconName := TfpgForm(self).IconName;
+ if iconName = '' then
+ Exit;
+ ico := fpgImages.GetImage(iconName);
+ if Assigned(ico) then
+ begin
+ SetLength(ar1, 2 + (ico.Width * ico.Height));
+ ar1[0] := ico.Width;
+ ar1[1] := ico.Height;
+ pd := @ar1[2];
+ ps := ico.ImageData;
+ move(ps^,pd^, ico.ImageDataSize);
+ end
+ else
+ exit; // we don't have a icon to set
+
+ {$ifdef cpu64}
+ setlength(ar2,length(ar1));
+ for i := low(ar2) to high(ar2) do
+ ar2[i] := ar1[i]; // copy array data over
+ XChangeProperty(xapplication.display, FWinHandle, xapplication.xia_net_wm_icon,
+ XA_CARDINAL, 32, PropModeReplace, @ar2[0], Length(ar2));
+ {$else}
+ XChangeProperty(xapplication.display, FWinHandle, xapplication.xia_net_wm_icon,
+ XA_CARDINAL, 32, PropModeReplace, @ar1[0], Length(ar1));
+ {$endif}
+end;
+
procedure TfpgX11Window.DoAllocateWindowHandle(AParent: TfpgWindowBase);
var
pwh: TfpgWinHandle;
@@ -2319,13 +2403,13 @@ begin
if IsToplevel then // is a toplevel window
begin
{ setup a window icon }
- IconPixMap := XCreateBitmapFromData(fpgApplication.Display, FWinHandle,
+
+ IconPixMap := XCreateBitmapFromData(xapplication.display, FWinHandle,
@IconBitmapBits, IconBitmapWidth, IconBitmapHeight);
WMHints := XAllocWMHints;
WMHints^.icon_pixmap := IconPixmap;
WMHints^.flags := IconPixmapHint;
-
{ setup window grouping posibilities }
if (not (waX11SkipWMHints in FWindowAttributes)) and (FWindowType = wtWindow) then
begin
@@ -2333,8 +2417,7 @@ begin
WMHints^.window_group := xapplication.FLeaderWindow;
end;
-
- XSetWMProperties(fpgApplication.Display, FWinHandle, nil, nil, nil, 0, nil, WMHints, nil);
+ XSetWMProperties(xapplication.display, FWinHandle, nil, nil, nil, 0, nil, WMHints, nil);
if (not (waX11SkipWMHints in FWindowAttributes)) and (FWindowType = wtWindow) then
begin
@@ -2355,6 +2438,9 @@ begin
begin
DoDNDEnabled(True);
end;
+
+ if xapplication.xia_net_wm_icon <> 0 then
+ ApplyFormIcon;
end;
FillChar(hints, sizeof(hints), 0);
@@ -2380,9 +2466,17 @@ begin
if (FWindowType <> wtChild) and (waSizeable in FWindowAttributes) then
begin
- hints.flags := hints.flags or PMinSize;
+ hints.flags := hints.flags or PMinSize or PMaxSize;
hints.min_width := FMinWidth;
hints.min_height := FMinHeight;
+ if FMaxWidth > 0 then
+ hints.max_width := FMaxWidth
+ else
+ hints.max_width := xapplication.ScreenWidth;
+ if FMaxHeight > 0 then
+ hints.max_height := FMaxHeight
+ else
+ hints.max_height := xapplication.ScreenHeight;
end
else
begin
diff --git a/src/corelib/x11/fpgui_toolkit.lpk b/src/corelib/x11/fpgui_toolkit.lpk
index 7793f989..e59e4617 100644
--- a/src/corelib/x11/fpgui_toolkit.lpk
+++ b/src/corelib/x11/fpgui_toolkit.lpk
@@ -28,8 +28,8 @@
</CompilerOptions>
<Description Value="fpGUI Toolkit"/>
<License Value="LGPL 2 with static linking exception."/>
- <Version Major="1"/>
- <Files Count="105">
+ <Version Major="1" Minor="3"/>
+ <Files Count="110">
<Item1>
<Filename Value="../stdimages.inc"/>
<Type Value="Include"/>
@@ -450,6 +450,26 @@
<Filename Value="../../gui/fpg_style_win8.pas"/>
<UnitName Value="fpg_style_win8"/>
</Item105>
+ <Item106>
+ <Filename Value="../../gui/fpg_scrollframe.pas"/>
+ <UnitName Value="fpg_scrollframe"/>
+ </Item106>
+ <Item107>
+ <Filename Value="../../gui/inputintegerdialog.inc"/>
+ <Type Value="Include"/>
+ </Item107>
+ <Item108>
+ <Filename Value="../../gui/fpg_toggle.pas"/>
+ <UnitName Value="fpg_toggle"/>
+ </Item108>
+ <Item109>
+ <Filename Value="../../gui/fpg_stringgridbuilder.pas"/>
+ <UnitName Value="fpg_StringGridBuilder"/>
+ </Item109>
+ <Item110>
+ <Filename Value="../fpg_csvparser.pas"/>
+ <UnitName Value="fpg_CSVParser"/>
+ </Item110>
</Files>
<LazDoc Paths="../../../docs/xml/corelib;../../../docs/xml/corelib/x11;../../../docs/xml/corelib/gdi;../../../docs/xml/gui"/>
<RequiredPkgs Count="1">
diff --git a/src/corelib/x11/fpgui_toolkit.pas b/src/corelib/x11/fpgui_toolkit.pas
index d6855fc9..be9f3b5a 100644
--- a/src/corelib/x11/fpgui_toolkit.pas
+++ b/src/corelib/x11/fpgui_toolkit.pas
@@ -23,7 +23,8 @@ uses
fpg_style_bluecurve, fpg_style_bitmap, fpg_readonly, fpg_imgfmt_png,
U_Command, U_Pdf, U_Report, U_ReportImages, U_Visu, fpg_trayicon, Agg2D,
fpg_dbugintf, fpg_dbugmsg, fpg_fontcache, fpg_style_carbon,
- fpg_style_plastic, fpg_style_win8;
+ fpg_style_plastic, fpg_style_win8, fpg_scrollframe, fpg_toggle,
+ fpg_StringGridBuilder, fpg_CSVParser;
implementation
diff --git a/src/extrafpc.cfg b/src/extrafpc.cfg
index 24f678b2..d1600da1 100644
--- a/src/extrafpc.cfg
+++ b/src/extrafpc.cfg
@@ -26,6 +26,8 @@
# For a release compile with optimizes and strip debuginfo
#IFDEF RELEASE
-Xs
+ -O2
+ -B
#WRITE Compiling Release Version
#ENDIF
@@ -33,6 +35,7 @@
#IFDEF DEBUG
-g
-Crtoi
+ -B
#WRITE Compiling Debug Version
#ENDIF
diff --git a/src/gui/colordialog.inc b/src/gui/colordialog.inc
index 93d8d731..0ef8c3bb 100644
--- a/src/gui/colordialog.inc
+++ b/src/gui/colordialog.inc
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -22,6 +22,28 @@
type
+ TColorPickedEvent = procedure(Sender: TObject; const AMousePos: TPoint; const AColor: TfpgColor) of object;
+
+ TPickerButton = class(TfpgButton)
+ private
+ FContinuousResults: Boolean;
+ FOnColorPicked: TColorPickedEvent;
+ FColorPos: TPoint;
+ FColor: TfpgColor;
+ FColorPicking: Boolean;
+ private
+ procedure DoColorPicked;
+ protected
+ procedure HandleLMouseDown(X, Y: integer; ShiftState: TShiftState); override;
+ procedure HandleLMouseUp(x, y: integer; shiftstate: TShiftState); override;
+ procedure HandleMouseMove(x, y: integer; btnstate: word; shiftstate: TShiftState); override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ published
+ property ContinuousResults: Boolean read FContinuousResults write FContinuousResults;
+ property OnColorPicked: TColorPickedEvent read FOnColorPicked write FOnColorPicked;
+ end;
+
TfpgColorSelectDialog = class(TfpgBaseDialog)
private
{@VFD_HEAD_BEGIN: ColorSelectDialog}
@@ -37,19 +59,29 @@ type
edR: TfpgSpinEdit;
edG: TfpgSpinEdit;
edB: TfpgSpinEdit;
- Label3: TfpgLabel;
- Label4: TfpgLabel;
- Label5: TfpgLabel;
- pnlColorPreview: TfpgBevel;
+ lblRed: TfpgLabel;
+ lblGreen: TfpgLabel;
+ lblBlue: TfpgLabel;
+ btnPicker: TPickerButton;
+ chkContinuous: TfpgCheckBox;
+ lblHex: TfpgLabel;
+ edHex: TfpgEdit;
{@VFD_HEAD_END: ColorSelectDialog}
FViaRGB: Boolean; // to prevent recursive changes
+ FColorPicking: Boolean;
+ procedure btnColorPicked(Sender: TObject; const AMousePos: TPoint; const AColor: TfpgColor);
+ procedure chkContinuousChanged(Sender: TObject);
function GetSelectedColor: TfpgColor;
procedure SetSelectedColor(const AValue: TfpgColor);
procedure ColorChanged(Sender: TObject);
+ procedure NamedColorChanged(Sender: TObject);
procedure RGBChanged(Sender: TObject);
procedure UpdateRGBComponents;
procedure PopulatePaletteColorCombo;
procedure cbColorPaletteChange(Sender: TObject);
+ procedure OnTabChange(Sender: TObject; tab:TfpgTabSheet);
+ protected
+ procedure SetupCaptions; override;
public
constructor Create(AOwner: TComponent); override;
procedure AfterCreate; override;
@@ -79,8 +111,120 @@ begin
end;
end;
+
+function ConvertToHex(Value: integer): string;
+var
+ ValH, ValL: integer;
+begin
+ ValH := Value div 16;
+ ValL := Value mod 16;
+ case ValH of
+ 15:
+ Result := 'F';
+ 14:
+ Result := 'E';
+ 13:
+ Result := 'D';
+ 12:
+ Result := 'C';
+ 11:
+ Result := 'B';
+ 10:
+ Result := 'A';
+ else
+ Result := IntToStr(ValH);
+ end;
+ case ValL of
+ 15:
+ Result := Result + 'F';
+ 14:
+ Result := Result + 'E';
+ 13:
+ Result := Result + 'D';
+ 12:
+ Result := Result + 'C';
+ 11:
+ Result := Result + 'B';
+ 10:
+ Result := Result + 'A';
+ else
+ Result := Result + IntToStr(ValL);
+ end;
+end;
+
+function Hex(Red, Green, Blue: integer): string;
+begin
+ Result := '$' + ConvertToHex(Red) + ConvertToHex(Green) + ConvertToHex(Blue);
+end;
+
+{ TPickerButton }
+
+procedure TPickerButton.DoColorPicked;
+var
+ pt: TPoint;
+begin
+ pt := WindowToScreen(self, FColorPos);
+ FColor := fpgApplication.GetScreenPixelColor(pt);
+ if Assigned(FOnColorPicked) then
+ FOnColorPicked(self, FColorPos, FColor);
+end;
+
+procedure TPickerButton.HandleLMouseDown(X, Y: integer; ShiftState: TShiftState);
+begin
+ inherited HandleLMouseDown(X, Y, ShiftState);
+ MouseCursor := mcCross;
+ FColorPicking := True;
+ CaptureMouse;
+end;
+
+procedure TPickerButton.HandleLMouseUp(x, y: integer; shiftstate: TShiftState);
+begin
+ inherited HandleLMouseUp(x, y, shiftstate);
+ ReleaseMouse;
+ FColorPicking := False;
+ MouseCursor := mcDefault;
+ DoColorPicked;
+end;
+
+procedure TPickerButton.HandleMouseMove(x, y: integer; btnstate: word;
+ shiftstate: TShiftState);
+begin
+ //inherited HandleMouseMove(x, y, btnstate, shiftstate);
+ if not FColorPicking then
+ Exit;
+ FColorPos.x := x;
+ FColorPos.y := y;
+ if FContinuousResults then
+ DoColorPicked;
+end;
+
+constructor TPickerButton.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FColorPicking := False;
+ FContinuousResults := False;
+end;
+
{ TfpgColorSelectDialog }
+procedure TfpgColorSelectDialog.OnTabChange(Sender: TObject; tab:TfpgTabSheet);
+begin
+ if pcColorSelect.ActivePageIndex = 0 then
+ RGBChanged(sender)
+ else
+ NamedColorChanged(sender) ;
+end;
+
+procedure TfpgColorSelectDialog.btnColorPicked(Sender: TObject; const AMousePos: TPoint; const AColor: TfpgColor);
+begin
+ ColorWheel.SetSelectedColor(AColor);
+end;
+
+procedure TfpgColorSelectDialog.chkContinuousChanged(Sender: TObject);
+begin
+ btnPicker.ContinuousResults := chkContinuous.Checked;
+end;
+
function TfpgColorSelectDialog.GetSelectedColor: TfpgColor;
begin
if pcColorSelect.ActivePageIndex = 0 then
@@ -99,7 +243,24 @@ begin
// UpdateHSVComponents;
if not FViaRGB then
UpdateRGBComponents;
- pnlColorPreview.BackgroundColor := ValueBar.SelectedColor;
+end;
+
+procedure TfpgColorSelectDialog.NamedColorChanged(Sender: TObject);
+var
+ tred, tgreen, tblue: Byte;
+begin
+ tred := fpgGetRed(ColorListBox1.Color);
+ tgreen := fpgGetGreen(ColorListBox1.Color);
+ tblue := fpgGetBlue(ColorListBox1.Color);
+
+ // keep text readable based on background color
+ if (tred + tgreen + tblue) / (256*3) >0.60 then
+ edHex.TextColor := clBlack
+ else
+ edHex.TextColor := clWhite ;
+
+ edHex.BackgroundColor:=ColorListBox1.Color;
+ edHex.Text := Hex(tred,tgreen,tblue);
end;
procedure TfpgColorSelectDialog.RGBChanged(Sender: TObject);
@@ -114,6 +275,13 @@ begin
c := FPColorTofpgColor(rgb);
ColorWheel.SetSelectedColor(c); // This will trigger ColorWheel and ValueBar OnChange event
FViaRGB := False;
+ // keep text readable based on background color
+ if ValueBar.Value > 0.75 then
+ edHex.TextColor := clBlack
+ else
+ edHex.TextColor := clWhite;
+ edHex.BackgroundColor := c;
+ edHex.Text := Hex(rgb.Red, rgb.Green, rgb.Blue);
end;
procedure TfpgColorSelectDialog.UpdateRGBComponents;
@@ -126,6 +294,13 @@ begin
edR.Value := rgb.Red;
edG.Value := rgb.Green;
edB.Value := rgb.Blue;
+ // keep text readable based on background color
+ if ValueBar.Value > 0.75 then
+ edHex.TextColor := clBlack
+ else
+ edHex.TextColor := clWhite;
+ edHex.BackgroundColor := c;
+ edHex.Text := Hex(rgb.Red, rgb.Green, rgb.Blue);
end;
procedure TfpgColorSelectDialog.PopulatePaletteColorCombo;
@@ -149,21 +324,34 @@ begin
ColorListBox1.SetFocus;
end;
+procedure TfpgColorSelectDialog.SetupCaptions;
+begin
+ inherited SetupCaptions;
+ tsColorWheel.Text := rsTabsheetColorWheel;
+ tsColorNames.Text := rsTabPredefined;
+ lblRed.Text := rsColorRed;
+ lblGreen.Text := rsColorGreen;
+ lblBlue.Text := rsColorBlue;
+ chkContinuous.Text := rsContinuous;
+ btnPicker.Hint := rsColorPickerHint;
+ lblHex.Text := rsHexadecimal;
+end;
+
constructor TfpgColorSelectDialog.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FViaRGB := false;
end;
-
procedure TfpgColorSelectDialog.AfterCreate;
begin
{%region 'Auto-generated GUI code' -fold}
{@VFD_BODY_BEGIN: ColorSelectDialog}
Name := 'ColorSelectDialog';
- SetPosition(340, 164, 328, 375);
+ SetPosition(340, 164, 328, 385);
WindowTitle := 'Color Select Dialog';
Hint := '';
+ IconName := '';
WindowPosition := wpOneThirdDown;
pcColorSelect := TfpgPageControl.Create(self);
@@ -172,9 +360,9 @@ begin
Name := 'pcColorSelect';
SetPosition(4, 4, 320, 332);
Anchors := [anLeft,anRight,anTop,anBottom];
- ActivePageIndex := 0;
Hint := '';
TabOrder := 1;
+ OnChange := @OnTabChange;
end;
tsColorWheel := TfpgTabSheet.Create(pcColorSelect);
@@ -182,6 +370,7 @@ begin
begin
Name := 'tsColorWheel';
SetPosition(3, 24, 314, 305);
+ Anchors := [anLeft,anRight,anTop,anBottom];
Text := 'Color Wheel';
end;
@@ -190,7 +379,8 @@ begin
begin
Name := 'tsColorNames';
SetPosition(3, 24, 314, 305);
- Text := 'Predefined';
+ Anchors := [anLeft,anRight,anTop,anBottom];
+ Text := rsTabPredefined;
end;
cbColorPalette := TfpgComboBox.Create(tsColorNames);
@@ -199,9 +389,12 @@ begin
Name := 'cbColorPalette';
SetPosition(8, 24, 299, 22);
Anchors := [anLeft,anRight,anTop];
+ ExtraHint := '';
FontDesc := '#List';
Hint := '';
+ FocusItem := -1;
TabOrder := 1;
+ OnChange:= @NamedColorChanged;
end;
ColorListBox1 := TfpgColorListBox.Create(tsColorNames);
@@ -210,10 +403,11 @@ begin
Name := 'ColorListBox1';
SetPosition(8, 72, 299, 224);
Anchors := [anLeft,anRight,anTop,anBottom];
- Color := TfpgColor($00FFFF);
+ Color := TfpgColor($FF00FFFF);
FontDesc := '#List';
Hint := '';
TabOrder := 2;
+ OnChange:= @NamedColorChanged;
end;
Label1 := TfpgLabel.Create(tsColorNames);
@@ -282,10 +476,10 @@ begin
OnChange := @RGBChanged;
end;
- Label3 := TfpgLabel.Create(tsColorWheel);
- with Label3 do
+ lblRed := TfpgLabel.Create(tsColorWheel);
+ with lblRed do
begin
- Name := 'Label3';
+ Name := 'lblRed';
SetPosition(8, 220, 80, 16);
Alignment := taRightJustify;
FontDesc := '#Label1';
@@ -293,10 +487,10 @@ begin
Text := 'Red';
end;
- Label4 := TfpgLabel.Create(tsColorWheel);
- with Label4 do
+ lblGreen := TfpgLabel.Create(tsColorWheel);
+ with lblGreen do
begin
- Name := 'Label4';
+ Name := 'lblGreen';
SetPosition(8, 248, 80, 16);
Alignment := taRightJustify;
FontDesc := '#Label1';
@@ -304,10 +498,10 @@ begin
Text := 'Green';
end;
- Label5 := TfpgLabel.Create(tsColorWheel);
- with Label5 do
+ lblBlue := TfpgLabel.Create(tsColorWheel);
+ with lblBlue do
begin
- Name := 'Label5';
+ Name := 'lblBlue';
SetPosition(8, 276, 80, 16);
Alignment := taRightJustify;
FontDesc := '#Label1';
@@ -315,17 +509,61 @@ begin
Text := 'Blue';
end;
- pnlColorPreview := TfpgBevel.Create(tsColorWheel);
- with pnlColorPreview do
+ btnPicker := TPickerButton.Create(tsColorWheel);
+ with btnPicker do
+ begin
+ Name := 'btnPicker';
+ SetPosition(167, 230, 23, 23);
+ Text := '';
+ FontDesc := '#Label1';
+ Hint := '';
+ ImageMargin := -1;
+ ImageName := 'stdimg.colpicker';
+ FShowHint := True;
+ TabOrder := 24;
+ OnColorPicked := @btnColorPicked;
+ end;
+
+ chkContinuous := TfpgCheckBox.Create(tsColorWheel);
+ with chkContinuous do
begin
- Name := 'pnlColorPreview';
- SetPosition(248, 232, 52, 52);
+ Name := 'chkContinuous';
+ SetPosition(167, 258, 130, 20);
+ FontDesc := '#Label1';
+ Hint := '';
+ TabOrder := 25;
+ Text := 'Continuous';
+ OnChange := @chkContinuousChanged;
+ end;
+
+ lblHex := TfpgLabel.Create(self);
+ with lblHex do
+ begin
+ Name := 'lblHex';
+ SetPosition(25, 340, 100, 15);
+ Alignment := taCenter;
+ FontDesc := '#Label1';
+ Hint := '';
+ Text := 'Hexadecimal';
+ end;
+
+ edHex := TfpgEdit.Create(self);
+ with edHex do
+ begin
+ Name := 'edHex';
+ SetPosition(25, 356, 100, 23);
+ ExtraHint := '';
+ FontDesc := '#Label1';
Hint := '';
+ TabOrder := 3;
+ Text := '';
+ MaxLength:= 7;
end;
{@VFD_BODY_END: ColorSelectDialog}
{%endregion}
+ FColorPicking := False;
// link colorwheel and valuebar
ColorWheel.ValueBar := ValueBar;
diff --git a/src/gui/fpg_basegrid.pas b/src/gui/fpg_basegrid.pas
index 146887b9..2df7b414 100644
--- a/src/gui/fpg_basegrid.pas
+++ b/src/gui/fpg_basegrid.pas
@@ -32,7 +32,7 @@ uses
fpg_widget,
fpg_scrollbar,
fpg_menu;
-
+
type
TfpgGridDrawState = set of (gdSelected, gdFocused, gdFixed);
@@ -51,7 +51,7 @@ type
// Column 2 is special just for testing purposes. Descendant classes will
// override that special behavior anyway.
-
+
TfpgBaseGrid = class(TfpgWidget)
private
FColResizing: boolean;
@@ -79,6 +79,7 @@ type
FScrollBarStyle: TfpgScrollStyle;
FShowGrid: boolean;
FShowHeader: boolean;
+ FAutoHeight: boolean;
FTemp: integer;
FVScrollBar: TfpgScrollBar;
FHScrollBar: TfpgScrollBar;
@@ -89,14 +90,19 @@ type
FBorderStyle: TfpgEditBorderStyle;
function GetFontDesc: string;
function GetHeaderFontDesc: string;
+ function GetScrollBarWidth: Integer;
function GetTotalColumnWidth: integer;
function GetAdjustedBorderSizes: TRect;
procedure HScrollBarMove(Sender: TObject; position: integer);
procedure SetFontDesc(const AValue: string);
procedure SetHeaderFontDesc(const AValue: string);
+ procedure SetHeaderHeight(const AValue: integer);
procedure SetHeaderStyle(const AValue: TfpgGridHeaderStyle);
procedure SetRowSelect(const AValue: boolean);
procedure SetScrollBarStyle(const AValue: TfpgScrollStyle);
+ function GetScrollBarPage: integer;
+ procedure SetScrollBarPage(const AValue: integer);
+ procedure SetScrollBarWidth(const AValue: integer);
procedure VScrollBarMove(Sender: TObject; position: integer);
procedure SetDefaultColWidth(const AValue: integer);
procedure SetDefaultRowHeight(const AValue: integer);
@@ -105,10 +111,12 @@ type
procedure CheckFocusChange;
procedure SetShowGrid(const AValue: boolean);
procedure SetShowHeader(const AValue: boolean);
+ procedure SetAutoHeight(const AValue: boolean);
function VisibleLines: Integer;
procedure SetFirstRow(const AValue: Integer);
procedure SetAlternativeBGColor(const AValue: TfpgColor);
procedure SetBorderStyle(AValue: TfpgEditBorderStyle);
+ function AdjustHeight: Integer;
protected
property UpdateCount: integer read FUpdateCount;
procedure UpdateScrollBars; virtual;
@@ -133,6 +141,7 @@ type
procedure HandleResize(awidth, aheight: TfpgCoord); override;
procedure HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean); override;
procedure HandleMouseScroll(x, y: integer; shiftstate: TShiftState; delta: smallint); override;
+ procedure HandleMouseHorizScroll(x, y: integer; shiftstate: TShiftState; delta: smallint); override;
procedure HandleMouseMove(x, y: integer; btnstate: word; shiftstate: TShiftState); override;
procedure HandleLMouseUp(x, y: integer; shiftstate: TShiftState); override;
procedure HandleLMouseDown(x, y: integer; shiftstate: TShiftState); override;
@@ -156,8 +165,11 @@ type
property RowCount: Integer read GetRowCount;
property ShowHeader: boolean read FShowHeader write SetShowHeader default True;
property ShowGrid: boolean read FShowGrid write SetShowGrid default True;
+ property AutoHeight: boolean read FAutoHeight write SetAutoHeight default False;
property ScrollBarStyle: TfpgScrollStyle read FScrollBarStyle write SetScrollBarStyle default ssAutoBoth;
- property HeaderHeight: integer read FHeaderHeight;
+ property ScrollBarPage: Integer read GetScrollBarPage write SetScrollBarPage;
+ property ScrollBarWidth: Integer read GetScrollBarWidth write SetScrollBarWidth;
+ property HeaderHeight: integer read FHeaderHeight write SetHeaderHeight;
property TotalColumnWidth: integer read GetTotalColumnWidth;
// property ColResizing: boolean read FColResizing write FColResizing;
property ColumnWidth[ACol: Integer]: integer read GetColumnWidth write SetColumnWidth;
@@ -223,6 +235,11 @@ begin
Result := FHeaderFont.FontDesc;
end;
+function TfpgBaseGrid.GetScrollBarWidth: Integer;
+begin
+ Result := FVScrollBar.Width;
+end;
+
function TfpgBaseGrid.GetTotalColumnWidth: integer;
var
i: integer;
@@ -276,6 +293,13 @@ begin
RePaint;
end;
+procedure TfpgBaseGrid.SetHeaderHeight(const AValue: integer);
+begin
+ if AValue >= FHeaderFont.Height + 2 then
+ FHeaderHeight := AValue;
+ Repaint;
+end;
+
procedure TfpgBaseGrid.SetHeaderStyle(const AValue: TfpgGridHeaderStyle);
begin
if FHeaderStyle = AValue then
@@ -299,6 +323,28 @@ begin
FScrollBarStyle := AValue;
end;
+function TfpgBaseGrid.GetScrollBarPage: integer;
+begin
+ Result:= FVScrollBar.PageSize;
+end;
+
+procedure TfpgBaseGrid.SetScrollBarPage(const AValue: integer);
+begin
+ if AValue= FVScrollBar.PageSize then
+ Exit; //==>
+ FVScrollBar.PageSize:= AValue;
+end;
+
+procedure TfpgBaseGrid.SetScrollBarWidth(const AValue: integer);
+begin
+ if FVScrollBar.Width = AValue then
+ Exit; //==>
+ FVScrollBar.Width := AValue;
+ FHScrollBar.Height:= AValue;
+ if FAutoHeight then
+ Height := AdjustHeight;
+end;
+
procedure TfpgBaseGrid.VScrollBarMove(Sender: TObject; position: integer);
begin
if FFirstRow <> position then
@@ -549,6 +595,15 @@ begin
RePaint;
end;
+procedure TfpgBaseGrid.SetAutoHeight(const AValue: boolean);
+begin
+ if FAutoHeight= AValue then
+ Exit; //==>
+ FAutoHeight := AValue;
+ if FAutoHeight then
+ Height := AdjustHeight;
+end;
+
// Return the fully visible lines only. Partial lines not counted
function TfpgBaseGrid.VisibleLines: Integer;
var
@@ -611,6 +666,28 @@ begin
Repaint;
end;
+function TfpgBaseGrid.AdjustHeight: Integer;
+var
+ r: TRect;
+begin
+ if FAutoHeight then
+ begin
+ r := GetAdjustedBorderSizes;
+ if FShowHeader then
+ if (FScrollBarStyle = ssHorizontal) or (FScrollBarStyle = ssAutoBoth) then
+ Result := Succ(((Height - r.Bottom * 2 - HeaderHeight - FHScrollBar.Height) div DefaultRowHeight) * DefaultRowHeight + HeaderHeight + FHScrollBar.Height + r.Bottom * 2)
+ else
+ Result := Succ(((Height - r.Bottom * 2 - HeaderHeight) div DefaultRowHeight) * DefaultRowHeight + HeaderHeight + r.Bottom * 2)
+ else
+ if (FScrollBarStyle = ssHorizontal) or (FScrollBarStyle = ssAutoBoth) then
+ Result := Succ(((Height - r.Bottom * 2 - FHScrollBar.Height) div DefaultRowHeight) * DefaultRowHeight + FHScrollBar.Height + r.Bottom * 2)
+ else
+ Result := Succ(((Height - r.Bottom * 2) div DefaultRowHeight) * DefaultRowHeight + r.Bottom * 2);
+ if Align = alBottom then
+ Top := Top + Height - result;
+ end;
+end;
+
procedure TfpgBaseGrid.UpdateScrollBars;
var
HWidth: integer;
@@ -620,8 +697,10 @@ var
vl: integer;
i: integer;
x: integer;
- Hfits, showH: boolean;
- Vfits, showV: boolean;
+ hmax: integer;
+ vmax: integer;
+ Hfits, showH : boolean;
+ Vfits, showV : boolean;
crect: TfpgRect;
borders: TRect;
@@ -634,7 +713,7 @@ var
UpdateWindowPosition;
end;
end;
-
+
procedure getVisWidth;
begin
if showV then
@@ -657,6 +736,22 @@ var
Vfits := vl >= RowCount;
end;
+ function ColMax: integer;
+ var
+ i: integer;
+ w: integer;
+ begin
+ w := 0;
+ Result := 0;
+ for i := 0 to ColumnCount-1 do
+ begin
+ w := w + ColumnWidth[i];
+ if w > Width then
+ inc(Result);
+ end;
+ inc(Result);
+ end;
+
begin
// if we don't want any scrollbars, hide them and exit
if FScrollBarStyle = ssNone then
@@ -678,7 +773,7 @@ begin
showH := False;
getVisWidth;
getVisLines;
-
+
// determine whether to show scrollbars for different configurations
case FScrollBarStyle of
ssHorizontal:
@@ -722,6 +817,25 @@ begin
getVisLines;
end;
end;
+ ssHorizVisible:
+ begin
+ hideScrollbar (FVScrollBar);
+ showH := true;
+ getVisLines;
+ end;
+ ssVertiVisible:
+ begin
+ hideScrollbar (FHScrollBar);
+ showV := true;
+ getVisWidth;
+ end;
+ ssBothVisible:
+ begin
+ showV := true;
+ showH := true;
+ getVisLines;
+ getVisWidth;
+ end;
end;
// set the scrollbar width/height space
@@ -740,7 +854,10 @@ begin
FVScrollBar.SliderSize := VisibleLines / RowCount
else
FVScrollBar.SliderSize := 0;
- FVScrollBar.Max := RowCount-VisibleLines;
+ vmax := RowCount - VisibleLines;
+ if FFirstRow > vmax then
+ FFirstRow := vmax;
+ FVScrollBar.Max := vmax;
FVScrollBar.Position := FFirstRow;
FVScrollBar.RepaintSlider;
FVScrollBar.Top := borders.Top;
@@ -761,18 +878,20 @@ begin
FHScrollBar.Min := 0;
if go_SmoothScroll in FOptions then
begin
- FHScrollBar.Max := cw - vw;
+ hmax := cw - vw;
+ FHScrollBar.Max := hmax;
+ if FXOffset>hmax then
+ FXOffset:=hmax;
FHScrollBar.Position := FXOffset;
- FHScrollBar.SliderSize := HWidth / TotalColumnWidth;
FHScrollBar.PageSize := 5;
end
else
begin
- FHScrollBar.Max := ColumnCount-1;
+ FHScrollBar.Max := ColMax;
FHScrollBar.Position := FFirstCol;
- FHScrollBar.SliderSize := 1 / ColumnCount;
FHScrollBar.PageSize := 1;
end;
+ FHScrollBar.SliderSize := HWidth / TotalColumnWidth;
FHScrollBar.RepaintSlider;
FHScrollBar.Top := Height - FHScrollBar.Height - borders.Bottom;
FHScrollBar.Left := borders.Left;
@@ -982,7 +1101,7 @@ begin
Canvas.SetClipRect(clipr);
Canvas.SetColor(FBackgroundColor);
-
+
// clearing after the last column
if r.Left <= clipr.Right then
begin
@@ -1133,7 +1252,7 @@ begin
end;
consumed := True;
end;
-
+
keyHome:
begin
if FRowSelect then
@@ -1159,7 +1278,7 @@ begin
end;
consumed := True;
end;
-
+
keyEnd:
begin
if FRowSelect then
@@ -1185,7 +1304,7 @@ begin
consumed := True;
end;
end; { case }
-
+
if consumed then
CheckFocusChange;
@@ -1195,49 +1314,66 @@ end;
procedure TfpgBaseGrid.HandleMouseScroll(x, y: integer; shiftstate: TShiftState; delta: smallint);
var
lRow: Integer;
- lCol: Integer;
begin
inherited HandleMouseScroll(x, y, shiftstate, delta);
lRow := FFirstRow;
- lCol := FFirstCol;
- if delta > 0 then // scroll down
- inc(FFirstRow, abs(delta)*3)
- else // scroll up
- if FFirstRow > 0 then
- dec(FFirstRow, abs(delta)*3);
+ // If vertical scrollbar is not visible, but
+ // horizontal is, Mouse wheel will scroll horizontally. :)
+ if FHScrollBar.Visible and (not FVScrollBar.Visible) then
+ begin
+ HandleMouseHorizScroll(x, y, shiftstate, delta);
+ Exit;
+ end;
+
+ inc(FFirstRow, delta*3);
// apply limits
if FFirstRow > RowCount - VisibleLines then
FFirstRow := RowCount - VisibleLines;
if FFirstRow < 0 then
FFirstRow := 0;
-
- // scroll left/right
- // If vertical scrollbar is not visible, but
- // horizontal is. Mouse wheel will scroll horizontally. :)
- if FHScrollBar.Visible and (not FVScrollBar.Visible) then
- begin
- if delta > 0 then // scroll right
- begin
- if FFirstCol < (ColumnCount-1) then
- inc(FFirstCol);
- end
- else
- begin
- if FFirstCol > 0 then
- dec(FFirstCol);
- end;
- end;
- if (lRow <> FFirstRow) or (lCol <> FFirstCol) then
+ if lRow <> FFirstRow then
begin
UpdateScrollBars;
RePaint;
end;
end;
+procedure TfpgBaseGrid.HandleMouseHorizScroll(x, y: integer; shiftstate: TShiftState; delta: smallint);
+var
+ old_val: Integer;
+begin
+ inherited HandleMouseHorizScroll(x, y, shiftstate, delta);
+
+ if go_SmoothScroll in Options then
+ begin
+ old_val := FXOffset;
+ inc(FXOffset, delta*FHScrollBar.ScrollStep);
+ if (FXOffset<0) then
+ FXOffset:=0;
+ // finding the maximum Xoffset is tricky, let updatescrollbars do it.
+ if (FXOffset=old_val) then
+ Exit;
+ end
+ else
+ begin
+ old_val := FFirstCol;
+ inc(FFirstCol, delta);
+ if FFirstCol<0 then
+ FFirstCol:=0
+ else if FFirstCol > ColumnCount-1 then
+ FFirstCol:=ColumnCount-1;
+ if FFirstCol=old_val then
+ Exit;
+ end;
+
+ UpdateScrollBars;
+ RePaint;
+end;
+
procedure TfpgBaseGrid.HandleMouseMove(x, y: integer; btnstate: word; shiftstate: TShiftState);
var
hh: integer;
@@ -1249,7 +1385,7 @@ var
borders: TRect;
begin
inherited HandleMouseMove(x, y, btnstate, shiftstate);
-
+
if (ColumnCount = 0) or (RowCount = 0) then
Exit; //==>
@@ -1434,7 +1570,7 @@ begin
begin // Selecting a Cell via mouse
MouseToCell(x, y, FFocusCol, FFocusRow);
end; { if/else }
-
+
if not CanSelectCell(FFocusRow, FFocusCol) then
begin
// restore previous values
@@ -1478,6 +1614,7 @@ procedure TfpgBaseGrid.FollowFocus;
var
n: Integer;
w: TfpgCoord;
+ lmin, lmax: TfpgCoord;
begin
if (RowCount > 0) and (FFocusRow < 0) then
FFocusRow := 0;
@@ -1520,6 +1657,19 @@ begin
end;
end; { for }
end; { if/else }
+
+ // If smoothscroll, convert FFirstCol to X Offset value
+ if go_SmoothScroll in FOptions then
+ begin
+ w := 0;
+ for n := 0 to FFocusCol-1 do
+ w := w + ColumnWidth[n];
+ lmin := FXOffset;
+ lmax := FXOffset + VisibleWidth;
+ if (w > lmax) or (w < lmin) then
+ FXOffset := w;
+ end;
+
CheckFocusChange;
UpdateScrollBars;
end;
@@ -1557,7 +1707,7 @@ begin
FFont := fpgGetFont('#Grid');
FHeaderFont := fpgGetFont('#GridHeader');
-
+
FTemp := 50; // Just to prove that ColumnWidth does adjust.
FDefaultColWidth := 64;
FDefaultRowHeight := FFont.Height + 2;
@@ -1568,7 +1718,7 @@ begin
MinHeight := HeaderHeight + DefaultRowHeight + borders.Top + borders.Bottom;
MinWidth := DefaultColWidth + borders.Left + borders.Right;
-
+
FVScrollBar := TfpgScrollBar.Create(self);
FVScrollBar.Orientation := orVertical;
FVScrollBar.Visible := False;
@@ -1578,7 +1728,7 @@ begin
FHScrollBar.Orientation := orHorizontal;
FHScrollBar.Visible := False;
FHScrollBar.OnScroll := @HScrollBarMove;
- FHScrollBar.ScrollStep := 5;
+ FHScrollBar.ScrollStep := 20;
end;
destructor TfpgBaseGrid.Destroy;
diff --git a/src/gui/fpg_checkbox.pas b/src/gui/fpg_checkbox.pas
index 2b4b11d8..cd0e9920 100644
--- a/src/gui/fpg_checkbox.pas
+++ b/src/gui/fpg_checkbox.pas
@@ -50,6 +50,7 @@ type
procedure SetText(const AValue: string);
procedure DoOnChange;
protected
+ procedure HandleCheckChanged; virtual;
procedure HandlePaint; override;
procedure HandleLMouseDown(x, y: integer; shiftstate: TShiftState); override;
procedure HandleLMouseUp(x, y: integer; shiftstate: TShiftState); override;
@@ -121,6 +122,7 @@ begin
if FChecked = AValue then
Exit; //==>
FChecked := AValue;
+ HandleCheckChanged;
RePaint;
if not (csDesigning in ComponentState) then
DoOnChange;
@@ -173,6 +175,11 @@ begin
FOnChange(self);
end;
+procedure TfpgBaseCheckBox.HandleCheckChanged;
+begin
+ // nothing here for us
+end;
+
procedure TfpgBaseCheckBox.HandlePaint;
var
r: TfpgRect;
diff --git a/src/gui/fpg_customgrid.pas b/src/gui/fpg_customgrid.pas
index 83d35aa7..923bed91 100644
--- a/src/gui/fpg_customgrid.pas
+++ b/src/gui/fpg_customgrid.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -65,6 +65,7 @@ type
FColumns: TFPList;
procedure HandleSetFocus; override;
procedure SetTextColor(const AValue: TfpgColor); override;
+ procedure SetBackgroundColor(const AValue: TfpgColor); override;
function GetColumns(AIndex: integer): TfpgGridColumn; virtual;
procedure DoDeleteColumn(ACol: integer); virtual;
procedure DoSetRowCount(AValue: integer); virtual;
@@ -140,6 +141,18 @@ begin
Update;
end;
+procedure TfpgCustomGrid.SetBackgroundColor(const AValue: TfpgColor);
+var
+ i: integer;
+begin
+ inherited SetBackgroundColor(AValue);
+ for i := 0 to ColumnCount-1 do
+ begin
+ TfpgGridColumn(FColumns.Items[i]).BackgroundColor := AValue;
+ end;
+ RePaint;
+end;
+
function TfpgCustomGrid.GetColumns(AIndex: integer): TfpgGridColumn;
begin
if (AIndex < 0) or (AIndex > FColumns.Count-1) then
diff --git a/src/gui/fpg_dialogs.pas b/src/gui/fpg_dialogs.pas
index 99c5b208..7cb1ee20 100644
--- a/src/gui/fpg_dialogs.pas
+++ b/src/gui/fpg_dialogs.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2012 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -58,10 +58,10 @@ uses
type
TfpgMsgDlgType = (mtAbout, mtWarning, mtError, mtInformation, mtConfirmation,
mtCustom);
-
+
TfpgMsgDlgBtn = (mbNoButton, mbOK, mbCancel, mbYes, mbNo, mbAbort,
mbRetry, mbIgnore, mbAll, mbNoToAll, mbYesToAll, mbHelp, mbClose);
-
+
TfpgMsgDlgButtons = set of TfpgMsgDlgBtn;
const
@@ -104,7 +104,7 @@ type
property CentreText: Boolean read FCentreText write FCentreText default False;
property FontDesc: string read GetFontDesc write SetFontDesc;
end;
-
+
TfpgBaseDialog = class(TfpgForm)
protected
@@ -152,8 +152,8 @@ type
constructor Create(AOwner: TComponent); override;
procedure SetSampleText(AText: string);
end;
-
-
+
+
TfpgFileDialog = class(TfpgBaseDialog)
private
chlDir: TfpgComboBox;
@@ -227,6 +227,7 @@ type
{$I charmapdialog.inc}
{$I colordialog.inc}
{$I inputquerydialog.inc}
+{$I inputintegerdialog.inc}
{$I managebookmarksdialog.inc}
@@ -240,6 +241,7 @@ function SelectDirDialog(const AStartDir: TfpgString = ''): TfpgString;
function fpgShowCharMap: TfpgString;
function fpgSelectColorDialog(APresetColor: TfpgColor = clBlack): TfpgColor;
function fpgInputQuery(const ACaption, APrompt: TfpgString; var Value: TfpgString): Boolean;
+function fpgIntegerQuery(const ACaption, APrompt: TfpgString; var Value: Integer; const MaxValue: Integer; const MinValue: Integer = 0): Boolean;
implementation
@@ -253,8 +255,8 @@ uses
{$ENDIF}
,DateUtils
;
-
-
+
+
procedure WrapText(const AText: String; ALines: TStrings; AFont: TfpgFont;
const ALineWidth: Integer; out AWidth: Integer);
var
@@ -396,7 +398,7 @@ begin
dres := dlg.RunOpenFile
else
dres := dlg.RunSaveFile;
-
+
if dres then
Result := dlg.FileName
else
@@ -532,7 +534,7 @@ var
outw: integer;
begin
WrapText(AMessage, FLines, FFont, FMaxLineWidth, outw);
-
+
// dialog width with 10 pixel border on both sides
Width := outw + 2*10;
@@ -746,7 +748,7 @@ var
NextC;
end;
end;
-
+
procedure ProcessAliasFont;
var
i: integer;
@@ -787,7 +789,7 @@ begin
NextToken;
lbFaces.FocusItem := lbFaces.Items.IndexOf(token);
-
+
if c = '-' then
begin
NextC;
@@ -848,7 +850,7 @@ begin
MinHeight := Height;
FSampleText := 'The quick brown fox jumps over the lazy dog. 0123456789 [oO0,ilLI]';
FMode := 1; // normal fonts
-
+
btnCancel.Left := Width - FDefaultButtonWidth - FSpacing;
btnOK.Left := btnCancel.Left - FDefaultButtonWidth - FSpacing;
@@ -1002,7 +1004,7 @@ begin
Exit; //==>
if AText = '' then
Exit; //==>
-
+
FSampleText := AText;
memSample.Text := FSampleText;
end;
@@ -1173,7 +1175,7 @@ begin
end;
{ Create lower Panel details }
-
+
pnlFileInfo := TfpgPanel.Create(self);
with pnlFileInfo do
begin
@@ -1196,7 +1198,7 @@ begin
OnChange := @edFilenameChanged;
OnKeyPress := @edFilenameKeyPressed;
end;
-
+
{ Filter section }
chlFilter := TfpgComboBox.Create(self);
@@ -1400,7 +1402,7 @@ begin
ExcludeTrailingPathDelimiter(grid.FileList.DirectoryName))
else
fsel := '';
-
+
grid.FileList.FileMask := GetFileFilter;
grid.FileList.ShowHidden := ShowHidden;
@@ -1409,7 +1411,7 @@ begin
ShowMessage(Format(rsErrCouldNotOpenDir, [ADir]), rsError);
Exit; //==>
end;
-
+
grid.FileList.Sort(soFileName);
// we don't want chlDir to call DirChange while populating items
@@ -1422,7 +1424,7 @@ begin
HighlightFile(fsel)
else
grid.FocusRow := 0;
-
+
grid.Update;
grid.SetFocus;
@@ -1585,7 +1587,7 @@ begin
if not HighlightFile(fname) then
edFilename.Text := fname;
-
+
WindowTitle := rsOpenAFile;
btnOK.ImageName := 'stdimg.open'; // Do NOT localize
btnOK.Text := rsOpen;
@@ -1634,6 +1636,7 @@ end;
{$I charmapdialog.inc}
{$I colordialog.inc}
{$I inputquerydialog.inc}
+{$I inputintegerdialog.inc}
{$I managebookmarksdialog.inc}
diff --git a/src/gui/fpg_editcombo.pas b/src/gui/fpg_editcombo.pas
index 5b011b4d..12773d9b 100644
--- a/src/gui/fpg_editcombo.pas
+++ b/src/gui/fpg_editcombo.pas
@@ -367,7 +367,7 @@ begin
begin
if Items[i]= TDropDownWindow(FDropDown).ListBox.Items[TDropDownWindow(FDropDown).ListBox.FocusItem] then
begin
- FocusItem := i;
+ FNewItem := False;
FSelectedItem:= i;
FText:= Items[i];
Break;
@@ -734,17 +734,17 @@ var
// paint selection rectangle
procedure DrawSelection;
var
- lcolor: TfpgColor;
+ lcolor,ltxtcolor: TfpgColor;
begin
if Focused then
begin
lcolor := clSelection;
- Canvas.SetTextColor(clSelectionText);
+ ltxtcolor := clSelectionText;
end
else
begin
lcolor := clInactiveSel;
- Canvas.SetTextColor(clText1);
+ ltxtcolor := clText1;
end;
len := FSelOffset;
@@ -759,16 +759,16 @@ var
// XOR on Anti-aliased text doesn't look to good. Lets try standard
// Blue & White like what was doen in TfpgEdit.
-{ Canvas.SetColor(lcolor);
+ Canvas.SetColor(lcolor);
Canvas.FillRectangle(-FDrawOffset + FMargin + tw, 3, tw2 - tw, Font.Height);
r.SetRect(-FDrawOffset + FMargin + tw, 3, tw2 - tw, Font.Height);
Canvas.AddClipRect(r);
- Canvas.SetTextColor(clWhite);
- fpgStyle.DrawString(Canvas, -FDrawOffset + FMargin, 3, Text, Enabled);
+ Canvas.SetTextColor(ltxtcolor);
+ fpgStyle.DrawString(Canvas, -FDrawOffset + FMargin + tw, 3, UTF8Copy(Items[FSelectedItem], Succ(st), Pred(len)), Enabled);
Canvas.ClearClipRect;
-}
- Canvas.XORFillRectangle(fpgColorToRGB(lcolor) xor $FFFFFF,
- -FDrawOffset + FMargin + tw, 3, tw2 - tw, Font.Height);
+
+ //Canvas.XORFillRectangle(fpgColorToRGB(lcolor) xor $FFFFFF,
+ // -FDrawOffset + FMargin + tw, 3, tw2 - tw, Font.Height);
end;
begin
diff --git a/src/gui/fpg_form.pas b/src/gui/fpg_form.pas
index c80a1e53..3f1f2558 100644
--- a/src/gui/fpg_form.pas
+++ b/src/gui/fpg_form.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2011 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -44,6 +44,7 @@ type
TfpgBaseForm = class(TfpgWidget)
private
FFullScreen: boolean;
+ FIconName: TfpgString;
FOnActivate: TNotifyEvent;
FOnClose: TFormCloseEvent;
FOnCloseQuery: TFormCloseQueryEvent;
@@ -76,6 +77,7 @@ type
procedure DoKeyShortcut(const AOrigin: TfpgWidget; const keycode: word; const shiftstate: TShiftState; var consumed: boolean; const IsChildOfOrigin: boolean = False); override;
{ -- properties -- }
property DNDEnabled: boolean read FDNDEnabled write SetDNDEnabled default False;
+ property IconName: string read FIconName write FIconName;
property Sizeable: boolean read FSizeable write FSizeable;
property ModalResult: TfpgModalResult read FModalResult write FModalResult;
property FullScreen: boolean read FFullScreen write FFullScreen default False;
@@ -115,6 +117,7 @@ type
property FullScreen;
property Height;
property Hint;
+ property IconName;
property Left;
property MaxHeight;
property MaxWidth;
diff --git a/src/gui/fpg_grid.pas b/src/gui/fpg_grid.pas
index 3f8b52fb..1f7e0f54 100644
--- a/src/gui/fpg_grid.pas
+++ b/src/gui/fpg_grid.pas
@@ -136,6 +136,7 @@ type
published
property Align;
property AlternateBGColor;
+ property AutoHeight;
property BackgroundColor;
property BorderStyle;
// property ColResizing;
@@ -158,6 +159,8 @@ type
property RowCount;
property RowSelect;
property ScrollBarStyle;
+ property ScrollBarPage;
+ property ScrollBarWidth;
property ShowGrid;
property ShowHeader;
property ShowHint;
diff --git a/src/gui/fpg_listbox.pas b/src/gui/fpg_listbox.pas
index ce1480dc..11baed01 100644
--- a/src/gui/fpg_listbox.pas
+++ b/src/gui/fpg_listbox.pas
@@ -63,6 +63,10 @@ type
procedure SetPopupFrame(const AValue: boolean);
procedure UpdateScrollbarCoords;
procedure SetAutoHeight(const AValue: boolean);
+ function GetScrollBarPage: integer;
+ procedure SetScrollBarPage(const AValue: integer);
+ function GetScrollBarWidth: integer;
+ procedure SetScrollBarWidth(const AValue: integer);
protected
FFont: TfpgFont;
FScrollBar: TfpgScrollBar;
@@ -74,7 +78,6 @@ type
procedure UpdateScrollBar;
procedure FollowFocus;
function ListHeight: TfpgCoord;
- function ScrollBarWidth: TfpgCoord;
function PageLength: integer;
procedure ScrollBarMove(Sender: TObject; APosition: integer);
procedure DrawItem(num: integer; rect: TfpgRect; flags: integer); virtual;
@@ -90,6 +93,8 @@ type
procedure HandleShow; override;
procedure HandlePaint; override;
property AutoHeight: boolean read FAutoHeight write SetAutoHeight default False;
+ property ScrollBarPage: Integer read GetScrollBarPage write SetScrollBarPage;
+ property ScrollBarWidth: Integer read GetScrollBarWidth write SetScrollBarWidth;
property FocusItem: integer read FFocusItem write SetFocusItem;
property FontDesc: string read GetFontDesc write SetFontDesc;
property HotTrack: boolean read FHotTrack write FHotTrack default False;
@@ -105,6 +110,7 @@ type
function RowHeight: integer; virtual;
procedure SetFirstItem(item: integer);
property Font: TfpgFont read FFont;
+ property VisibleItems: integer read PageLength;
property OnChange: TNotifyEvent read FOnChange write FOnChange;
property OnKeyPress; // to allow to detect return or tab key has been pressed
property OnScroll: TNotifyEvent read FOnScroll write FOnScroll;
@@ -147,6 +153,8 @@ type
property Items;
property ParentShowHint;
property PopupFrame;
+ property ScrollBarPage;
+ property ScrollBarWidth;
property ShowHint;
property TabOrder;
property Text;
@@ -416,6 +424,33 @@ begin
Height := (Succ(PageLength) * RowHeight) + (2 * FMargin);
end;
+function TfpgBaseListBox.GetScrollBarPage: integer;
+begin
+ Result:= FScrollBar.PageSize;
+end;
+
+procedure TfpgBaseListBox.SetScrollBarPage(const AValue: integer);
+begin
+ if AValue= FScrollBar.PageSize then
+ Exit; //==>
+ FScrollBar.PageSize:= AValue;
+end;
+
+function TfpgBaseListBox.GetScrollBarWidth: integer;
+begin
+ if FScrollBar.Visible then
+ result := FScrollBar.Width
+ else
+ result := 0;
+end;
+
+procedure TfpgBaseListBox.SetScrollBarWidth(const AValue: integer);
+begin
+ if AValue = FScrollBar.Width then
+ Exit; //==>
+ FScrollBar.Width := AValue;
+end;
+
procedure TfpgBaseListBox.MsgPaint(var msg: TfpgMessageRec);
begin
// Optimising painting and preventing OnPaint from firing if not needed
@@ -482,14 +517,6 @@ begin
result := height - (2*FMargin);
end;
-function TfpgBaseListBox.ScrollBarWidth: TfpgCoord;
-begin
- if FScrollBar.Visible then
- result := FScrollBar.Width
- else
- result := 0;
-end;
-
function TfpgBaseListBox.PageLength: integer;
begin
result := (ListHeight div RowHeight)-1; // component height minus 1 line
@@ -1280,4 +1307,3 @@ begin
end;
end.
-
diff --git a/src/gui/fpg_listview.pas b/src/gui/fpg_listview.pas
index 511295e0..0278c952 100644
--- a/src/gui/fpg_listview.pas
+++ b/src/gui/fpg_listview.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -209,8 +209,6 @@ type
TfpgListView = class(TfpgWidget, IfpgLVItemViewer)
private
- procedure SetShiftIsPressed(const AValue: Boolean);
- private
FImages: array[TfpgLVItemStates] of TfpgImageList;
FSubitemImages: array[TfpgLVItemStates] of TfpgImageList;
FItemIndex: Integer;
@@ -225,6 +223,7 @@ type
FUpdateCount: Integer;
FVScrollBar: TfpgScrollBar;
FHScrollBar: TfpgScrollBar;
+ FScrollBarWidth: integer;
FColumns: TfpgLVColumns;
FItems: TfpgLVItems;
FOnPaintItem: TfpgLVPaintItemEvent;
@@ -241,7 +240,9 @@ type
procedure SetItems(const AValue: TfpgLVItems);
procedure SetMultiSelect(const AValue: Boolean);
procedure SetOnColumnClick(const AValue: TfpgLVColumnClickEvent);
+ procedure SetScrollBarWidth(const AValue: integer);
procedure SetShowHeaders(const AValue: Boolean);
+ procedure SetShiftIsPressed(const AValue: Boolean);
function SubItemGetImages(AIndex: integer): TfpgImageList;
procedure SubItemSetImages(AIndex: integer; const AValue: TfpgImageList);
procedure VScrollChange(Sender: TObject; Position: Integer);
@@ -308,6 +309,7 @@ type
property Hint;
property MultiSelect: Boolean read FMultiSelect write SetMultiSelect;
property ParentShowHint;
+ property ScrollBarWidth: Integer read FScrollBarWidth write SetScrollBarWidth;
property SelectionFollowsFocus: Boolean read FSelectionFollowsFocus write FSelectionFollowsFocus;
property SubItemImages: TfpgImageList index Ord(lisNoState) read SubItemGetImages write SubItemSetImages;
property SubItemImagesSelected: TfpgImageList index Ord(lisSelected) read SubItemGetImages write SubItemSetImages;
@@ -738,6 +740,15 @@ begin
FOnColumnClick:=AValue;
end;
+procedure TfpgListView.SetScrollBarWidth(const AValue: integer);
+begin
+ if AValue = FScrollBarWidth then
+ Exit; //==>
+ FScrollBarWidth := AValue;
+ FVScrollBar.Width := FScrollBarWidth;
+ FHScrollBar.Height:= FScrollBarWidth;
+end;
+
procedure TfpgListView.SetShiftIsPressed(const AValue: Boolean);
begin
if AValue = FShiftIsPressed then
@@ -1792,6 +1803,7 @@ begin
FSelectionFollowsFocus := True;
FItemIndex := -1;
FScrollBarNeedsUpdate := True;
+ FScrollBarWidth := FVScrollBar.Width;
end;
destructor TfpgListView.Destroy;
diff --git a/src/gui/fpg_memo.pas b/src/gui/fpg_memo.pas
index 374c8d47..672e7126 100644
--- a/src/gui/fpg_memo.pas
+++ b/src/gui/fpg_memo.pas
@@ -308,12 +308,12 @@ var
begin
VHeight := Height - 4;
HWidth := Width - 4;
-
+
if FVScrollBar.Visible then
Dec(HWidth, FVScrollBar.Width);
if FHScrollBar.Visible then
Dec(VHeight, FHScrollBar.Height);
-
+
FHScrollBar.Top := Height -FHScrollBar.Height - 2;
FHScrollBar.Left := 2;
FHScrollBar.Width := HWidth;
@@ -1048,7 +1048,7 @@ begin
if not Focused then
fpgCaret.UnSetCaret(Canvas);
-
+
// The little square in the bottom right corner
if FHScrollBar.Visible and FVScrollBar.Visible then
begin
@@ -1348,7 +1348,7 @@ begin
RePaint
else
inherited;
-
+
if hasChanged then
if Assigned(FOnChange) then
FOnChange(self);
@@ -1675,7 +1675,8 @@ end;
procedure TfpgMemo.EndUpdate;
begin
- Dec(FUpdateCount);
+ if FUpdateCount > 0 then
+ Dec(FUpdateCount);
if FUpdateCount <= 0 then
begin
Invalidate;
diff --git a/src/gui/fpg_menu.pas b/src/gui/fpg_menu.pas
index 3310db48..7b93be06 100644
--- a/src/gui/fpg_menu.pas
+++ b/src/gui/fpg_menu.pas
@@ -590,6 +590,7 @@ begin
FHeight := fpgStyle.MenuFont.Height + 6; // 3px margin top and bottom
FMenuOptions := [];
FMouseIsOver := False;
+ FIsContainer := True;
end;
destructor TfpgMenuBar.Destroy;
diff --git a/src/gui/fpg_panel.pas b/src/gui/fpg_panel.pas
index 2054959d..aedb7ace 100644
--- a/src/gui/fpg_panel.pas
+++ b/src/gui/fpg_panel.pas
@@ -308,8 +308,8 @@ type
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
property Image: TfpgImage read FImage write SetImage;
- property OwnsImage: Boolean read FOwnsImage write FOwnsImage;
- property ScaleImage: Boolean read FScaleImage write SetScaleImage;
+ property OwnsImage: Boolean read FOwnsImage write FOwnsImage default False;
+ property ScaleImage: Boolean read FScaleImage write SetScaleImage default False;
end;
@@ -1110,6 +1110,7 @@ begin
inherited Create(AOwner);
FImage := nil;
FOwnsImage := False;
+ FScaleImage := False;
end;
destructor TfpgImagePanel.Destroy;
diff --git a/src/gui/fpg_scrollbar.pas b/src/gui/fpg_scrollbar.pas
index 7fd5de64..fbe20006 100644
--- a/src/gui/fpg_scrollbar.pas
+++ b/src/gui/fpg_scrollbar.pas
@@ -36,7 +36,7 @@ uses
type
TScrollNotifyEvent = procedure(Sender: TObject; position: integer) of object;
- TfpgScrollStyle = (ssNone, ssHorizontal, ssVertical, ssAutoBoth);
+ TfpgScrollStyle = (ssNone, ssHorizontal, ssVertical, ssAutoBoth, ssHorizVisible, ssVertiVisible, ssBothVisible);
TfpgScrollBarPart = (sbpNone, sbpUpBack, sbpPageUpBack, sbpSlider, sbpDownForward, sbpPageDownForward);
@@ -134,7 +134,6 @@ end;
procedure TfpgScrollBar.HandlePaint;
begin
- Canvas.BeginDraw; // Do not remove - Scrollbars do painting outside HandlePaint as well!
if Orientation = orVertical then
begin
DrawButton(0, 0, Width, Width, 'sys.sb.up', (FScrollbarDownPart = sbpUpBack) and (FPosition <> FMin), (FPosition <> FMin) and (Parent.Enabled));
@@ -145,9 +144,7 @@ begin
DrawButton(0, 0, Height, Height, 'sys.sb.left', (FScrollbarDownPart = sbpUpBack) and (FPosition <> FMin), (FPosition <> FMin) and (Parent.Enabled));
DrawButton(Width-Height, 0, Height, Height, 'sys.sb.right', (FScrollbarDownPart = sbpDownForward) and (FPosition <> FMax), (FPosition <> FMax) and (Parent.Enabled));
end;
-
DrawSlider(FRecalc);
- Canvas.EndDraw; // Do not remove - Scrollbars do painting outside HandlePaint as well!
FRecalc := False;
end;
@@ -162,7 +159,7 @@ begin
if not HasHandle then
Exit; //==>
FRecalc := True;
- Invalidate;// DrawSlider(True);
+ Invalidate;
end;
procedure TfpgScrollBar.LineUp;
@@ -219,7 +216,7 @@ begin
FPosition := AValue;
if HasHandle then
- Invalidate;// DrawSlider(False);
+ Invalidate;
end;
procedure TfpgScrollBar.Step(ASteps: Integer);
@@ -576,7 +573,7 @@ begin
FSliderPos := area;
if ppos <> FSliderPos then
- Invalidate; // DrawSlider(False);
+ Invalidate;
if area <> 0 then
newp := FMin + Trunc((FMax - FMin) * (FSliderPos / area))
@@ -609,7 +606,7 @@ begin
if Visible then
begin
FRecalc := True;
- Invalidate; // DrawSlider(True);
+ Invalidate;
end;
if Assigned(FOnScroll) then
diff --git a/src/gui/fpg_scrollframe.pas b/src/gui/fpg_scrollframe.pas
new file mode 100644
index 00000000..008832ce
--- /dev/null
+++ b/src/gui/fpg_scrollframe.pas
@@ -0,0 +1,530 @@
+{
+ fpGUI - Free Pascal GUI Toolkit
+
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
+ distribution, for details of the copyright.
+
+ See the file COPYING.modifiedLGPL, included in this distribution,
+ for details about redistributing fpGUI.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ Description:
+ Defines a scrollable frame widget.
+
+ This unit was originally written by David Emerson <dle3ab@angelbase.com>
+}
+unit fpg_scrollframe;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes,
+ SysUtils,
+ fpg_base,
+ fpg_main,
+ fpg_widget,
+ fpg_panel,
+ fpg_scrollbar;
+
+type
+
+ TfpgScrollFrame = class;
+
+
+ TfpgEmbeddingFrame = class (TfpgFrame)
+ // The purpose of the EmbeddingFrame is to pass scroll events to the ParentScrollFrame
+ private
+ FParentScrollFrame : TfpgScrollFrame;
+ protected
+ procedure HandleMouseScroll(x, y: integer; shiftstate: TShiftState;
+ delta: smallint); override;
+ procedure HandleMouseHorizScroll(x, y: integer; shiftstate: TShiftState;
+ delta: smallint); override;
+ public
+ property ParentScrollFrame : TfpgScrollFrame read FParentScrollFrame write FParentScrollFrame;
+ end;
+
+
+ TfpgAutoSizingFrame = class (TfpgEmbeddingFrame)
+ private
+ FMarginBR : integer;
+ procedure SetMarginBR (AValue: integer);
+ public
+ procedure AfterConstruction; override;
+ procedure AdjustDimsFor (w : TfpgWidget; updatewp: boolean = true);
+ procedure AdjustDimsWithout (w : TfpgWidget);
+ procedure RecalcFrameSize;
+ property MarginBR : integer read FMarginBR write SetMarginBR; // bottom-right margin
+ end;
+
+ TfpgASFrameClass = class of TfpgAutoSizingFrame;
+
+
+ TfpgScrollFrame = class(TfpgFrame)
+ private
+ FContentFrame: TfpgAutoSizingFrame;
+ FVisibleArea: TfpgEmbeddingFrame;
+ FHScrollBar: TfpgScrollBar;
+ FVScrollBar: TfpgScrollBar;
+ FScrollBarStyle: TfpgScrollStyle;
+ function GetXOffset: integer;
+ function GetYOffset: integer;
+ procedure SetXOffset(x: integer);
+ procedure SetYOffset(y: integer);
+ protected
+ procedure HandleMouseScroll(x, y: integer; shiftstate: TShiftState; delta: smallint); override;
+ procedure HandleMouseHorizScroll(x, y: integer; shiftstate: TShiftState; delta: smallint); override;
+ procedure HandleResize(awidth, aheight: TfpgCoord); override;
+ procedure HandleShow; override;
+ procedure HandlePaint; override;
+ procedure HScrollBarMove(Sender: TObject; position: integer);
+ procedure VScrollBarMove(Sender: TObject; position: integer);
+ procedure UpdateScrollbars; virtual;
+ property XOffset: integer read GetXOffset write SetXOffset; // these do not...
+ property YOffset: integer read GetYOffset write SetYOffset; // ...updatewindowposition
+ public
+ constructor Create (AOwner: TComponent); override;
+ constructor Create (AOwner: TComponent; ContentFrameType: TfpgASFrameClass); virtual;
+ procedure AfterCreate; override;
+ procedure SetContentFrameType(AContentFrameType: TfpgASFrameClass);
+ property ContentFrame: TfpgAutoSizingFrame read FContentFrame write FContentFrame;
+ end;
+
+
+implementation
+
+
+{ TfpgEmbeddingFrame }
+
+procedure TfpgEmbeddingFrame.HandleMouseScroll(x, y: integer;
+ shiftstate: TShiftState; delta: smallint);
+begin
+ ParentScrollFrame.HandleMouseScroll(x, y, shiftstate, delta);
+end;
+
+procedure TfpgEmbeddingFrame.HandleMouseHorizScroll(x, y: integer;
+ shiftstate: TShiftState; delta: smallint);
+begin
+ ParentScrollFrame.HandleMouseHorizScroll(x, y, shiftstate, delta);
+end;
+
+
+{ TfpgAutoSizingFrame }
+
+procedure TfpgAutoSizingFrame.SetMarginBR(AValue: integer);
+begin
+ if FMarginBR=AValue then Exit;
+ FMarginBR:=AValue;
+ RecalcFrameSize;
+end;
+
+procedure TfpgAutoSizingFrame.AfterConstruction;
+begin
+ inherited AfterConstruction;
+ RecalcFrameSize;
+end;
+
+procedure TfpgAutoSizingFrame.AdjustDimsFor (w: TfpgWidget; updatewp: boolean = true);
+var
+ new_w, new_h: integer;
+begin
+ if not w.Visible then
+ Exit;
+ new_w := w.Right+MarginBR+1;
+ new_h := w.Bottom+MarginBR+1;
+ if (Width < new_w) or (Height < new_h) then
+ begin
+ HandleResize(new_w, new_h);
+ if updatewp then
+ if ParentScrollFrame is TfpgScrollFrame then
+ ParentScrollFrame.UpdateScrollbars
+ else
+ UpdateWindowPosition;
+ end;
+end;
+
+procedure TfpgAutoSizingFrame.AdjustDimsWithout (w: TfpgWidget);
+begin
+ if (Width = w.Right+MarginBR+1)
+ or (Height = w.Bottom+MarginBR+1) then
+ RecalcFrameSize;
+end;
+
+procedure TfpgAutoSizingFrame.RecalcFrameSize;
+var
+ i : integer;
+ c : TComponent;
+ max_w, max_h : integer;
+ this_need : integer;
+ par : TfpgWidget;
+begin
+ if ComponentCount=0 then
+ Exit;
+ max_w := 1;
+ max_h := 1;
+ for i := 0 to ComponentCount-1 do begin
+ c := Components[i];
+ if c is TfpgWidget then
+ begin
+ if not TfpgWidget(c).Visible then
+ continue;
+ this_need := TfpgWidget(c).right+MarginBR+1;
+ if (this_need>max_w) then
+ max_w := this_need;
+ this_need := TfpgWidget(c).bottom+MarginBR+1;
+ if (this_need>max_h) then
+ max_h := this_need;
+ end;
+ end;
+ HandleResize(max_w, max_h);
+ if ParentScrollFrame is TfpgScrollFrame then
+ ParentScrollFrame.UpdateScrollbars
+ else
+ UpdateWindowPosition;
+end;
+
+
+{ TfpgScrollFrame }
+
+function TfpgScrollFrame.GetXOffset: integer;
+begin
+ result := -FContentFrame.Left;
+end;
+
+function TfpgScrollFrame.GetYOffset: integer;
+begin
+ result := -FContentFrame.Top;
+end;
+
+procedure TfpgScrollFrame.SetXOffset (x: integer);
+begin
+ if ContentFrame.Left = -x then
+ Exit;
+ FContentFrame.Left := -x;
+end;
+
+procedure TfpgScrollFrame.SetYOffset (y: integer);
+begin
+ if ContentFrame.Top = -y then
+ Exit;
+ FContentFrame.Top := -y;
+end;
+
+procedure TfpgScrollFrame.HandleMouseScroll(x, y: integer;
+ shiftstate: TShiftState; delta: smallint);
+var
+ old_val, new_val : integer;
+begin
+ inherited HandleMouseScroll(x, y, shiftstate, delta);
+ with FVScrollBar do
+ begin
+ if not Visible then
+ Exit;
+ Position:=Position+delta*ScrollStep;
+ if YOffset=Position then
+ Exit;
+ YOffset:=Position;
+ end;
+ UpdateScrollbars;
+end;
+
+procedure TfpgScrollFrame.HandleMouseHorizScroll(x, y: integer;
+ shiftstate: TShiftState; delta: smallint);
+begin
+ inherited HandleMouseHorizScroll(x, y, shiftstate, delta);
+ with FHScrollBar do
+ begin
+ if not Visible then
+ Exit;
+ Position:=Position+delta*ScrollStep;
+ if XOffset=Position then
+ Exit;
+ XOffset:=Position;
+ end;
+ UpdateScrollbars;
+end;
+
+procedure TfpgScrollFrame.HandleResize(awidth, aheight: TfpgCoord);
+begin
+ inherited HandleResize(awidth, aheight);
+ if (csLoading in ComponentState) or (csUpdating in ComponentState) then
+ Exit; //==>
+ if HasHandle then
+ UpdateScrollBars;
+end;
+
+procedure TfpgScrollFrame.HandleShow;
+begin
+ inherited HandleShow;
+ if (csLoading in ComponentState) then
+ Exit;
+ UpdateScrollBars;
+end;
+
+procedure TfpgScrollFrame.HandlePaint;
+begin
+ if csDesigning in ComponentState then
+ begin
+ // clear background rectangle
+ Canvas.Clear(clDarkGray);
+ // When designing, don't draw colors
+ // but draw an outline
+ Canvas.SetLineStyle(1, lsDash);
+ Canvas.DrawRectangle(GetClientRect);
+ Canvas.SetLineStyle(1, lsSolid);
+ Canvas.Color := clUIDesignerGreen;
+ Canvas.DrawLine(0, 0, Width, Height);
+ Canvas.DrawLine(Width, 0, 0, Height);
+ Canvas.TextColor := clShadow1;
+ Canvas.DrawText(5, 5, Name + ': ' + ClassName);
+ Exit; //==>
+ end;
+
+ inherited HandlePaint;
+end;
+
+procedure TfpgScrollFrame.HScrollBarMove (Sender: TObject; position: integer);
+begin
+ if position = XOffset then
+ Exit;
+ XOffset := position;
+ FContentFrame.UpdateWindowPosition;
+end;
+
+procedure TfpgScrollFrame.VScrollBarMove (Sender: TObject; position: integer);
+begin
+ if position = YOffset then
+ Exit;
+ YOffset := position;
+ FContentFrame.UpdateWindowPosition;
+end;
+
+procedure TfpgScrollFrame.UpdateScrollbars;
+var
+ contentWidth, contentHeight: integer;
+ visWidth, visHeight: integer;
+ Hfits, Vfits : boolean;
+ showHsb, showVsb : boolean;
+ prevHideHsb, prevHideVsb : boolean;
+
+ procedure hideScrollbar (sb : TfpgScrollBar);
+ begin
+ with sb do
+ if Visible then
+ begin
+ Visible := False;
+ UpdateWindowPosition;
+ end;
+ end;
+
+ procedure getVisWidth;
+ begin
+ if showVsb then
+ visWidth := Width - (FVScrollBar.Width-1)
+ else
+ visWidth := Width;
+ Hfits := visWidth >= contentWidth
+ end;
+
+ procedure getVisHeight;
+ begin
+ if showHsb then
+ visHeight := Height - (FHScrollBar.Height-1)
+ else
+ visHeight := Height;
+ Vfits := visHeight >= contentHeight;
+ end;
+
+begin
+ if (csLoading in ComponentState) or (csUpdating in ComponentState) then
+ Exit; //==>
+
+ // if we don't want any scrollbars, hide them and exit
+ if FScrollBarStyle = ssNone then
+ begin
+ hideScrollbar (FHScrollBar);
+ hideScrollbar (FVScrollBar);
+ exit;
+ end;
+
+ // preliminary width/height calculations
+ prevHideHsb := not FHScrollBar.Visible;
+ prevHideVsb := not FVScrollBar.Visible;
+ showVsb := (FScrollBarStyle = ssBothVisible);
+ showHsb := showVsb;
+ contentWidth := ContentFrame.Width;
+ contentHeight := ContentFrame.Height;
+ getVisWidth;
+ getVisHeight;
+
+ // determine whether to show scrollbars for different configurations
+ case FScrollBarStyle of
+ ssHorizontal:
+ begin
+ hideScrollbar (FVScrollBar);
+ if not Hfits then
+ begin
+ showHsb := true;
+ getVisHeight;
+ end;
+ end;
+ ssVertical:
+ begin
+ hideScrollbar (FHScrollBar);
+ if not Vfits then
+ begin
+ showVsb := true;
+ getVisWidth;
+ end;
+ end;
+ ssAutoBoth:
+ if not Vfits then
+ begin
+ showVsb := true;
+ getVisWidth;
+ if not Hfits then
+ begin
+ showHsb := true;
+ getVisHeight;
+ getVisWidth;
+ end;
+ end
+ else if not Hfits then
+ begin
+ showHsb := true;
+ getVisHeight;
+ if not Vfits then
+ begin
+ showVsb := true;
+ getVisWidth;
+ getVisHeight;
+ end;
+ end;
+ end;
+
+ // show or hide the scrollbars
+
+ if showVsb then with FVScrollBar do
+ begin
+ if prevHideVsb then
+ Position := 0;
+ Visible := true;
+ Min := 0;
+ Max := contentHeight - visHeight; // may set position!
+ YOffset := Position;
+ if contentHeight > 0 then
+ SliderSize := visHeight / contentHeight
+ else
+ SliderSize := 0;
+ RepaintSlider;
+ Top := 0;
+ Left := visWidth;
+ Height := visHeight;
+ PageSize:= visHeight;
+ end
+ else
+ begin
+ FVScrollBar.Visible := false;
+ if Vfits then // if vertical doesn't fit and no scrollbar, do not change offset
+ YOffset := 0;
+ end;
+
+ if showHsb then with FHScrollBar do
+ begin
+ if prevHideHsb then
+ Position := 0;
+ Visible := true;
+ Min := 0;
+ Max := contentWidth - visWidth; // may set position!
+ XOffset := Position;
+ if contentWidth > 0 then
+ SliderSize := visWidth / contentWidth
+ else
+ SliderSize := 0;
+ RepaintSlider;
+ Top := visHeight;
+ Left := 0;
+ Width := visWidth;
+ PageSize:= visWidth;
+ end
+ else
+ begin
+ FHScrollBar.Visible := false;
+ if Hfits then // if horizontal doesn't fit and no scrollbar, do not change offset
+ XOffset := 0;
+ end;
+
+ FVScrollBar.UpdateWindowPosition;
+ FHScrollBar.UpdateWindowPosition;
+
+ FVisibleArea.SetPosition(0, 0, visWidth, visHeight);
+ FVisibleArea.UpdateWindowPosition;
+
+ FContentFrame.UpdateWindowPosition;
+end;
+
+constructor TfpgScrollFrame.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+
+ FVisibleArea := TfpgEmbeddingFrame.Create(self);
+ FVisibleArea.HandleMove(0, 0);
+ FVisibleArea.ParentScrollFrame := self;
+
+ FContentFrame := TfpgAutoSizingFrame.Create(FVisibleArea);
+ FContentFrame.HandleMove(0, 0);
+ FContentFrame.ParentScrollFrame := self;
+end;
+
+constructor TfpgScrollFrame.Create(AOwner: TComponent; ContentFrameType: TfpgASFrameClass);
+begin
+ inherited Create(AOwner);
+
+ FVisibleArea := TfpgEmbeddingFrame.Create(self);
+ FVisibleArea.HandleMove(0, 0);
+ FVisibleArea.ParentScrollFrame := self;
+
+ FContentFrame := ContentFrameType.Create(FVisibleArea);
+ FContentFrame.HandleMove(0, 0);
+ FContentFrame.ParentScrollFrame := self;
+end;
+
+procedure TfpgScrollFrame.AfterCreate;
+begin
+ inherited AfterCreate;
+
+ FVScrollBar := TfpgScrollBar.Create(self);
+ with FVScrollBar do begin
+ Orientation := orVertical;
+ OnScroll := @VScrollBarMove;
+ Position := 0;
+ ScrollStep := 10;
+ end;
+
+ FHScrollBar := TfpgScrollBar.Create(self);
+ with FHScrollBar do begin
+ Orientation := orHorizontal;
+ OnScroll := @HScrollBarMove;
+ Position := 0;
+ ScrollStep := 10;
+ end;
+
+ FScrollBarStyle := ssAutoBoth;
+end;
+
+procedure TfpgScrollFrame.SetContentFrameType(AContentFrameType: TfpgASFrameClass);
+begin
+ if Assigned(FContentFrame) then
+ FContentFrame.Free;
+ FContentFrame := AContentFrameType.Create(FVisibleArea);
+ FContentFrame.HandleMove(0, 0);
+ FContentFrame.ParentScrollFrame := self;
+end;
+
+
+end.
diff --git a/src/gui/fpg_stringgridbuilder.pas b/src/gui/fpg_stringgridbuilder.pas
new file mode 100644
index 00000000..fd3fe3b8
--- /dev/null
+++ b/src/gui/fpg_stringgridbuilder.pas
@@ -0,0 +1,178 @@
+{
+ fpGUI - Free Pascal GUI Toolkit
+
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
+ distribution, for details of the copyright.
+
+ See the file COPYING.modifiedLGPL, included in this distribution,
+ for details about redistributing fpGUI.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ Description:
+ This unit defines a helper class that can populate a StringGrid
+ from a CSV file. In future this could be expaned to other file
+ types or even data structures.
+}
+unit fpg_StringGridBuilder;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes,
+ SysUtils,
+ fpg_base,
+ fpg_grid;
+
+type
+ TStringGridBuilder = class(TObject)
+ private
+ FData: TStringList;
+ FGrid: TfpgStringGrid;
+ FCSVFile: TfpgString;
+ FHasHeader: boolean;
+ protected
+ procedure InternalSetupColumns; virtual;
+ procedure InternalSetupData; virtual;
+ procedure InternalRepaintRow(const AData: TfpgString; const ARow: integer); virtual;
+ public
+ constructor Create;
+ constructor CreateCustom(const AGrid: TfpgStringGrid; const ACSVFile: TfpgString; const AWithHeader: boolean = True); virtual;
+ destructor Destroy; override;
+ procedure Run;
+ property Grid: TfpgStringGrid read FGrid;
+ end;
+
+implementation
+
+uses
+ fpg_main,
+ fpg_utils,
+ fpg_CSVParser;
+
+{ TStringGridBuilder }
+
+procedure TStringGridBuilder.InternalSetupColumns;
+var
+ x: integer;
+ fields: TStringList;
+begin
+ fields := TStringList.Create;
+ try
+ gCsvParser.ExtractFields(FData[0], fields);
+ // setup correct column count
+ FGrid.ColumnCount := fields.Count;
+ // initialize columns
+ if FHasHeader then
+ begin
+ for x := 0 to fields.Count-1 do
+ begin
+ FGrid.ColumnTitle[x] := fields[x];
+// FGrid.ColumnWidth[x] := StrToInt(FColumns.ValueFromIndex[x]);
+ end;
+ end;
+ finally
+ fields.Free;
+ end;
+end;
+
+procedure TStringGridBuilder.InternalSetupData;
+var
+ y: integer;
+begin
+ FGrid.BeginUpdate;
+ FGrid.MouseCursor := mcHourGlass;
+ try
+ try
+ // set correct row count. Columns have already been handled.
+ if FHasHeader then
+ begin
+ FGrid.RowCount := FData.Count-1;
+ for y := 1 to FData.Count-1 do // rows
+ begin
+ // writeln(' Row: ', y, ' Data: ', FData.Strings[y-1]);
+ InternalRepaintRow(FData.Strings[y], y-1);
+ end;
+ end
+ else
+ begin
+ FGrid.RowCount := FData.Count;
+ for y := 0 to FData.Count-1 do // rows
+ begin
+ // writeln(' Row: ', y, ' Data: ', FData.Strings[y-1]);
+ InternalRepaintRow(FData.Strings[y], y);
+ end;
+ end;
+ except
+ fpgApplication.HandleException(self);
+ end;
+ finally
+ if FGrid.RowCount > 0 then
+ FGrid.FocusRow := 0;
+ FGrid.EndUpdate;
+ FGrid.MouseCursor := mcDefault;
+ end;
+end;
+
+procedure TStringGridBuilder.InternalRepaintRow(const AData: TfpgString; const ARow: integer);
+var
+ x: integer;
+ fields: TStrings;
+ value: string;
+begin
+ fields := TStringList.Create;
+ try
+ gCsvParser.ExtractFields(AData, fields);
+ for x := 0 to FGrid.ColumnCount-1 do
+ begin
+ if x < fields.Count then
+ value := fields.Strings[x]
+ else
+ value := '';
+ FGrid.Cells[x, ARow] := value
+ end;
+ finally
+ fields.Free;
+ end;
+end;
+
+constructor TStringGridBuilder.Create;
+begin
+ FData := TStringList.Create;
+end;
+
+constructor TStringGridBuilder.CreateCustom(const AGrid: TfpgStringGrid; const ACSVFile: TfpgString; const AWithHeader: boolean);
+begin
+ Create;
+ FGrid := AGrid;
+ FCSVFile := ACSVFile;
+ FGrid.Clear;
+ FHasHeader := AWithHeader;
+ FGrid.ShowHeader := AWithHeader;
+end;
+
+destructor TStringGridBuilder.Destroy;
+begin
+ FGrid := nil;
+ FData.Free;
+ inherited Destroy;
+end;
+
+procedure TStringGridBuilder.Run;
+begin
+ if FCSVFile = '' then
+ raise Exception.Create('TStringGridBuilder: CSV filename is empty!');
+ if not fpgFileExists(FCSVFile) then
+ raise Exception.CreateFmt('TStringGridBuilder: The CSV file <%s> does not exist.', [FCSVFile]);
+ FData.LoadFromFile(fpgToOSEncoding(FCSVFile));
+ InternalSetupColumns;
+ InternalSetupData;
+end;
+
+
+end.
+
diff --git a/src/gui/fpg_style_win8.pas b/src/gui/fpg_style_win8.pas
index 69bad2cb..f3d99705 100644
--- a/src/gui/fpg_style_win8.pas
+++ b/src/gui/fpg_style_win8.pas
@@ -72,6 +72,7 @@ const
$FF27546A, $FFE5E5E5);
+{%region 'Byte arrays of images' -fold}
const
win8_checkboxes: array[0..2601] of byte = (
66, 77, 42, 10, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
@@ -387,6 +388,7 @@ const
199,199,214,214,214,233,233,233,255,255,255,255,255,255,255,255,255,
0);
+{%endregion}
{ TfpgWin8Style }
diff --git a/src/gui/fpg_tab.pas b/src/gui/fpg_tab.pas
index 29addb12..5ef516bb 100644
--- a/src/gui/fpg_tab.pas
+++ b/src/gui/fpg_tab.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2012 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -1291,10 +1291,7 @@ var
begin
Result := nil;
h := TfpgTabSheet(FPages.First);
-
lp := FMargin;
- if MaxButtonWidthSum > (Width-(FMargin*2)) then
- h := FFirstTabButton;
case TabPosition of
tpTop:
@@ -1324,6 +1321,8 @@ begin
if TabPosition in [tpTop, tpBottom] then
begin
+ if MaxButtonWidthSum > (Width-(FMargin*2)) then
+ h := FFirstTabButton;
if (y > p1) and (y < p2) then
begin
while h <> nil do
@@ -1346,11 +1345,13 @@ begin
if TabPosition in [tpLeft, tpRight] then
begin
+ bh := ButtonHeight; // initialize button height
+ if MaxButtonHeightSum > (Height-(FMargin*2)) then
+ h := FFirstTabButton;
if (x > p1) and (x < p2) then
begin
while h <> nil do
begin
- bh := ButtonHeight; // initialize button height
if (y > lp) and (y < lp + bh) then
begin
if h <> ActivePage then
diff --git a/src/gui/fpg_toggle.pas b/src/gui/fpg_toggle.pas
new file mode 100644
index 00000000..b35ca661
--- /dev/null
+++ b/src/gui/fpg_toggle.pas
@@ -0,0 +1,282 @@
+{
+ fpGUI - Free Pascal GUI Toolkit
+
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
+ distribution, for details of the copyright.
+
+ See the file COPYING.modifiedLGPL, included in this distribution,
+ for details about redistributing fpGUI.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ Original author: Andrew Haines
+
+ Description:
+ Defines a ToggleBox control. A Checkbox like control that has an
+ animated bar that slides side to side when toggled.
+}
+unit fpg_toggle;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes,
+ SysUtils,
+ fpg_base,
+ fpg_main,
+ fpg_stylemanager,
+ fpg_checkbox;
+
+type
+
+ TfpgToggle = class(TfpgCheckBox)
+ private
+ FCheckedTextColor: TfpgColor;
+ FToggleWidth: TfpgCoord;
+ FToggleButtonWidth: TfpgCoord;
+ FAnimateTimer: TfpgTimer;
+ FCheckedCaption: TfpgString;
+ FCheckedColor: TfpgColor;
+ FSliderPosition: TfpgCoord;
+ FPaintedSliderPosition: TfpgCoord;
+ FUnCheckedCaption: TfpgString;
+ FUnCheckedColor: TfpgColor;
+ FUnCheckedTextColor: TfpgColor;
+ FUseAnimation: Boolean;
+ procedure SetCheckedCaption(AValue: TfpgString);
+ procedure SetCheckedColor(AValue: TfpgColor);
+ procedure SetCheckedTextColor(AValue: TfpgColor);
+ procedure SetToggleWidth(AValue: TfpgCoord);
+ procedure SetUnCheckedCaption(AValue: TfpgString);
+ procedure SetUnCheckedColor(AValue: TfpgColor);
+ procedure AnimateTimer(Sender: TObject);
+ procedure SetUnCheckedTextColor(AValue: TfpgColor);
+ function ToggleLeft: TfpgCoord; inline;
+ protected
+ procedure HandlePaint; override;
+ procedure HandleCheckChanged; override;
+ procedure HandleLMouseUp(x, y: integer; shiftstate: TShiftState); override;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ published
+ property UseAnimation: Boolean read FUseAnimation write FUseAnimation;
+ property ToggleWidth: TfpgCoord read FToggleWidth write SetToggleWidth default 45;
+ property CheckedCaption : TfpgString read FCheckedCaption write SetCheckedCaption;
+ property CheckedColor: TfpgColor read FCheckedColor write SetCheckedColor default clLime;
+ property CheckedTextColor: TfpgColor read FCheckedTextColor write SetCheckedTextColor default clHilite2;
+ property UnCheckedCaption: TfpgString read FUnCheckedCaption write SetUnCheckedCaption;
+ property UnCheckedColor: TfpgColor read FUnCheckedColor write SetUnCheckedColor default clWindowBackground;
+ property UnCheckedTextColor: TfpgColor read FUnCheckedTextColor write SetUnCheckedTextColor default clText1;
+ end;
+
+implementation
+
+{ TfpgToggle }
+
+procedure TfpgToggle.SetCheckedColor(AValue: TfpgColor);
+begin
+ if FCheckedColor=AValue then Exit;
+ FCheckedColor:=AValue;
+ Invalidate;
+end;
+
+procedure TfpgToggle.SetCheckedTextColor(AValue: TfpgColor);
+begin
+ if FCheckedTextColor=AValue then Exit;
+ FCheckedTextColor:=AValue;
+ Invalidate;
+end;
+
+procedure TfpgToggle.SetToggleWidth(AValue: TfpgCoord);
+begin
+ if FToggleWidth=AValue then Exit;
+ FToggleWidth:=AValue;
+ FToggleButtonWidth:=AValue - 10;
+ Invalidate;
+end;
+
+procedure TfpgToggle.SetCheckedCaption(AValue: TfpgString);
+begin
+ if FCheckedCaption=AValue then Exit;
+ FCheckedCaption:=AValue;
+ Invalidate;
+end;
+
+procedure TfpgToggle.SetUnCheckedCaption(AValue: TfpgString);
+begin
+ if FUnCheckedCaption=AValue then Exit;
+ FUnCheckedCaption:=AValue;
+ Invalidate;
+end;
+
+procedure TfpgToggle.SetUnCheckedColor(AValue: TfpgColor);
+begin
+ if FUnCheckedColor=AValue then Exit;
+ FUnCheckedColor:=AValue;
+ Invalidate;
+end;
+
+procedure TfpgToggle.AnimateTimer(Sender: TObject);
+begin
+ if csDestroying in ComponentState then
+ Exit;
+ if not Checked then
+ begin // not checked
+ Dec(FSliderPosition, 1);
+ if FSliderPosition < 1 then
+ FSliderPosition:=0;
+ end
+ else // checked
+ begin
+ Inc(FSliderPosition);
+ if FSliderPosition >= FToggleWidth - FToggleButtonWidth -2then
+ FSliderPosition := FToggleWidth - FToggleButtonWidth -2;
+ end;
+ Invalidate;
+end;
+
+procedure TfpgToggle.SetUnCheckedTextColor(AValue: TfpgColor);
+begin
+ if FUnCheckedTextColor=AValue then Exit;
+ FUnCheckedTextColor:=AValue;
+ Invalidate;
+end;
+
+function TfpgToggle.ToggleLeft: TfpgCoord;
+begin
+ if BoxLayout = tbLeftBox then
+ Result := 1
+ else
+ Result := Width - FToggleWidth;
+end;
+
+procedure TfpgToggle.HandlePaint;
+var
+ ToggleText: TfpgString;
+ PaintColor: TFPColor;
+ TextEnabled: TfpgTextFlags;
+ BvlWdth: TfpgCoord;
+ ButtonRect: TfpgRect;
+begin
+ Canvas.Clear(BackgroundColor);
+
+ // Text
+ Canvas.SetFont(Font);
+ if Enabled then
+ TextEnabled := []
+ else
+ TextEnabled := [txtDisabled];
+
+ BvlWdth := fpgStyleManager.Style.GetBevelWidth;
+
+ if BoxLayout = tbRightBox then
+ Canvas.DrawText(fpgRect(0,0,FWidth-FToggleWidth, FHeight), Text, [txtLeft, txtVCenter] + TextEnabled) { internally this still calls fpgStyle.DrawString(), so theming will be applied }
+ else
+ Canvas.DrawText(fpgRect(ToggleWidth,0,FWidth-ToggleWidth, FHeight), Text, [txtRight, txtVCenter] + TextEnabled); { internally this still calls fpgStyle.DrawString(), so theming will be applied }
+
+ // Toggle Stuff
+
+ // Toggle area bevel
+ fpgStyleManager.Style.DrawBevel(Canvas,ToggleLeft,0,FToggleWidth, Height, False);
+
+ // Toggle Button
+ ButtonRect := fpgRect(ToggleLeft+FSliderPosition+BvlWdth,BvlWdth,FToggleButtonWidth, Height -(BvlWdth*2));
+ fpgStyleManager.Style.DrawBevel(Canvas,ButtonRect.Left, ButtonRect.Top, ButtonRect.Width, ButtonRect.Height, True);
+
+
+ // unchecked text
+ if FSliderPosition < (FToggleWidth - FToggleButtonWidth) div 2 then
+ begin
+ ToggleText := FUnCheckedCaption;
+ Canvas.SetTextColor(FUnCheckedTextColor);
+ end
+ // checked text
+ else
+ begin
+ ToggleText := FCheckedCaption;
+ Canvas.SetTextColor(FCheckedTextColor);
+ end;
+
+ // Toggle Text (inside 2 bevels)
+ Canvas.DrawText(fpgRect(ToggleLeft+FSliderPosition+BvlWdth*2,BvlWdth*2,FToggleButtonWidth-BvlWdth*4, Height-BvlWdth*4),ToggleText, [txtVCenter, txtHCenter] + TextEnabled);
+
+ // Paint on either side of the button part of the toggle
+ if FSliderPosition > 0 then
+ begin
+ Canvas.SetColor(CheckedColor);
+ Canvas.FillRectangle(fpgRect(ToggleLeft+1,1, FSliderPosition, FHeight - BvlWdth*2));
+ end;
+
+ if FSliderPosition < FToggleWidth - FToggleButtonWidth -2 then
+ begin
+ Canvas.SetColor(UnCheckedColor);
+ Canvas.FillRectangle(fpgRect(ToggleLeft + FSliderPosition + FToggleButtonWidth+BvlWdth, BvlWdth, FToggleWidth - FToggleButtonWidth - FSliderPosition -(BvlWdth*2), FHeight - BvlWdth*2));
+ end;
+
+ // lastly draw focus
+ if FFocusable and FFocused then
+ begin
+ InflateRect(ButtonRect, -1,-1);
+ fpgStyleManager.Style.DrawFocusRect(Canvas, ButtonRect);
+ end;
+
+
+ if FPaintedSliderPosition = FSliderPosition then
+ FAnimateTimer.Enabled:=False;
+
+ FPaintedSliderPosition := FSliderPosition;
+end;
+
+procedure TfpgToggle.HandleCheckChanged;
+begin
+ if FUseAnimation then
+ FAnimateTimer.Enabled := True
+ else
+ begin
+ if Checked then
+ FSliderPosition := FToggleWidth - FToggleButtonWidth -2
+ else
+ FSliderPosition := 0;
+ end;
+ FPaintedSliderPosition := -1;
+end;
+
+procedure TfpgToggle.HandleLMouseUp(x, y: integer; shiftstate: TShiftState);
+begin
+ if ((BoxLayout = tbRightBox) and (x > Width - FToggleWidth))
+ or ((BoxLayout = tbLeftBox) and (x <= FToggleWidth))
+ then
+ inherited HandleLMouseUp(x, y, shiftstate);
+end;
+
+constructor TfpgToggle.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ Text := 'ToggleBox';
+ ToggleWidth := 45;
+ BoxLayout := tbRightBox;
+ FUseAnimation := True;
+ FUnCheckedCaption := 'OFF';
+ FCheckedCaption := 'ON';
+ FUnCheckedColor := FBackgroundColor;
+ FCheckedColor := clLime;
+ FUnCheckedTextColor := clText1;
+ FCheckedTextColor := clHilite2;
+ FAnimateTimer := TfpgTimer.Create(12);
+ FAnimateTimer.Enabled := False;
+ FAnimateTimer.OnTimer := @AnimateTimer;
+end;
+
+destructor TfpgToggle.Destroy;
+begin
+ FAnimateTimer.Free;
+ inherited Destroy;
+end;
+
+end.
+
diff --git a/src/gui/fpg_tree.pas b/src/gui/fpg_tree.pas
index 5e1008c2..6c929b5e 100644
--- a/src/gui/fpg_tree.pas
+++ b/src/gui/fpg_tree.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2011 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -84,7 +84,6 @@ type
FText: TfpgString;
FTextColor: TfpgColor;
FHasChildren: Boolean;
- FTree: TfpgTreeView;
procedure SetCollapsed(const AValue: boolean);
procedure SetInactSelColor(const AValue: TfpgColor);
procedure SetInactSelTextColor(const AValue: TfpgColor);
@@ -97,8 +96,11 @@ type
procedure SetHasChildren(const AValue: Boolean);
procedure DoTreeCheck(ANode: TfpgTreeNode);
procedure SetStateImageIndex(const AValue: integer);
+ protected
+ FTree: TfpgTreeView;
public
- constructor Create;
+ constructor Create; overload;
+ constructor Create(ATreeView: TfpgTreeView; AText: TfpgString); overload;
destructor Destroy; override;
// node related
function AppendText(AText: TfpgString): TfpgTreeNode;
@@ -133,6 +135,7 @@ type
property Parent: TfpgTreeNode read FParent write SetParent;
property Prev: TfpgTreeNode read FPrev write FPrev;
property Text: TfpgString read FText write SetText;
+ property TreeView: TfpgTreeView read FTree;
{ determines the + or - image in the treeview }
property HasChildren: Boolean read FHasChildren write SetHasChildren;
// color settings
@@ -264,8 +267,10 @@ type
property TreeLineColor: TfpgColor read FTreeLineColor write SetTreeLineColor default clShadow1;
property TreeLineStyle: TfpgLineStyle read FTreeLineStyle write SetTreeLineStyle default lsDot;
property OnChange: TNotifyEvent read FOnChange write FOnChange;
- property OnExpand: TfpgTreeExpandEvent read FOnExpand write FOnExpand;
property OnDoubleClick;
+ property OnExpand: TfpgTreeExpandEvent read FOnExpand write FOnExpand;
+ property OnKeyChar;
+ property OnKeyPress;
property OnShowHint;
property OnStateImageClicked: TfpgStateImageClickedEvent read FOnStateImageClicked write FOnStateImageClicked;
end;
@@ -394,7 +399,8 @@ begin
FData := nil;
FFirstSubNode := nil;
FLastSubNode := nil;
- FText := '';
+ FText := '';
+ FTree := nil;
FImageIndex := -1;
FStateImageIndex := -1;
FCollapsed := True;
@@ -411,6 +417,13 @@ begin
FInactSelTextColor := clUnset;
end;
+constructor TfpgTreeNode.Create(ATreeView: TfpgTreeView; AText: TfpgString);
+begin
+ Create;
+ FText := AText;
+ FTree := ATreeView;
+end;
+
destructor TfpgTreeNode.Destroy;
begin
if FParent <> nil then
diff --git a/src/gui/inputintegerdialog.inc b/src/gui/inputintegerdialog.inc
new file mode 100644
index 00000000..237fb549
--- /dev/null
+++ b/src/gui/inputintegerdialog.inc
@@ -0,0 +1,157 @@
+{
+ fpGUI - Free Pascal GUI Toolkit
+
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
+ distribution, for details of the copyright.
+
+ See the file COPYING.modifiedLGPL, included in this distribution,
+ for details about redistributing fpGUI.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ Description:
+ This unit contains the Input Query dialogs.
+}
+
+{%mainunit fpg_dialogs.pas}
+
+{$IFDEF read_interface}
+
+type
+
+ TfpgIntegerDialog = class(TfpgForm)
+ private
+ {@VFD_HEAD_BEGIN: fpgIntegerDialog}
+ lblText: TfpgLabel;
+ edtInteger: TfpgEditInteger;
+ btnOK: TfpgButton;
+ btnCancel: TfpgButton;
+ {@VFD_HEAD_END: fpgIntegerDialog}
+ procedure SetupCaptions;
+ procedure edtIntegerKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean);
+ protected
+ procedure HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean); override;
+ public
+ procedure AfterCreate; override;
+ end;
+
+
+{$ENDIF read_interface}
+
+{$IFDEF read_implementation}
+
+function fpgIntegerQuery(const ACaption, APrompt: TfpgString; var Value: Integer; const MaxValue: Integer; const MinValue: Integer): Boolean;
+var
+ dlg: TfpgIntegerDialog;
+begin
+ dlg := TfpgIntegerDialog.Create(nil);
+ try
+ dlg.WindowTitle := ACaption;
+ dlg.lblText.Text := APrompt;
+ dlg.edtInteger.MaxValue:= MaxValue;
+ dlg.edtinteger.MinValue:= MinValue;
+ dlg.edtInteger.Value := Value;
+ Result := dlg.ShowModal = mrOK;
+ if Result then
+ Value := dlg.edtInteger.Value;
+ finally
+ dlg.Free;
+ end;
+end;
+
+{ TfpgIntegerDialog }
+
+procedure TfpgIntegerDialog.SetupCaptions;
+begin
+ btnOK.Text := rsOK;
+ btnCancel.Text := rsCancel;
+end;
+
+procedure TfpgIntegerDialog.edtIntegerKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean);
+begin
+ if KeyCode = keyEnter then
+ btnOK.Click;
+end;
+
+procedure TfpgIntegerDialog.HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean);
+begin
+ if KeyCode = keyEscape then
+ begin
+ consumed := True;
+ ModalResult := mrCancel;
+ end;
+end;
+
+procedure TfpgIntegerDialog.AfterCreate;
+begin
+ {%region 'Auto-generated GUI code' -fold}
+ {@VFD_BODY_BEGIN: fpgIntegerDialog}
+ Name := 'fpgIntegerDialog';
+ SetPosition(100, 150, 208, 97);
+ WindowTitle := 'IntegerDialog';
+ Hint := '';
+ WindowPosition := wpOneThirdDown;
+
+ lblText := TfpgLabel.Create(self);
+ with lblText do
+ begin
+ Name := 'lblText';
+ SetPosition(8, 8, 208, 16);
+ Anchors := [anLeft,anRight,anTop];
+ FontDesc := '#Label1';
+ Hint := '';
+ Text := 'lblText';
+ end;
+
+ edtInteger := TfpgEditInteger.Create(self);
+ with edtInteger do
+ begin
+ Name := 'edtInteger';
+ SetPosition(8, 26, 100, 24);
+ Anchors := [anLeft,anRight,anTop];
+ Hint := '';
+ TabOrder := 2;
+ Text := '';
+ FontDesc := '#Edit1';
+ Value := 0;
+ OnKeyPress := @edtIntegerKeyPressed;
+ end;
+
+ btnOK := TfpgButton.Create(self);
+ with btnOK do
+ begin
+ Name := 'btnOK';
+ SetPosition(8, 64, 92, 24);
+ Anchors := [anRight,anBottom];
+ Text := 'OK';
+ FontDesc := '#Label1';
+ Hint := '';
+ ImageName := '';
+ ModalResult := mrOK;
+ TabOrder := 3;
+ end;
+
+ btnCancel := TfpgButton.Create(self);
+ with btnCancel do
+ begin
+ Name := 'btnCancel';
+ SetPosition(108, 64, 92, 24);
+ Anchors := [anRight,anBottom];
+ Text := 'Cancel';
+ FontDesc := '#Label1';
+ Hint := '';
+ ImageName := '';
+ ModalResult := mrCancel;
+ TabOrder := 4;
+ end;
+
+ {@VFD_BODY_END: fpgIntegerDialog}
+ {%endregion}
+
+ SetupCaptions;
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/src/gui/inputquerydialog.inc b/src/gui/inputquerydialog.inc
index 6330d02c..b41af217 100644
--- a/src/gui/inputquerydialog.inc
+++ b/src/gui/inputquerydialog.inc
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
diff --git a/src/gui/selectdirdialog.inc b/src/gui/selectdirdialog.inc
index 6a96d046..063c7972 100644
--- a/src/gui/selectdirdialog.inc
+++ b/src/gui/selectdirdialog.inc
@@ -135,7 +135,6 @@ begin
begin
try
SortList := TStringList.Create;
- SortList.Sorted := True;
repeat
// check if special file
if (FileInfo.Name = '.') or (FileInfo.Name = '..') or (FileInfo.Name = '') then
@@ -153,10 +152,12 @@ begin
hidden files then do not add it to the list. }
//if ((faHidden and FileInfo.Attr) > 0) and not FShowHidden then
//continue;
-
SortList.Add(FileInfo.Name);
end;
until fpgFindNext(FileInfo) <> 0;
+
+ SortList.Sort;
+
for i := 0 to SortList.Count - 1 do
begin
NewNode := Node.AppendText(SortList[i]);
diff --git a/tools/imageconvert/extrafpc.cfg b/tools/imageconvert/extrafpc.cfg
new file mode 100644
index 00000000..7e5a5fd8
--- /dev/null
+++ b/tools/imageconvert/extrafpc.cfg
@@ -0,0 +1,9 @@
+-FUunits
+-Fu../../lib/$fpctarget
+-Xs
+-XX
+-CX
+#ifdef mswindows
+-WG
+#endif
+
diff --git a/tools/makefont/makefonts.lpi b/tools/makefont/makefonts.lpi
new file mode 100644
index 00000000..1e365c4d
--- /dev/null
+++ b/tools/makefont/makefonts.lpi
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+ <ProjectOptions>
+ <Version Value="9"/>
+ <General>
+ <SessionStorage Value="InProjectDir"/>
+ <MainUnit Value="0"/>
+ <Title Value="makefonts"/>
+ <UseAppBundle Value="False"/>
+ <ResourceType Value="res"/>
+ </General>
+ <i18n>
+ <EnableI18N LFM="False"/>
+ </i18n>
+ <VersionInfo>
+ <StringTable ProductVersion=""/>
+ </VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="default" Default="True"/>
+ </BuildModes>
+ <PublishOptions>
+ <Version Value="2"/>
+ </PublishOptions>
+ <RunParams>
+ <local>
+ <FormatVersion Value="1"/>
+ </local>
+ </RunParams>
+ <RequiredPackages Count="1">
+ <Item1>
+ <PackageName Value="fpgui_toolkit"/>
+ </Item1>
+ </RequiredPackages>
+ <Units Count="1">
+ <Unit0>
+ <Filename Value="makefonts.lpr"/>
+ <IsPartOfProject Value="True"/>
+ </Unit0>
+ </Units>
+ </ProjectOptions>
+ <CompilerOptions>
+ <Version Value="11"/>
+ <SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ <OtherUnitFiles Value="."/>
+ <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/>
+ </SearchPaths>
+ <Parsing>
+ <SyntaxOptions>
+ <AllowLabel Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
+ <Other>
+ <CompilerPath Value="$(CompPath)"/>
+ </Other>
+ </CompilerOptions>
+ <Debugging>
+ <Exceptions Count="3">
+ <Item1>
+ <Name Value="EAbort"/>
+ </Item1>
+ <Item2>
+ <Name Value="ECodetoolError"/>
+ </Item2>
+ <Item3>
+ <Name Value="EFOpenError"/>
+ </Item3>
+ </Exceptions>
+ </Debugging>
+</CONFIG>
diff --git a/tools/makefont/makefonts.lpr b/tools/makefont/makefonts.lpr
new file mode 100644
index 00000000..c54918ea
--- /dev/null
+++ b/tools/makefont/makefonts.lpr
@@ -0,0 +1,26 @@
+program makefonts;
+
+{$mode objfpc}{$H+}
+
+uses
+ Classes,
+ fpg_main, u_main, u_parsettf, u_data ;
+
+{.$R *.res}
+
+procedure MainProc;
+begin
+fpgApplication.Initialize;
+F_MainForm:= TF_MainForm.Create(nil);
+try
+ F_MainForm.Show;
+ fpgApplication.Run;
+finally
+ F_MainForm.Free;
+ end;
+end;
+
+begin
+MainProc;
+end.
+
diff --git a/tools/makefont/readme.txt b/tools/makefont/readme.txt
new file mode 100644
index 00000000..ccb25d4e
--- /dev/null
+++ b/tools/makefont/readme.txt
@@ -0,0 +1,43 @@
+------[Forwarded message from Jean-Marc Levecque]------
+
+Hi,
+
+Here is a first step in embedding true type fonts in the report tool.
+
+Attached is a set of patches for u_pdf and u_demo to show how it works.
+
+In addition, I wrote a utility to create the definition file for any ttf
+file, called makefonts. I gave the *.fnt extension to the generated font
+definition file.
+
+A major problem is to compress the ttf file.
+From the site fpdf.org, I found a way to get this compressed file done
+by use of the zlib library.
+If anybody knows how to do the equivalent compression using fpc, that
+would be really great.
+For now, on this site, going to Tutorials>Tutorial 7, then down to see
+the link to "on line", one can select a ttf file, choose the encoding
+and download the *.z file which is the compressed embeddable file for pdf.
+
+To simplify the tests, I have attached the *.fnt and *.z files for all
+DejaVu and Liberation fonts I have on my distribution. These files can
+be put anywhere, as the demo requires to select the directoy containing
+them.
+They are all encoded with cp1252 which is a Microsoft extension of
+ISO-8859-1, and it would be easy to get any other encoding.
+
+I also tried to use Microsoft Comic font, but despite they are installed
+on my PC, they do not show up correctly in the preview, while due to the
+embedding, they display correctly in pdf.
+
+Trying to embed uncompressed ttf files does not seem to work, but as per
+pdf specification, it should. I must have missed something :(
+
+Another tool may be used if one wants to use a font from a different
+format: from the site freeconverter.com, it is possible to convert a
+font file from a format to another one, with a large choice of formats.
+
+Remember that font licence may not allow embedding.
+
+Best regards
+Jean-Marc
diff --git a/tools/makefont/u_data.pas b/tools/makefont/u_data.pas
new file mode 100644
index 00000000..bb2ae980
--- /dev/null
+++ b/tools/makefont/u_data.pas
@@ -0,0 +1,2053 @@
+unit u_data;
+
+{$mode objfpc}
+
+interface
+
+uses
+ Classes, SysUtils;
+
+const
+ cp874_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ 'Euro', '.notdef', '.notdef', '.notdef', // 80 to 83
+ '.notdef', 'ellipsis', '.notdef', '.notdef', // 84 to 87
+ '.notdef', '.notdef', '.notdef', '.notdef', // 88 to 8B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 8C to 8F
+ '.notdef', 'quoteleft', 'quoteright', 'quotedblleft', // 90 to 93
+ 'quotedblright', 'bullet', 'endash', 'emdash', // 94 to 97
+ '.notdef', '.notdef', '.notdef', '.notdef', // 98 to 9B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 9C to 9F
+ 'space', 'kokaithai', 'khokhaithai', 'khokhuatthai', // A0 to A3
+ 'khokhwaithai', 'khokhonthai', 'khorakhangthai', 'ngonguthai', // A4 to A7
+ 'chochanthai', 'chochingthai', 'chochangthai', 'sosothai', // A8 to AB
+ 'chochoethai', 'yoyingthai', 'dochadathai', 'topatakthai', // AC to AF
+ 'thothanthai', 'thonangmonthothai','thophuthaothai', 'nonenthai', // B0 to B3
+ 'dodekthai', 'totaothai', 'thothungthai', 'thothahanthai', // B4 to B7
+ 'thothongthai', 'nonuthai', 'bobaimaithai', 'poplathai', // B8 to BB
+ 'phophungthai', 'fofathai', 'phophanthai', 'fofanthai', // BC to BF
+ 'phosamphaothai', 'momathai', 'yoyakthai', 'roruathai', // C0 to C3
+ 'ruthai', 'lolingthai', 'luthai', 'wowaenthai', // C4 to C7
+ 'sosalathai', 'sorusithai', 'sosuathai', 'hohipthai', // C8 to CB
+ 'lochulathai', 'oangthai', 'honokhukthai', 'paiyannoithai', // CC to CF
+ 'saraathai', 'maihanakatthai', 'saraaathai', 'saraamthai', // D0 to D3
+ 'saraithai', 'saraiithai', 'sarauethai', 'saraueethai', // D4 to D7
+ 'sarauthai', 'sarauuthai', 'phinthuthai', '.notdef', // D8 to DB
+ '.notdef', '.notdef', '.notdef', 'bahtthai', // DC to DF
+ 'saraethai', 'saraaethai', 'saraothai', 'saraaimaimuanthai', // E0 to E3
+ 'saraaimaimalaithai','lakkhangyaothai', 'maiyamokthai', 'maitaikhuthai', // E4 to E7
+ 'maiekthai', 'maithothai', 'maitrithai', 'maichattawathai', // E8 to EB
+ 'thanthakhatthai', 'nikhahitthai', 'yamakkanthai', 'fongmanthai', // EC to EF
+ 'zerothai', 'onethai', 'twothai', 'threethai', // F0 to F3
+ 'fourthai', 'fivethai', 'sixthai', 'seventhai', // F4 to F7
+ 'eightthai', 'ninethai', 'angkhankhuthai', 'khomutthai', // F8 to FB
+ '.notdef', '.notdef', '.notdef', '.notdef'); // FC to FF
+
+const
+ cp874_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ 8364, -1, -1, -1, -1, 8230, -1, -1, // 80 to 87
+ -1, -1, -1, -1, -1, -1, -1, -1, // 88 to 8F
+ -1, 8216, 8217, 8220, 8221, 8226, 8211, 8212, // 90 to 97
+ -1, -1, -1, -1, -1, -1, -1, -1, // 98 to 9F
+ 160, 3585, 3586, 3587, 3588, 3589, 3590, 3591, // A0 to A7
+ 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, // A8 to AF
+ 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, // B0 to B7
+ 3608, 3609, 3610, 3611, 3612, 3613, 3614, 3615, // B8 to BF
+ 3616, 3617, 3618, 3619, 3620, 3621, 3622, 3623, // C0 to C7
+ 3624, 3625, 3626, 3627, 3628, 3629, 3630, 3631, // C8 to CF
+ 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, // D0 to D7
+ 3640, 3641, 3642, -1, -1, -1, -1, 3647, // D8 to DF
+ 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655, // E0 to E7
+ 3656, 3657, 3658, 3659, 3660, 3661, 3662, 3663, // E8 to EF
+ 3664, 3665, 3666, 3667, 3668, 3669, 3670, 3671, // F0 to F7
+ 3672, 3673, 3674, 3675, -1, -1, -1, -1); // F8 to FF
+
+const
+ cp1250_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ 'Euro', '.notdef', 'quotesinglbase', '.notdef', // 80 to 83
+ 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', // 84 to 87
+ '.notdef', 'perthousand', 'Scaron', 'guilsinglleft', // 88 to 8B
+ 'Sacute', 'Tcaron', 'Zcaron', 'Zacute', // 8C to 8F
+ '.notdef', 'quoteleft', 'quoteright', 'quotedblleft', // 90 to 93
+ 'quotedblright', 'bullet', 'endash', 'emdash', // 94 to 97
+ '.notdef', 'trademark', 'scaron', 'guilsinglright', // 98 to 9B
+ 'sacute', 'tcaron', 'zcaron', 'zacute', // 9C to 9F
+ 'space', 'caron', 'breve', 'Lslash', // A0 to A3
+ 'currency', 'Aogonek', 'brokenbar', 'section', // A4 to A7
+ 'dieresis', 'copyright', 'Scedilla', 'guillemotleft', // A8 to AB
+ 'logicalnot', 'hyphen', 'registered', 'Zdotaccent', // AC to AF
+ 'degree', 'plusminus', 'ogonek', 'lslash', // B0 to B3
+ 'acute', 'mu', 'paragraph', 'periodcentered', // B4 to B7
+ 'cedilla', 'aogonek', 'scedilla', 'guillemotright', // B8 to BB
+ 'Lcaron', 'hungarumlaut', 'lcaron', 'zdotaccent', // BC to BF
+ 'Racute', 'Aacute', 'Acircumflex', 'Abreve', // C0 to C3
+ 'Adieresis', 'Lacute', 'Cacute', 'Ccedilla', // C4 to C7
+ 'Ccaron', 'Eacute', 'Eogonek', 'Edieresis', // C8 to CB
+ 'Ecaron', 'Iacute', 'Icircumflex', 'Dcaron', // CC to CF
+ 'Dcroat', 'Nacute', 'Ncaron', 'Oacute', // D0 to D3
+ 'Ocircumflex', 'Ohungarumlaut','Odieresis', 'multiply', // D4 to D7
+ 'Rcaron', 'Uring', 'Uacute', 'Uhungarumlaut', // D8 to DB
+ 'Udieresis', 'Yacute', 'Tcommaaccent', 'germandbls', // DC to DF
+ 'racute', 'aacute', 'acircumflex', 'abreve', // E0 to E3
+ 'adieresis', 'lacute', 'cacute', 'ccedilla', // E4 to E7
+ 'ccaron', 'eacute', 'eogonek', 'edieresis', // E8 to EB
+ 'ecaron', 'iacute', 'icircumflex', 'dcaron', // EC to EF
+ 'dcroat', 'nacute', 'ncaron', 'oacute', // F0 to F3
+ 'ocircumflex', 'ohungarumlaut','odieresis', 'divide', // F4 to F7
+ 'rcaron', 'uring', 'uacute', 'uhungarumlaut', // F8 to FB
+ 'udieresis', 'yacute', 'tcommaaccent', 'dotaccent'); // FC to FF
+
+const
+ cp1250_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ 8364, -1, 8218, -1, 8222, 8230, 8224, 8225, // 80 to 87
+ -1, 8240, 352, 8249, 346, 356, 381, 377, // 88 to 8F
+ -1, 8216, 8217, 8220, 8221, 8226, 8211, 8212, // 90 to 97
+ -1, 8482, 353, 8250, 347, 357, 382, 378, // 98 to 9F
+ 160, 711, 728, 321, 164, 260, 166, 167, // A0 to A7
+ 168, 169, 350, 171, 172, 173, 174, 379, // A8 to AF
+ 176, 177, 731, 322, 180, 181, 182, 183, // B0 to B7
+ 184, 261, 351, 187, 317, 733, 318, 380, // B8 to BF
+ 340, 193, 194, 258, 196, 313, 262, 199, // C0 to C7
+ 268, 201, 280, 203, 282, 205, 206, 270, // C8 to CF
+ 272, 323, 327, 211, 212, 336, 214, 215, // D0 to D7
+ 344, 366, 218, 368, 220, 221, 354, 354, // D8 to DF
+ 341, 225, 226, 259, 228, 314, 263, 231, // E0 to E7
+ 269, 233, 281, 235, 283, 237, 238, 271, // E8 to EF
+ 273, 324, 328, 243, 244, 337, 246, 247, // F0 to F7
+ 345, 367, 250, 369, 252, 253, 355, 729); // F8 to FF
+
+const
+ cp1251_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ 'afii10051', 'afii10052', 'quotesinglbase', 'afii10100', // 80 to 83
+ 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', // 84 to 87
+ 'Euro', 'perthousand', 'afii10058', 'guilsinglleft', // 88 to 8B
+ 'afii10059', 'afii10061', 'afii10060', 'afii10145', // 8C to 8F
+ 'afii10099', 'quoteleft', 'quoteright', 'quotedblleft', // 90 to 93
+ 'quotedblright', 'bullet', 'endash', 'emdash', // 94 to 97
+ '.notdef', 'trademark', 'afii10106', 'guilsinglright', // 98 to 9B
+ 'afii10107', 'afii10109', 'afii10108', 'afii10193', // 9C to 9F
+ 'space', 'afii10062', 'afii10110', 'afii10057', // A0 to A3
+ 'currency', 'afii10050', 'brokenbar', 'section', // A4 to A7
+ 'afii10023', 'copyright', 'afii10053', 'guillemotleft', // A8 to AB
+ 'logicalnot', 'hyphen', 'registered', 'afii10056', // AC to AF
+ 'degree', 'plusminus', 'afii10055', 'afii10103', // B0 to B3
+ 'afii10098', 'mu', 'paragraph', 'periodcentered', // B4 to B7
+ 'afii10071', 'afii61352', 'afii10101', 'guillemotright', // B8 to BB
+ 'afii10105', 'afii10054', 'afii10102', 'afii10104', // BC to BF
+ 'afii10017', 'afii10018', 'afii10019', 'afii10020', // C0 to C3
+ 'afii10021', 'afii10022', 'afii10024', 'afii10025', // C4 to C7
+ 'afii10026', 'afii10027', 'afii10028', 'afii10029', // C8 to CB
+ 'afii10030', 'afii10031', 'afii10032', 'afii10033', // CC to CF
+ 'afii10034', 'afii10035', 'afii10036', 'afii10037', // D0 to D3
+ 'afii10038', 'afii10039', 'afii10040', 'afii10041', // D4 to D7
+ 'afii10042', 'afii10043', 'afii10044', 'afii10045', // D8 to DB
+ 'afii10046', 'afii10047', 'afii10048', 'afii10049', // DC to DF
+ 'afii10065', 'afii10066', 'afii10067', 'afii10068', // E0 to E3
+ 'afii10069', 'afii10070', 'afii10072', 'afii10073', // E4 to E7
+ 'afii10074', 'afii10075', 'afii10076', 'afii10077', // E8 to EB
+ 'afii10078', 'afii10079', 'afii10080', 'afii10081', // EC to EF
+ 'afii10082', 'afii10083', 'afii10084', 'afii10085', // F0 to F3
+ 'afii10086', 'afii10087', 'afii10088', 'afii10089', // F4 to F7
+ 'afii10090', 'afii10091', 'afii10092', 'afii10093', // F8 to FB
+ 'afii10094', 'afii10095', 'afii10095', 'afii10097'); // FC to FF
+
+const
+ cp1251_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ 1026, 1027, 8218, 1107, 8222, 8230, 8224, 8225, // 80 to 87
+ 8364, 8240, 1033, 8249, 1034, 1036, 1035, 1039, // 88 to 8F
+ 1106, 8216, 8217, 8220, 8221, 8226, 8211, 8212, // 90 to 97
+ -1, 8482, 1113, 8250, 1114, 1116, 1115, 1119, // 98 to 9F
+ 160, 1038, 1118, 1032, 164, 1168, 166, 167, // A0 to A7
+ 1025, 169, 1028, 171, 172, 173, 174, 1031, // A8 to AF
+ 176, 177, 1030, 1110, 1169, 181, 182, 183, // B0 to B7
+ 1105, 8470, 1108, 187, 1112, 1029, 1109, 1111, // B8 to BF
+ 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, // C0 to C7
+ 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, // C8 to CF
+ 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, // D8 to D7
+ 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, // D8 to DF
+ 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, // E0 to E7
+ 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, // E8 to EF
+ 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, // F0 to F7
+ 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103); // F8 to FF
+
+const
+ cp1252_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ 'Euro', '.notdef', 'quotesinglbase', 'florin', // 80 to 83
+ 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', // 84 to 87
+ 'circumflex', 'perthousand', 'Scaron', 'guilsinglleft', // 88 to 8B
+ 'OE', '.notdef', 'Zcaron', '.notdef', // 8C to 8F
+ '.notdef', 'quoteleft', 'quoteright', 'quotedblleft', // 90 to 93
+ 'quotedblright', 'bullet', 'endash', 'emdash', // 94 to 97
+ 'tilde', 'trademark', 'scaron', 'guilsinglright', // 98 to 9B
+ 'oe', '.notdef', 'zcaron', 'Ydieresis', // 9C to 9F
+ 'space', 'exclamdown', 'cent', 'sterling', // A0 to A3
+ 'currency', 'yen', 'brokenbar', 'section', // A4 to A7
+ 'dieresis', 'copyright', 'ordfeminine', 'guillemotleft', // A8 to AB
+ 'logicalnot', 'hyphen', 'registered', 'macron', // AC to AF
+ 'degree', 'plusminus', 'twosuperior', 'threesuperior', // B0 to B3
+ 'acute', 'mu', 'paragraph', 'periodcentered', // B4 to B7
+ 'cedilla', 'onesuperior', 'ordmasculine', 'guillemotright', // B8 to BB
+ 'onequarter', 'onehalf', 'threequarters', 'questiondown', // BC to BF
+ 'Agrave', 'Aacute', 'Acircumflex', 'Atilde', // C0 to C3
+ 'Adieresis', 'Aring', 'AE', 'Ccedilla', // C4 to C7
+ 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis', // C8 to CB
+ 'Igrave', 'Iacute', 'Icircumflex', 'Idieresis', // CC to CF
+ 'Eth', 'Ntilde', 'Ograve', 'Oacute', // D0 to D3
+ 'Ocircumflex', 'Otilde', 'Odieresis', 'multiply', // D4 to D7
+ 'Oslash', 'Ugrave', 'Uacute', 'Ucircumflex', // D8 to DB
+ 'Udieresis', 'Yacute', 'Thorn', 'germandbls', // DC to DF
+ 'agrave', 'aacute', 'acircumflex', 'atilde', // E0 to E3
+ 'adieresis', 'aring', 'ae', 'ccedilla', // E4 to E7
+ 'egrave', 'eacute', 'ecircumflex', 'edieresis', // E8 to EB
+ 'igrave', 'iacute', 'icircumflex', 'idieresis', // EC to EF
+ 'eth', 'ntilde', 'ograve', 'oacute', // F0 to F3
+ 'ocircumflex', 'otilde', 'odieresis', 'divide', // F4 to F7
+ 'oslash', 'ugrave', 'uacute', 'ucircumflex', // F8 to FB
+ 'udieresis', 'yacute', 'thorn', 'ydieresis'); // FC to FF
+
+const
+ cp1252_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ 8364, -1, 8218, 402, 8222, 8230, 8224, 8225, // 80 to 87
+ 710, 8240, 352, 8249, 338, -1, 381, -1, // 88 to 8F
+ -1, 8216, 8217, 8220, 8221, 8226, 8211, 8212, // 90 to 97
+ 732, 8482, 353, 8250, 339, -1, 382, 376, // 98 to 9F
+ 160, 161, 162, 163, 164, 165, 166, 167, // A0 to A7
+ 168, 169, 170, 171, 172, 173, 174, 175, // A8 to AF
+ 176, 177, 178, 179, 180, 181, 182, 183, // B0 to B7
+ 184, 185, 186, 187, 188, 189, 190, 191, // B8 to BF
+ 192, 193, 194, 195, 196, 197, 198, 199, // C0 to C7
+ 200, 201, 202, 203, 204, 205, 206, 207, // C8 to CF
+ 208, 209, 210, 211, 212, 213, 214, 215, // D0 to D7
+ 216, 217, 218, 219, 220, 221, 222, 223, // D8 to DF
+ 224, 225, 226, 227, 228, 229, 230, 231, // E0 to E7
+ 232, 233, 234, 235, 236, 237, 238, 239, // E8 to EF
+ 240, 241, 242, 243, 244, 245, 246, 247, // F0 to F7
+ 248, 249, 250, 251, 252, 253, 254, 255); // F8 to FF
+
+const
+ cp1253_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ 'Euro', '.notdef', 'quotesinglbase', 'florin', // 80 to 83
+ 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', // 84 to 87
+ '.notdef', 'perthousand', '.notdef', 'guilsinglleft', // 88 to 8B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 8C to 8F
+ '.notdef', 'quoteleft', 'quoteright', 'quotedblleft', // 90 to 93
+ 'quotedblright', 'bullet', 'endash', 'emdash', // 94 to 97
+ '.notdef', 'trademark', '.notdef', 'guilsinglright', // 98 to 9B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 9C to 9F
+ 'space', 'dieresistonos','Alphatonos', 'sterling', // A0 to A3
+ 'currency', 'yen', 'brokenbar', 'section', // A4 to A7
+ 'dieresis', 'copyright', '.notdef', 'guillemotleft', // A8 to AB
+ 'logicalnot', 'hyphen', 'registered', 'afii00208', // AC to AF
+ 'degree', 'plusminus', 'twosuperior', 'threesuperior', // B0 to B3
+ 'tonos', 'mu', 'paragraph', 'periodcentered', // B4 to B7
+ 'Epsilontonos', 'Etatonos', 'Iotatonos', 'guillemotright', // B8 to BB
+ 'Omicrontonos', 'onehalf', 'Upsilontonos', 'Omegatonos', // BC to BF
+ 'iotadieresistonos', 'Alpha', 'Beta', 'Gamma', // C0 to C3
+ 'Delta', 'Epsilon', 'Zeta', 'Eta', // C4 to C7
+ 'Theta', 'Iota', 'Kappa', 'Lambda', // C8 to CB
+ 'Mu', 'Nu', 'Xi', 'Omicron', // CC to CF
+ 'Pi', 'Rho', '.notdef', 'Sigma', // D0 to D3
+ 'Tau', 'Upsilon', 'Phi', 'Chi', // D4 to D7
+ 'Psi', 'Omega', 'Iotadieresis', 'Upsilondieresis', // D8 to DB
+ 'alphatonos', 'epsilontonos', 'etatonos', 'iotatonos', // DC to DF
+ 'upsilondieresistonos','alpha', 'beta', 'gamma', // E0 to E3
+ 'delta', 'epsilon', 'zeta', 'eta', // E4 to E7
+ 'theta', 'iota', 'kappa', 'lambda', // E8 to EB
+ 'mu', 'nu', 'xi', 'omicron', // EC to EF
+ 'pi', 'rho', 'sigma1', 'sigma', // F0 to F3
+ 'tau', 'upsilon', 'phi', 'chi', // F4 to F7
+ 'psi', 'omega', 'iotadieresis', 'upsilondieresis', // F8 to FB
+ 'omicrontonos', 'upsilontonos', 'omegatonos', '.notdef'); // FC to FF
+
+const
+ cp1253_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ 8364, -1, 8218, 402, 8222, 8230, 8224, 8225, // 80 to 87
+ -1, 8240, -1, 8249, -1, -1, -1, -1, // 88 to 8F
+ -1, 8216, 8217, 8220, 8221, 8226, 8211, 8212, // 90 to 97
+ -1, 8482, -1, 8250, -1, -1, -1, -1, // 98 to 9F
+ 160, 901, 902, 163, 164, 165, 166, 167, // A0 to A7
+ 168, 169, -1, 171, 172, 173, 174, 8213, // A8 to AF
+ 176, 177, 178, 179, 900, 181, 182, 183, // B0 to B7
+ 904, 905, 906, 187, 908, 189, 910, 911, // B8 to BF
+ 912, 913, 914, 915, 916, 917, 918, 919, // C0 to C7
+ 920, 921, 922, 923, 924, 925, 926, 927, // C8 to CF
+ 928, 929, -1, 931, 932, 933, 934, 935, // D0 to D7
+ 936, 937, 938, 939, 940, 941, 942, 943, // D8 to DF
+ 944, 945, 946, 947, 948, 949, 950, 951, // E0 to E7
+ 952, 953, 954, 955, 956, 957, 958, 959, // E8 to EF
+ 960, 961, 962, 963, 964, 965, 966, 967, // F0 to F7
+ 968, 969, 970, 971, 972, 973, 974, -1); // F8 to FF
+
+const
+ cp1254_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ 'Euro', '.notdef', 'quotesinglbase', 'florin', // 80 to 83
+ 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', // 84 to 87
+ 'circumflex', 'perthousand', 'Scaron', 'guilsinglleft', // 88 to 8B
+ 'OE', '.notdef', '.notdef', '.notdef', // 8C to 8F
+ '.notdef', 'quoteleft', 'quoteright', 'quotedblleft', // 90 to 93
+ 'quotedblright', 'bullet', 'endash', 'emdash', // 94 to 97
+ 'tilde', 'trademark', 'scaron', 'guilsinglright', // 98 to 9B
+ 'oe', '.notdef', '.notdef', 'Ydieresis', // 9C to 9F
+ 'space', 'exclamdown', 'cent', 'sterling', // A0 to A3
+ 'currency', 'yen', 'brokenbar', 'section', // A4 to A7
+ 'dieresis', 'copyright', 'ordfeminine', 'guillemotleft', // A8 to AB
+ 'logicalnot', 'hyphen', 'registered', 'macron', // AC to AF
+ 'degree', 'plusminus', 'twosuperior', 'threesuperior', // B0 to B3
+ 'acute', 'mu', 'paragraph', 'periodcentered', // B4 to B7
+ 'cedilla', 'onesuperior','ordmasculine', 'guillemotright', // B8 to BB
+ 'onequarter', 'onehalf', 'threequarters', 'questiondown', // BC to BF
+ 'Agrave', 'Aacute', 'Acircumflex', 'Atilde', // C0 to C3
+ 'Adieresis', 'Aring', 'AE', 'Ccedilla', // C4 to C7
+ 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis', // C8 to CB
+ 'Igrave', 'Iacute', 'Icircumflex', 'Idieresis', // CC to CF
+ 'Gbreve', 'Ntilde', 'Ograve', 'Oacute', // D0 to D3
+ 'Ocircumflex', 'Otilde', 'Odieresis', 'multiply', // D4 to D7
+ 'Oslash', 'Ugrave', 'Uacute', 'Ucircumflex', // D8 to DB
+ 'Udieresis', 'Idotaccent', 'Scedilla', 'germandbls', // DC to DF
+ 'agrave', 'aacute', 'acircumflex', 'atilde', // E0 to E3
+ 'adieresis', 'aring', 'ae', 'ccedilla', // E4 to E7
+ 'egrave', 'eacute', 'ecircumflex', 'edieresis', // E8 to EB
+ 'igrave', 'iacute', 'icircumflex', 'idieresis', // EC to EF
+ 'gbreve', 'ntilde', 'ograve', 'oacute', // F0 to F3
+ 'ocircumflex', 'otilde', 'odieresis', 'divide', // F4 to F7
+ 'oslash', 'ugrave', 'uacute', 'ucircumflex', // F8 to FB
+ 'udieresis', 'dotlessi', 'scedilla', 'ydieresis'); // FC to FF
+
+const
+ cp1254_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ 8364, -1, 8218, 402, 8222, 8230, 8224, 8225, // 80 to 87
+ 710, 8240, 352, 8249, 338, -1, -1, -1, // 88 to 8F
+ -1, 8216, 8217, 8220, 8221, 8226, 8211, 8212, // 90 to 97
+ 732, 8482, 353, 8250, 339, -1, -1, 376, // 98 to 9F
+ 160, 161, 162, 163, 164, 165, 166, 167, // A0 to A7
+ 168, 169, 170, 171, 172, 173, 174, 175, // A8 to AF
+ 176, 177, 178, 179, 180, 181, 182, 183, // B0 to B7
+ 184, 185, 186, 187, 188, 189, 190, 191, // B8 to BF
+ 192, 193, 194, 195, 196, 197, 198, 199, // C0 to C7
+ 200, 201, 202, 203, 204, 205, 206, 207, // C8 to CF
+ 286, 209, 210, 211, 212, 213, 214, 215, // D0 to D7
+ 216, 217, 218, 219, 220, 304, 350, 223, // D8 to DF
+ 224, 225, 226, 227, 228, 229, 230, 231, // E0 to E7
+ 232, 233, 234, 235, 236, 237, 238, 239, // E8 to EF
+ 287, 241, 242, 243, 244, 245, 246, 247, // F0 to F7
+ 248, 249, 250, 251, 252, 305, 351, 255); // F8 to FF
+
+const
+ cp1255_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ 'Euro', '.notdef', 'quotesinglbase', 'florin', // 80 to 83
+ 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', // 84 to 87
+ 'circumflex', 'perthousand', '.notdef', 'guilsinglleft', // 88 to 8B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 8C to 8F
+ '.notdef', 'quoteleft', 'quoteright', 'quotedblleft', // 90 to 93
+ 'quotedblright', 'bullet', 'endash', 'emdash', // 94 to 97
+ 'tilde', 'trademark', '.notdef', 'guilsinglright', // 98 to 9B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 9C to 9F
+ 'space', 'exclamdown', 'cent', 'sterling', // A0 to A3
+ 'afii57636', 'yen', 'brokenbar', 'section', // A4 to A7
+ 'dieresis', 'copyright', 'multiply', 'guillemotleft', // A8 to AB
+ 'logicalnot', 'sfthyphen', 'registered', 'macron', // AC to AF
+ 'degree', 'plusminus', 'twosuperior', 'threesuperior', // B0 to B3
+ 'acute', 'mu', 'paragraph', 'middot', // B4 to B7
+ 'cedilla', 'onesuperior', 'divide', 'guillemotright', // B8 to BB
+ 'onequarter', 'onehalf', 'threequarters', 'questiondown', // BC to BF
+ 'afii57799', 'afii57801', 'afii57800', 'afii57802', // C0 to C3
+ 'afii57793', 'afii57794', 'afii57795', 'afii57798', // C4 to C7
+ 'afii57797', 'afii57806', '.notdef', 'afii57796', // C8 to CB
+ 'afii57807', 'afii57839', 'afii57645', 'afii57841', // CC to CF
+ 'afii57842', 'afii57804', 'afii57803', 'afii57658', // D0 to D3
+ 'afii57716', 'afii57717', 'afii57718', 'gereshhebrew', // D4 to D7
+ 'gershayimhebrew', '.notdef', '.notdef', '.notdef', // D8 to DB
+ '.notdef', '.notdef', '.notdef', '.notdef', // DC to DF
+ 'afii57664', 'afii57665', 'afii57666', 'afii57667', // E0 to E3
+ 'afii57668', 'afii57669', 'afii57670', 'afii57671', // E4 to E7
+ 'afii57672', 'afii57673', 'afii57674', 'afii57675', // E8 to EB
+ 'afii57676', 'afii57677', 'afii57678', 'afii57679', // EC to EF
+ 'afii57680', 'afii57681', 'afii57682', 'afii57683', // F0 to F3
+ 'afii57684', 'afii57685', 'afii57686', 'afii57687', // F4 to F7
+ 'afii57688', 'afii57689', 'afii57690', '.notdef', // F8 to FB
+ '.notdef', 'afii299', 'afii300', '.notdef'); // FC to FF
+
+const
+ cp1255_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ 8364, -1, 8218, 402, 8222, 8230, 8224, 8225, // 80 to 87
+ 710, 8240, -1, 8249, -1, -1, -1, -1, // 88 to 8F
+ -1, 8216, 8217, 8220, 8221, 8226, 8211, 8212, // 90 to 97
+ 732, 8482, -1, 8250, -1, -1, -1, -1, // 98 to 9F
+ 160, 161, 162, 163, 8362, 165, 166, 167, // A0 to A7
+ 168, 169, 215, 171, 172, 173, 174, 175, // A8 to AF
+ 176, 177, 178, 179, 180, 181, 182, 183, // B0 to B7
+ 184, 185, 247, 187, 188, 189, 190, 191, // B8 to BF
+ 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, // C0 to C7
+ 1464, 1465, -1, 1467, 1468, 1469, 1470, 1471, // C8 to CF
+ 1472, 1473, 1474, 1475, 1520, 1521, 1522, 1523, // D0 to D7
+ 1524, -1, -1, -1, -1, -1, -1, -1, // D8 to DF
+ 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, // E0 to E7
+ 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, // E8 to EF
+ 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, // F0 to F7
+ 1512, 1513, 1514, -1, -1, 8206, 8207, -1); // F8 to FF
+
+const
+ cp1257_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ 'Euro', '.notdef', 'quotesinglbase', '.notdef', // 80 to 83
+ 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', // 84 to 87
+ '.notdef', 'perthousand', '.notdef', 'guilsinglleft', // 88 to 8B
+ '.notdef', 'dieresis', 'caron', 'cedilla', // 8C to 8F
+ '.notdef', 'quoteleft', 'quoteright', 'quotedblleft', // 90 to 93
+ 'quotedblright', 'bullet', 'endash', 'emdash', // 94 to 97
+ '.notdef', 'trademark', '.notdef', 'guilsinglright', // 98 to 9B
+ '.notdef', 'macron', 'ogonek', '.notdef', // 9C to 9F
+ 'space', '.notdef', 'cent', 'sterling', // A0 to A3
+ 'currency', '.notdef', 'brokenbar', 'section', // A4 to A7
+ 'Oslash', 'copyright', 'Rcommaaccent', 'guillemotleft', // A8 to AB
+ 'logicalnot', 'hyphen', 'registered', 'AE', // AC to AF
+ 'degree', 'plusminus', 'twosuperior', 'threesuperior', // B0 to B3
+ 'acute', 'mu', 'paragraph', 'periodcentered', // B4 to B7
+ 'oslash', 'onesuperior', 'rcommaaccent', 'guillemotright', // B8 to BB
+ 'onequarter', 'onehalf', 'threequarters', 'ae', // BC to BF
+ 'Aogonek', 'Iogonek', 'Amacron', 'Cacute', // C0 to C3
+ 'Adieresis', 'Aring', 'Eogonek', 'Emacron', // C4 to C7
+ 'Ccaron', 'Eacute', 'Zacute', 'Edotaccent', // C8 to CB
+ 'Gcommaaccent', 'Kcommaaccent', 'Imacron', 'Lcommaaccent', // CC to CF
+ 'Scaron', 'Nacute', 'Ncommaaccent', 'Oacute', // D0 to D3
+ 'Omacron', 'Otilde', 'Odieresis', 'multiply', // D4 to D7
+ 'Uogonek', 'Lslash', 'Sacute', 'Umacron', // D8 to DB
+ 'Udieresis', 'Zdotaccent', 'Zcaron', 'germandbls', // DC to DF
+ 'aogonek', 'iogonek', 'amacron', 'cacute', // E0 to E3
+ 'adieresis', 'aring', 'eogonek', 'emacron', // E4 to E7
+ 'ccaron', 'eacute', 'zacute', 'edotaccent', // E8 to EB
+ 'gcommaaccent', 'kcommaaccent', 'imacron', 'lcommaaccent', // EC to EF
+ 'scaron', 'nacute', 'ncommaaccent', 'oacute', // F0 to F3
+ 'omacron', 'otilde', 'odieresis', 'divide', // F4 to F7
+ 'uogonek', 'lslash', 'sacute', 'umacron', // F8 to FB
+ 'udieresis', 'zdotaccent', 'zcaron', 'dotaccent'); // FC to FF
+
+const
+ cp1257_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ 8364, -1, 8218, -1, 8222, 8230, 8224, 8225, // 80 to 87
+ -1, 8240, -1, 8249, -1, 168, 711, 184, // 88 to 8F
+ -1, 8216, 8217, 8220, 8221, 8226, 8211, 8212, // 90 to 97
+ -1, 8482, -1, 8250, -1, 175, 731, -1, // 98 to 9F
+ 160, -1, 162, 163, 164, -1, 166, 167, // A0 to A7
+ 216, 169, 342, 171, 172, 173, 174, 198, // A0 to AF
+ 176, 177, 178, 179, 180, 181, 182, 183, // B0 to B7
+ 248, 185, 343, 187, 188, 189, 190, 230, // B8 to BF
+ 260, 302, 256, 262, 196, 197, 280, 274, // C0 to C7
+ 268, 201, 377, 278, 290, 310, 298, 315, // C8 to CF
+ 352, 323, 325, 211, 332, 213, 214, 215, // D0 to D7
+ 370, 321, 346, 362, 220, 379, 381, 223, // D8 to DF
+ 261, 303, 257, 263, 228, 229, 281, 275, // E0 to E7
+ 269, 233, 378, 279, 291, 311, 299, 316, // E8 to EF
+ 353, 324, 326, 243, 333, 245, 246, 247, // F0 to F7
+ 371, 322, 347, 363, 252, 380, 382, 729); // F8 to FF
+
+const
+ cp1258_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ 'Euro', '.notdef', 'quotesinglbase', 'florin', // 80 to 83
+ 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', // 84 to 87
+ 'circumflex', 'perthousand', '.notdef', 'guilsinglleft', // 88 to 8B
+ 'OE', '.notdef', '.notdef', '.notdef', // 8C to 8F
+ '.notdef', 'quoteleft', 'quoteright', 'quotedblleft', // 90 to 93
+ 'quotedblright', 'bullet', 'endash', 'emdash', // 94 to 97
+ 'tilde', 'trademark', '.notdef', 'guilsinglright', // 98 to 9B
+ 'oe', '.notdef', '.notdef', 'Ydieresis', // 9C to 9F
+ 'space', 'exclamdown', 'cent', 'sterling', // A0 to A3
+ 'currency', 'yen', 'brokenbar', 'section', // A4 to A7
+ 'dieresis', 'copyright', 'ordfeminine', 'guillemotleft', // A8 to AB
+ 'logicalnot', 'hyphen', 'registered', 'macron', // AC to AF
+ 'degree', 'plusminus', 'twosuperior', 'threesuperior', // B0 to B3
+ 'acute', 'mu', 'paragraph', 'periodcentered', // B4 to B7
+ 'cedilla', 'onesuperior', 'ordmasculine', 'guillemotright', // B8 to BB
+ 'onequarter', 'onehalf', 'threequarters', 'questiondown', // BC to BF
+ 'Agrave', 'Aacute', 'Acircumflex', 'Abreve', // C0 to C3
+ 'Adieresis', 'Aring', 'AE', 'Ccedilla', // C4 to C7
+ 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis', // C8 to CB
+ 'gravecomb', 'Iacute', 'Icircumflex', 'Idieresis', // CC to CF
+ 'Dcroat', 'Ntilde', 'hookabovecomb', 'Oacute', // D0 to D3
+ 'Ocircumflex', 'Ohorn', 'Odieresis', 'multiply', // D4 to D7
+ 'Oslash', 'Ugrave', 'Uacute', 'Ucircumflex', // D8 to DB
+ 'Udieresis', 'Uhorn', 'tildecomb', 'germandbls', // DC to DF
+ 'agrave', 'aacute', 'acircumflex', 'abreve', // E0 to E3
+ 'adieresis', 'aring', 'ae', 'ccedilla', // E4 to E7
+ 'egrave', 'eacute', 'ecircumflex', 'edieresis', // E8 to EB
+ 'acutecomb', 'iacute', 'icircumflex', 'idieresis', // EC to EF
+ 'dcroat', 'ntilde', 'dotbelowcomb', 'oacute', // F0 to F3
+ 'ocircumflex', 'ohorn', 'odieresis', 'divide', // F4 to F7
+ 'oslash', 'ugrave', 'uacute', 'ucircumflex', // F8 to FB
+ 'udieresis', 'uhorn', 'dong', 'ydieresis'); // FC to FF
+
+const
+ cp1258_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ 8264, -1, 8218, 402, 8222, 8230, 8224, 8225, // 80 to 87
+ 710, 8240, -1, 8249, 338, -1, -1, -1, // 88 to 8F
+ -1, 8216, 8217, 8220, 8221, 8226, 8211, 8212, // 90 to 97
+ 732, 8482, -1, 8250, 339, -1, -1, 376, // 98 to 9F
+ 160, 161, 162, 163, 164, 165, 166, 167, // A0 to A7
+ 168, 169, 170, 171, 172, 173, 174, 175, // A8 to AF
+ 176, 177, 178, 179, 180, 181, 182, 183, // B0 to B7
+ 184, 185, 186, 187, 188, 189, 190, 191, // B8 to BF
+ 192, 193, 194, 258, 196, 197, 198, 199, // C0 to C7
+ 200, 201, 202, 203, 768, 205, 206, 207, // C8 to CF
+ 272, 209, 777, 211, 212, 416, 214, 215, // D0 to D7
+ 216, 217, 218, 219, 220, 431, 771, 223, // D8 to DF
+ 224, 225, 226, 259, 228, 229, 230, 231, // E0 to E7
+ 232, 233, 234, 235, 769, 237, 238, 239, // E8 to EF
+ 273, 241, 803, 243, 244, 417, 246, 247, // F0 to F7
+ 248, 249, 250, 251, 252, 432, 8363, 255); // F8 to FF
+
+const
+ iso_8859_1_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 80 to 83
+ '.notdef', '.notdef', '.notdef', '.notdef', // 84 to 87
+ '.notdef', '.notdef', '.notdef', '.notdef', // 88 to 8B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 8C to 8F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 90 to 93
+ '.notdef', '.notdef', '.notdef', '.notdef', // 94 to 97
+ '.notdef', '.notdef', '.notdef', '.notdef', // 98 to 9B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 9C to 9F
+ 'space', 'exclamdown', 'cent', 'sterling', // A0 to A3
+ 'currency', 'yen', 'brokenbar', 'section', // A4 to A7
+ 'dieresis', 'copyright', 'ordfeminine', 'guillemotleft', // A8 to AB
+ 'logicalnot', 'hyphen', 'registered', 'macron', // AC to AF
+ 'degree', 'plusminus', 'twosuperior', 'threesuperior', // B0 to B3
+ 'acute', 'mu', 'paragraph', 'periodcentered', // B4 to B7
+ 'cedilla', 'onesuperior', 'ordmasculine', 'guillemotright', // B8 to BB
+ 'onequarter', 'onehalf', 'threequarters','questiondown', // BC to BF
+ 'Agrave', 'Aacute', 'Acircumflex', 'Atilde', // C0 to C3
+ 'Adieresis', 'Aring', 'AE', 'Ccedilla', // C4 to C7
+ 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis', // C8 to CB
+ 'Igrave', 'Iacute', 'Icircumflex', 'Idieresis', // CC to CF
+ 'Eth', 'Ntilde', 'Ograve', 'Oacute', // D0 to D3
+ 'Ocircumflex', 'Otilde', 'Odieresis', 'multiply', // D4 to D7
+ 'Oslash', 'Ugrave', 'Uacute', 'Ucircumflex', // D8 to DB
+ 'Udieresis', 'Yacute', 'Thorn', 'germandbls', // DC to DF
+ 'agrave', 'aacute', 'acircumflex', 'atilde', // E0 to E3
+ 'adieresis', 'aring', 'ae', 'ccedilla', // E4 to E7
+ 'egrave', 'eacute', 'ecircumflex', 'edieresis', // E8 to EB
+ 'igrave', 'iacute', 'icircumflex', 'idieresis', // EC to EF
+ 'eth', 'ntilde', 'ograve', 'oacute', // F0 to F3
+ 'ocircumflex', 'otilde', 'odieresis', 'divide', // F4 to F7
+ 'oslash', 'ugrave', 'uacute', 'ucircumflex', // F8 to FB
+ 'udieresis', 'yacute', 'thorn', 'ydieresis'); // FC to FF
+
+const
+ iso_8859_1_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 80 to 87
+ -1, -1, -1, -1, -1, -1, -1, -1, // 88 to 8F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 90 to 97
+ -1, -1, -1, -1, -1, -1, -1, -1, // 98 to 9F
+ 160, 161, 162, 163, 164, 165, 166, 167, // A0 to A7
+ 168, 169, 170, 171, 172, 173, 174, 175, // A8 to AF
+ 176, 177, 178, 179, 180, 181, 182, 183, // B0 to B7
+ 184, 185, 186, 187, 188, 189, 190, 191, // B8 to BF
+ 192, 193, 194, 195, 196, 197, 198, 199, // C0 to C7
+ 200, 201, 202, 203, 204, 205, 206, 207, // C8 to CF
+ 208, 209, 210, 211, 212, 213, 214, 215, // D0 to D7
+ 216, 217, 218, 219, 220, 221, 222, 223, // D8 to DF
+ 224, 225, 226, 227, 228, 229, 230, 231, // E0 to E7
+ 232, 233, 234, 235, 236, 237, 238, 239, // E8 to EF
+ 240, 241, 242, 243, 244, 245, 246, 247, // F0 to F7
+ 248, 249, 250, 251, 252, 253, 254, 255); // F8 to FF
+
+const
+ iso_8859_2_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 80 to 83
+ '.notdef', '.notdef', '.notdef', '.notdef', // 84 to 87
+ '.notdef', '.notdef', '.notdef', '.notdef', // 88 to 8B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 8C to 8F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 90 to 93
+ '.notdef', '.notdef', '.notdef', '.notdef', // 94 to 97
+ '.notdef', '.notdef', '.notdef', '.notdef', // 98 to 9B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 9C to 9F
+ 'space', 'Aogonek', 'breve', 'Lslash', // A0 to A3
+ 'currency', 'Lcaron', 'Sacute', 'section', // A4 to A7
+ 'dieresis', 'Scaron', 'Scedilla', 'Tcaron', // A8 to AB
+ 'Zacute', 'hyphen', 'Zcaron', 'Zdotaccent', // AC to AF
+ 'degree', 'aogonek', 'ogonek', 'lslash', // B0 to B3
+ 'acute', 'lcaron', 'sacute', 'caron', // B4 to B7
+ 'cedilla', 'scaron', 'scedilla', 'tcaron', // B8 to BB
+ 'zacute', 'hungarumlaut', 'zcaron', 'zdotaccent', // BC to BF
+ 'Racute', 'Aacute', 'Acircumflex', 'Abreve', // C0 to C3
+ 'Adieresis', 'Lacute', 'Cacute', 'Ccedilla', // C4 to C7
+ 'Ccaron', 'Eacute', 'Eogonek', 'Edieresis', // C8 to CB
+ 'Ecaron', 'Iacute', 'Icircumflex', 'Dcaron', // CC to CF
+ 'Dcroat', 'Nacute', 'Ncaron', 'Oacute', // D0 to D3
+ 'Ocircumflex', 'Ohungarumlaut','Odieresis', 'multiply', // D4 to D7
+ 'Rcaron', 'Uring', 'Uacute', 'Uhungarumlaut', // D8 to DB
+ 'Udieresis', 'Yacute', 'Tcommaaccent', 'germandbls', // DC to DF
+ 'racute', 'aacute', 'acircumflex', 'abreve', // E0 to E3
+ 'adieresis', 'lacute', 'cacute', 'ccedilla', // E4 to E7
+ 'ccaron', 'eacute', 'eogonek', 'edieresis', // E8 to EB
+ 'ecaron', 'iacute', 'icircumflex', 'dcaron', // EC to EF
+ 'dcroat', 'nacute', 'ncaron', 'oacute', // F0 to F3
+ 'ocircumflex', 'ohungarumlaut','odieresis', 'divide', // F4 to F7
+ 'rcaron', 'uring', 'uacute', 'uhungarumlaut', // F8 to FB
+ 'udieresis', 'yacute', 'tcommaaccent', 'dotaccent'); // FC to FF
+
+const
+ iso_8859_2_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 80 to 87
+ -1, -1, -1, -1, -1, -1, -1, -1, // 88 to 8F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 90 to 97
+ -1, -1, -1, -1, -1, -1, -1, -1, // 98 to 9F
+ 160, 260, 728, 321, 164, 317, 346, 167, // A0 to A7
+ 168, 352, 350, 356, 377, 173, 381, 379, // A8 to AF
+ 176, 261, 731, 322, 180, 318, 347, 711, // B0 to B7
+ 184, 353, 351, 357, 378, 733, 382, 380, // B8 to BF
+ 340, 193, 194, 258, 196, 313, 262, 199, // C0 to C7
+ 268, 201, 280, 203, 282, 205, 206, 270, // C8 to CF
+ 272, 323, 327, 211, 212, 336, 214, 215, // D0 to D7
+ 344, 366, 218, 368, 220, 221, 354, 223, // D8 to DF
+ 341, 225, 226, 259, 228, 314, 263, 231, // E0 to E7
+ 269, 233, 281, 235, 283, 237, 238, 271, // E8 to EF
+ 273, 324, 328, 243, 244, 337, 246, 247, // F0 to F7
+ 345, 367, 250, 369, 252, 253, 355, 729); // F8 to FF
+
+const
+ iso_8859_4_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 80 to 83
+ '.notdef', '.notdef', '.notdef', '.notdef', // 84 to 87
+ '.notdef', '.notdef', '.notdef', '.notdef', // 88 to 8B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 8C to 8F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 90 to 93
+ '.notdef', '.notdef', '.notdef', '.notdef', // 94 to 97
+ '.notdef', '.notdef', '.notdef', '.notdef', // 98 to 9B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 9C to 9F
+ 'space', 'Aogonek', 'kgreenlandic', 'Rcommaaccent', // A0 to A3
+ 'currency', 'Itilde', 'Lcommaaccent', 'section', // A4 to A7
+ 'dieresis', 'Scaron', 'Emacron', 'Gcommaaccent', // A8 to AB
+ 'Tbar', 'hyphen', 'Zcaron', 'macron', // AC to AF
+ 'degree', 'aogonek', 'ogonek', 'rcommaaccent', // B0 to B3
+ 'acute', 'itilde', 'lcommaaccent', 'caron', // B4 to B7
+ 'cedilla', 'scaron', 'emacron', 'gcommaaccent', // B8 to BB
+ 'tbar', 'Eng', 'zcaron', 'eng', // BC to BF
+ 'Amacron', 'Aacute', 'Acircumflex', 'Atilde', // C0 to C3
+ 'Adieresis', 'Aring', 'AE', 'Iogonek', // C4 to C7
+ 'Ccaron', 'Eacute', 'Eogonek', 'Edieresis', // C8 to CB
+ 'Edotaccent', 'Iacute', 'Icircumflex', 'Imacron', // CC to CF
+ 'Dcroat', 'Ncommaaccent', 'Omacron', 'Kcommaaccent', // D0 to D3
+ 'Ocircumflex', 'Otilde', 'Odieresis', 'multiply', // D4 to D7
+ 'Oslash', 'Uogonek', 'Uacute', 'Ucircumflex', // D8 to DB
+ 'Udieresis', 'Utilde', 'Umacron', 'germandbls', // DC to DF
+ 'amacron', 'aacute', 'acircumflex', 'atilde', // E0 to E3
+ 'adieresis', 'aring', 'ae', 'iogonek', // E4 to E7
+ 'ccaron', 'eacute', 'eogonek', 'edieresis', // E8 to EB
+ 'edotaccent', 'iacute', 'icircumflex', 'imacron', // EC to EF
+ 'dcroat', 'ncommaaccent', 'omacron', 'kcommaaccent', // F0 to F3
+ 'ocircumflex', 'otilde', 'odieresis', 'divide', // F4 to F7
+ 'oslash', 'uogonek', 'uacute', 'ucircumflex', // F8 to FB
+ 'udieresis', 'utilde', 'umacron', 'dotaccent'); // FC to FF
+
+const
+ iso_8859_4_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 80 to 87
+ -1, -1, -1, -1, -1, -1, -1, -1, // 88 to 8F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 90 to 97
+ -1, -1, -1, -1, -1, -1, -1, -1, // 98 to 9F
+ 160, 260, 312, 342, 164, 296, 315, 167, // A4 to A7
+ 168, 352, 274, 290, 358, 173, 381, 175, // AC to AF
+ 176, 261, 731, 343, 180, 297, 316, 711, // B4 to B7
+ 184, 353, 275, 291, 359, 330, 382, 331, // BC to BF
+ 256, 193, 194, 195, 196, 197, 198, 302, // C4 to C7
+ 268, 201, 280, 203, 278, 205, 206, 298, // CC to CF
+ 272, 325, 332, 310, 212, 213, 214, 215, // D4 to D7
+ 216, 370, 218, 219, 220, 360, 362, 223, // DC to DF
+ 257, 225, 226, 227, 228, 229, 230, 303, // E4 to E7
+ 269, 233, 281, 235, 279, 237, 238, 299, // EC to EF
+ 273, 326, 333, 311, 244, 245, 246, 247, // F4 to F7
+ 248, 371, 250, 251, 252, 361, 363, 729); // FC to FF
+
+const
+ iso_8859_5_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum','underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 80 to 83
+ '.notdef', '.notdef', '.notdef', '.notdef', // 84 to 87
+ '.notdef', '.notdef', '.notdef', '.notdef', // 88 to 8B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 8C to 8F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 90 to 93
+ '.notdef', '.notdef', '.notdef', '.notdef', // 94 to 97
+ '.notdef', '.notdef', '.notdef', '.notdef', // 98 to 9B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 9C to 9F
+ 'space', 'afii10023', 'afii10051', 'afii10052', // A0 to A3
+ 'afii10053', 'afii10054', 'afii10055', 'afii10056', // A4 to A7
+ 'afii10057', 'afii10058', 'afii10059', 'afii10060', // A8 to AB
+ 'afii10061', 'hyphen', 'afii10062', 'afii10145', // AC to AF
+ 'afii10017', 'afii10018', 'afii10019', 'afii10020', // B0 to B3
+ 'afii10021', 'afii10022', 'afii10024', 'afii10025', // B4 to B7
+ 'afii10026', 'afii10027', 'afii10028', 'afii10029', // B8 to BB
+ 'afii10030', 'afii10031', 'afii10032', 'afii10033', // BC to BF
+ 'afii10034', 'afii10035', 'afii10036', 'afii10037', // C0 to C3
+ 'afii10038', 'afii10039', 'afii10040', 'afii10041', // C4 to C7
+ 'afii10042', 'afii10043', 'afii10044', 'afii10045', // C8 to CB
+ 'afii10046', 'afii10047', 'afii10048', 'afii10049', // CC to CF
+ 'afii10065', 'afii10065', 'afii10067', 'afii10068', // D0 to D3
+ 'afii10069', 'afii10070', 'afii10072', 'afii10073', // D4 to D7
+ 'afii10074', 'afii10075', 'afii10076', 'afii10077', // D8 to DB
+ 'afii10078', 'afii10079', 'afii10080', 'afii10081', // DC to DF
+ 'afii10082', 'afii10083', 'afii10084', 'afii10085', // E0 to E3
+ 'afii10086', 'afii10087', 'afii10088', 'afii10089', // E4 to E7
+ 'afii10090', 'afii10091', 'afii10092', 'afii10093', // E8 to EB
+ 'afii10094', 'afii10095', 'afii10096', 'afii10097', // EC to EF
+ 'afii61352', 'afii10071', 'afii10099', 'afii10100', // F0 to F3
+ 'afii10101', 'afii10102', 'afii10103', 'afii10104', // F4 to F7
+ 'afii10105', 'afii10106', 'afii10107', 'afii10108', // F8 to FB
+ 'afii10109', 'section', 'afii10110', 'afii10193'); // FC to FF
+
+const
+ iso_8859_5_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 80 to 87
+ -1, -1, -1, -1, -1, -1, -1, -1, // 88 to 8F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 90 to 97
+ -1, -1, -1, -1, -1, -1, -1, -1, // 98 to 9F
+ 160, 1025, 1026, 1027, 1028, 1029, 1030, 1031, // A0 to A7
+ 1032, 1033, 1034, 1035, 1036, 173, 1038, 1039, // A8 to AF
+ 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, // B0 to B7
+ 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, // B8 to BF
+ 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, // C0 to C7
+ 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, // C8 to CF
+ 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, // D0 to D7
+ 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, // D8 to DF
+ 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, // E0 to E7
+ 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, // E8 to EF
+ 8470, 1105, 1106, 1107, 1108, 1109, 1110, 1111, // F0 to F7
+ 1112, 1113, 1114, 1115, 1116, 167, 1118, 1119); // F8 to FF
+
+const
+ iso_8859_7_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 80 to 83
+ '.notdef', '.notdef', '.notdef', '.notdef', // 84 to 87
+ '.notdef', '.notdef', '.notdef', '.notdef', // 88 to 8B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 8C to 8F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 90 to 93
+ '.notdef', '.notdef', '.notdef', '.notdef', // 94 to 97
+ '.notdef', '.notdef', '.notdef', '.notdef', // 98 to 9B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 9C to 9F
+ 'space', 'quoteleft', 'quoteright', 'sterling', // A0 to A3
+ 'brokenbar', 'section', 'dieresis', 'copyright', // A4 to A7
+ 'guillemotleft', 'logicalnot', 'hyphen', 'afii00208', // A8 to AB
+ 'degree', 'plusminus', 'twosuperior', 'threesuperior', // AC to AF
+ 'tonos', 'dieresistonos','Alphatonos', 'periodcentered', // B0 to B3
+ 'Epsilontonos', 'Etatonos', 'Iotatonos', 'guillemotright', // B4 to B7
+ 'Omicrontonos', 'onehalf', 'Upsilontonos', 'Omegatonos', // B8 to BB
+ 'iotadieresistonos', 'Alpha', 'Beta', 'Gamma', // BC to BF
+ 'Delta', 'Epsilon', 'Zeta', 'Eta', // C0 to C3
+ 'Theta', 'Iota', 'Kappa', 'Lambda', // C4 to C7
+ 'Mu', 'Nu', 'Xi', 'Omicron', // C8 to CB
+ 'Pi', 'Rho', 'Sigma', 'Tau', // CC to CF
+ 'Upsilon', 'Phi', 'Chi', 'Psi', // D0 to D3
+ 'Omega', 'Iotadieresis', 'Upsilondieresis','alphatonos', // D4 to D7
+ 'epsilontonos', 'etatonos', 'iotatonos', 'upsilondieresistonos', // D8 to DB
+ 'alpha', 'beta', 'gamma', 'delta', // DC to DF
+ 'epsilon', 'zeta', 'eta', 'theta', // E0 to E3
+ 'iota', 'kappa', 'lambda', 'mu', // E4 to E7
+ 'nu', 'xi', 'omicron', 'pi', // E8 to EB
+ 'rho', 'sigma1', 'sigma', 'tau', // EC to EF
+ 'upsilon', 'phi', 'chi', 'psi', // F0 to F3
+ 'omega', 'iotadieresis', 'upsilondieresis','omicrontonos', // F4 to F7
+ 'upsilontonos', 'omegatonos', '.notdef', '.notdef', // F8 to FB
+ '.notdef', '.notdef', '.notdef', '.notdef'); // FC to FF
+
+const
+ iso_8859_7_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 80 to 87
+ -1, -1, -1, -1, -1, -1, -1, -1, // 88 to 8F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 90 to 97
+ -1, -1, -1, -1, -1, -1, -1, -1, // 98 to 9F
+ 160, 8216, 8217, 163, 166, 167, 168, 169, // A0 to A7
+ 171, 172, 173, 8213, 176, 177, 178, 179, // A8 to AF
+ 900, 901, 902, 183, 904, 905, 906, 187, // B0 to B7
+ 908, 189, 910, 911, 912, 913, 914, 915, // B8 to BF
+ 916, 917, 918, 919, 920, 921, 922, 923, // C0 to C7
+ 924, 925, 926, 927, 928, 929, 931, 932, // C8 to CF
+ 933, 934, 935, 936, 937, 938, 939, 940, // D0 to D7
+ 941, 942, 943, 944, 945, 946, 947, 948, // D8 to DF
+ 949, 950, 951, 952, 953, 954, 955, 956, // E0 to E7
+ 957, 958, 959, 960, 961, 962, 963, 964, // E8 to EF
+ 965, 966, 967, 968, 969, 970, 971, 972, // F0 to F7
+ 973, 974, -1, -1, -1, -1, -1, -1); // F8 to FF
+
+const
+ iso_8859_9_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 80 to 83
+ '.notdef', '.notdef', '.notdef', '.notdef', // 84 to 87
+ '.notdef', '.notdef', '.notdef', '.notdef', // 88 to 8B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 8C to 8F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 90 to 93
+ '.notdef', '.notdef', '.notdef', '.notdef', // 94 to 97
+ '.notdef', '.notdef', '.notdef', '.notdef', // 98 to 9B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 9C to 9F
+ 'space', 'exclamdown', 'cent', 'sterling', // A0 to A3
+ 'currency', 'yen', 'brokenbar', 'section', // A4 to A7
+ 'dieresis', 'copyright', 'ordfeminine', 'guillemotleft', // A8 to AB
+ 'logicalnot', 'hyphen', 'registered', 'macron', // AC to AF
+ 'degree', 'plusminus', 'twosuperior', 'threesuperior', // B0 to B3
+ 'acute', 'mu', 'paragraph', 'periodcentered', // B4 to B7
+ 'cedilla', 'onesuperior', 'ordmasculine', 'guillemotright', // B8 to BB
+ 'onequarter', 'onehalf', 'threequarters','questiondown', // BC to BF
+ 'Agrave', 'Aacute', 'Acircumflex', 'Atilde', // C0 to C3
+ 'Adieresis', 'Aring', 'AE', 'Ccedilla', // C4 to C7
+ 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis', // C8 to CB
+ 'Igrave', 'Iacute', 'Icircumflex', 'Idieresis', // CC to CF
+ 'Gbreve', 'Ntilde', 'Ograve', 'Oacute', // D0 to D3
+ 'Ocircumflex', 'Otilde', 'Odieresis', 'multiply', // D4 to D7
+ 'Oslash', 'Ugrave', 'Uacute', 'Ucircumflex', // D8 to DB
+ 'Udieresis', 'Idotaccent', 'Scedilla', 'germandbls', // DC to DF
+ 'agrave', 'aacute', 'acircumflex', 'atilde', // E0 to E3
+ 'adieresis', 'aring', 'ae', 'ccedilla', // E4 to E7
+ 'egrave', 'eacute', 'ecircumflex', 'edieresis', // E8 to EB
+ 'igrave', 'iacute', 'icircumflex', 'idieresis', // EC to EF
+ 'gbreve', 'ntilde', 'ograve', 'oacute', // F0 to F3
+ 'ocircumflex', 'otilde', 'odieresis', 'divide', // F4 to F7
+ 'oslash', 'ugrave', 'uacute', 'ucircumflex', // F8 to FB
+ 'udieresis', 'dotlessi', 'scedilla', 'ydieresis'); // FC to FF
+
+const
+ iso_8859_9_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 80 to 87
+ -1, -1, -1, -1, -1, -1, -1, -1, // 88 to 8F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 90 to 97
+ -1, -1, -1, -1, -1, -1, -1, -1, // 98 to 9F
+ 160, 161, 162, 163, 164, 165, 166, 167, // A0 to A7
+ 168, 169, 170, 171, 172, 173, 174, 175, // A8 to AF
+ 176, 177, 178, 179, 180, 181, 182, 183, // B0 to B7
+ 184, 185, 186, 187, 188, 189, 190, 191, // B8 to BF
+ 192, 193, 194, 195, 196, 197, 198, 199, // C0 to C7
+ 200, 201, 202, 203, 204, 205, 206, 207, // C8 to CF
+ 286, 209, 210, 211, 212, 213, 214, 215, // D0 to D7
+ 216, 217, 218, 219, 220, 304, 350, 223, // D8 to DF
+ 224, 225, 226, 227, 228, 229, 230, 231, // E0 to E7
+ 232, 233, 234, 235, 236, 237, 238, 239, // E8 to EF
+ 287, 241, 242, 243, 244, 245, 246, 247, // F0 to F7
+ 248, 249, 250, 251, 252, 305, 351, 255); // F8 to FF
+
+const
+ iso_8859_11_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 80 to 83
+ '.notdef', '.notdef', '.notdef', '.notdef', // 84 to 87
+ '.notdef', '.notdef', '.notdef', '.notdef', // 88 to 8B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 8C to 8F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 90 to 93
+ '.notdef', '.notdef', '.notdef', '.notdef', // 94 to 97
+ '.notdef', '.notdef', '.notdef', '.notdef', // 98 to 9B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 9C to 9F
+ 'space', 'kokaithai', 'khokhaithai', 'khokhuatthai', // A0 to A3
+ 'khokhwaithai', 'khokhonthai', 'khorakhangthai', 'ngonguthai', // A4 to A7
+ 'chochanthai', 'chochingthai', 'chochangthai', 'sosothai', // A8 to AB
+ 'chochoethai', 'yoyingthai', 'dochadathai', 'topatakthai', // AC to AF
+ 'thothanthai', 'thonangmonthothai','thophuthaothai', 'nonenthai', // B0 to B3
+ 'dodekthai', 'totaothai', 'thothungthai', 'thothahanthai', // B4 to B7
+ 'thothongthai', 'nonuthai', 'bobaimaithai', 'poplathai', // B8 to BB
+ 'phophungthai', 'fofathai', 'phophanthai', 'fofanthai', // BC to BF
+ 'phosamphaothai', 'momathai', 'yoyakthai', 'roruathai', // C0 to C3
+ 'ruthai', 'lolingthai', 'luthai', 'wowaenthai', // C4 to C7
+ 'sosalathai', 'sorusithai', 'sosuathai', 'hohipthai', // C8 to CB
+ 'lochulathai', 'oangthai', 'honokhukthai', 'paiyannoithai', // CC to CF
+ 'saraathai', 'maihanakatthai', 'saraaathai', 'saraamthai', // D0 to D3
+ 'saraithai', 'saraiithai', 'sarauethai', 'saraueethai', // D4 to D7
+ 'sarauthai', 'sarauuthai', 'phinthuthai', '.notdef', // D8 to DB
+ '.notdef', '.notdef', '.notdef', 'bahtthai', // DC to DF
+ 'saraethai', 'saraaethai', 'saraothai', 'saraaimaimuanthai', // E0 to E3
+ 'saraaimaimalaithai','lakkhangyaothai', 'maiyamokthai', 'maitaikhuthai', // E4 to E7
+ 'maiekthai', 'maithothai', 'maitrithai', 'maichattawathai', // E8 to EB
+ 'thanthakhatthai', 'nikhahitthai', 'yamakkanthai', 'fongmanthai', // EC to EF
+ 'zerothai', 'onethai', 'twothai', 'threethai', // F0 to F3
+ 'fourthai', 'fivethai', 'sixthai', 'seventhai', // F4 to F7
+ 'eightthai', 'ninethai', 'angkhankhuthai', 'khomutthai', // F8 to FB
+ '.notdef', '.notdef', '.notdef', '.notdef'); // FC to FF
+
+const
+ iso_8859_11_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 80 to 87
+ -1, -1, -1, -1, -1, -1, -1, -1, // 88 to 8F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 90 to 97
+ -1, -1, -1, -1, -1, -1, -1, -1, // 98 to 9F
+ 160, 3585, 3586, 3587, 3588, 3589, 3590, 3591, // A0 to A7
+ 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, // A8 to AF
+ 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, // B0 to B7
+ 3608, 3609, 3610, 3611, 3612, 3613, 3614, 3615, // B8 to BF
+ 3616, 3617, 3618, 3619, 3620, 3621, 3622, 3623, // C0 to C7
+ 3624, 3625, 3626, 3627, 3628, 3629, 3630, 3631, // C8 to CF
+ 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, // D0 to D7
+ 3640, 3641, 3642, -1, -1, -1, -1, 3647, // D8 to DF
+ 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655, // E0 to E7
+ 3656, 3657, 3658, 3659, 3660, 3661, 3662, 3663, // E8 to EF
+ 3664, 3665, 3666, 3667, 3668, 3669, 3670, 3671, // F0 to F7
+ 3672, 3673, 3674, 3675, -1, -1, -1, -1); // F8 to FF
+
+const
+ iso_8859_15_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 80 to 83
+ '.notdef', '.notdef', '.notdef', '.notdef', // 84 to 87
+ '.notdef', '.notdef', '.notdef', '.notdef', // 88 to 8B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 8C to 8F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 90 to 93
+ '.notdef', '.notdef', '.notdef', '.notdef', // 94 to 97
+ '.notdef', '.notdef', '.notdef', '.notdef', // 98 to 9B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 9C to 9F
+ 'space', 'exclamdown', 'cent', 'sterling', // A0 to A3
+ 'Euro', 'yen', 'Scaron', 'section', // A4 to A7
+ 'scaron', 'copyright', 'ordfeminine', 'guillemotleft', // A8 to AB
+ 'logicalnot', 'hyphen', 'registered', 'macron', // AC to AF
+ 'degree', 'plusminus', 'twosuperior', 'threesuperior', // B0 to B3
+ 'Zcaron', 'mu', 'paragraph', 'periodcentered', // B4 to B7
+ 'zcaron', 'onesuperior', 'ordmasculine', 'guillemotright', // B8 to BB
+ 'OE', 'oe', 'Ydieresis', 'questiondown', // BC to BF
+ 'Agrave', 'Aacute', 'Acircumflex', 'Atilde', // C0 to C3
+ 'Adieresis', 'Aring', 'AE', 'Ccedilla', // C4 to C7
+ 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis', // C8 to CB
+ 'Igrave', 'Iacute', 'Icircumflex', 'Idieresis', // CC to CF
+ 'Eth', 'Ntilde', 'Ograve', 'Oacute', // D0 to D3
+ 'Ocircumflex', 'Otilde', 'Odieresis', 'multiply', // D4 to D7
+ 'Oslash', 'Ugrave', 'Uacute', 'Ucircumflex', // D8 to DB
+ 'Udieresis', 'Yacute', 'Thorn', 'germandbls', // DC to DF
+ 'agrave', 'aacute', 'acircumflex', 'atilde', // E0 to E3
+ 'adieresis', 'aring', 'ae', 'ccedilla', // E4 to E7
+ 'egrave', 'eacute', 'ecircumflex', 'edieresis', // E8 to EB
+ 'igrave', 'iacute', 'icircumflex', 'idieresis', // EC to EF
+ 'eth', 'ntilde', 'ograve', 'oacute', // F0 to F3
+ 'ocircumflex', 'otilde', 'odieresis', 'divide', // F4 to F7
+ 'oslash', 'ugrave', 'uacute', 'ucircumflex', // F8 to FB
+ 'udieresis', 'yacute', 'thorn', 'ydieresis'); // FC to FF
+
+const
+ iso_8859_15_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 80 to 87
+ -1, -1, -1, -1, -1, -1, -1, -1, // 88 to 8F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 90 to 97
+ -1, -1, -1, -1, -1, -1, -1, -1, // 98 to 9F
+ 160, 161, 162, 163, 8364, 165, 352, 167, // A0 to A7
+ 353, 169, 170, 171, 172, 173, 174, 175, // A8 to AF
+ 176, 177, 178, 179, 381, 181, 182, 183, // B0 to B7
+ 382, 185, 186, 187, 338, 339, 376, 191, // B8 to BF
+ 192, 193, 194, 195, 196, 197, 198, 199, // C0 to C7
+ 200, 201, 202, 203, 204, 205, 206, 207, // C8 to CF
+ 208, 209, 210, 211, 212, 213, 214, 215, // D0 to D7
+ 216, 217, 218, 219, 220, 221, 222, 223, // D8 to DF
+ 224, 225, 226, 227, 228, 229, 230, 231, // E0 to E7
+ 232, 233, 234, 235, 236, 237, 238, 239, // E8 to EF
+ 240, 241, 242, 243, 244, 245, 246, 247, // F0 to F7
+ 248, 249, 250, 251, 252, 253, 254, 255); // F8 to FF
+
+const
+ iso_8859_16_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 80 to 83
+ '.notdef', '.notdef', '.notdef', '.notdef', // 84 to 87
+ '.notdef', '.notdef', '.notdef', '.notdef', // 88 to 8B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 8C to 8F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 90 to 93
+ '.notdef', '.notdef', '.notdef', '.notdef', // 94 to 97
+ '.notdef', '.notdef', '.notdef', '.notdef', // 98 to 9B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 9C to 9F
+ 'space', 'Aogonek', 'aogonek', 'Lslash', // A0 to A3
+ 'Euro', 'quotedblbase', 'Scaron', 'section', // A4 to A7
+ 'scaron', 'copyright', 'Scommaaccent', 'guillemotleft', // A8 to AB
+ 'Zacute', 'hyphen', 'zacute', 'Zdotaccent', // AC to AF
+ 'degree', 'plusminus', 'Ccaron', 'lslash', // B0 to B3
+ 'Zcaron', 'quotedblright','paragraph', 'periodcentered', // B4 to B7
+ 'zcaron', 'ccaron', 'scommaaccent', 'guillemotright', // B8 to BB
+ 'OE', 'oe', 'Ydieresis', 'zdotaccent', // BC to BF
+ 'Agrave', 'Aacute', 'Acircumflex', 'Abreve', // C0 to C3
+ 'Adieresis', 'Cacute', 'AE', 'Ccedilla', // C4 to C7
+ 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis', // C8 to CB
+ 'Igrave', 'Iacute', 'Icircumflex', 'Idieresis', // CC to CF
+ 'Dcroat', 'Nacute', 'Ograve', 'Oacute', // D0 to D3
+ 'Ocircumflex', 'Ohungarumlaut','Odieresis', 'Sacute', // D4 to D7
+ 'Uhungarumlaut', 'Ugrave', 'Uacute', 'Ucircumflex', // D8 to DB
+ 'Udieresis', 'Eogonek', 'Tcommaaccent', 'germandbls', // DC to DF
+ 'agrave', 'aacute', 'acircumflex', 'abreve', // E0 to E3
+ 'adieresis', 'cacute', 'ae', 'ccedilla', // E4 to E7
+ 'egrave', 'eacute', 'ecircumflex', 'edieresis', // E8 to EB
+ 'igrave', 'iacute', 'icircumflex', 'idieresis', // EC to EF
+ 'dcroat', 'nacute', 'ograve', 'oacute', // F0 to F3
+ 'ocircumflex', 'ohungarumlaut','odieresis', 'sacute', // F4 to F7
+ 'uhungarumlaut', 'ugrave', 'uacute', 'ucircumflex', // F8 to FB
+ 'udieresis', 'eogonek', 'tcommaaccent', 'ydieresis'); // FC to FF
+
+const
+ iso_8859_16_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 80 to 87
+ -1, -1, -1, -1, -1, -1, -1, -1, // 88 to 8F
+ -1, -1, -1, -1, -1, -1, -1, -1, // 90 to 97
+ -1, -1, -1, -1, -1, -1, -1, -1, // 98 to 9F
+ 160, 260, 261, 321, 8364, 8222, 352, 167, // A0 to A7
+ 353, 169, 536, 171, 377, 173, 378, 379, // A8 to AF
+ 176, 177, 268, 322, 381, 8221, 182, 183, // B0 to B7
+ 382, 269, 537, 187, 338, 339, 376, 380, // B8 to BF
+ 192, 193, 194, 258, 196, 262, 198, 199, // C0 to C7
+ 200, 201, 202, 203, 204, 205, 206, 207, // C8 to CF
+ 272, 323, 210, 211, 212, 336, 214, 346, // D0 to D7
+ 368, 217, 218, 219, 220, 280, 538, 223, // D8 to DF
+ 224, 225, 226, 259, 228, 263, 230, 231, // E0 to E7
+ 232, 233, 234, 235, 236, 237, 238, 239, // E8 to EF
+ 273, 324, 242, 243, 244, 337, 246, 347, // F0 to F7
+ 369, 249, 250, 251, 252, 281, 539, 255); // F8 to FF
+
+const
+ koi8_r_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ 'SF100000', 'SF110000', 'SF010000', 'SF030000', // 80 to 83
+ 'SF020000', 'SF040000', 'SF080000', 'SF090000', // 84 to 87
+ 'SF060000', 'SF070000', 'SF050000', 'upblock', // 88 to 8B
+ 'dnblock', 'block', 'lfblock', 'rtblock', // 8C to 8F
+ 'ltshade', 'shade', 'dkshade', 'integraltp', // 90 to 93
+ 'filledbox', 'periodcentered', 'radical', 'approxequal', // 94 to 97
+ 'lessequal', 'greaterequal', 'space', 'integralbt', // 98 to 9B
+ 'degree', 'twosuperior', 'periodcentered', 'divide', // 9C to 9F
+ 'SF430000', 'SF240000', 'SF510000', 'afii10071', // A0 to A3
+ 'SF520000', 'SF390000', 'SF220000', 'SF210000', // A4 to A7
+ 'SF250000', 'SF500000', 'SF490000', 'SF380000', // A8 to AB
+ 'SF280000', 'SF270000', 'SF260000', 'SF360000', // AC to AF
+ 'SF370000', 'SF420000', 'SF190000', 'afii10023', // B0 to B3
+ 'SF200000', 'SF230000', 'SF470000', 'SF480000', // B4 to B7
+ 'SF410000', 'SF450000', 'SF460000', 'SF400000', // B8 to BB
+ 'SF540000', 'SF530000', 'SF440000', 'copyright', // BC to BF
+ 'afii10096', 'afii10065', 'afii10066', 'afii10088', // C0 to C3
+ 'afii10069', 'afii10070', 'afii10086', 'afii10068', // C4 to C7
+ 'afii10087', 'afii10074', 'afii10075', 'afii10076', // C8 to CB
+ 'afii10077', 'afii10078', 'afii10079', 'afii10080', // CC to CF
+ 'afii10081', 'afii10097', 'afii10082', 'afii10083', // D0 to D3
+ 'afii10084', 'afii10085', 'afii10072', 'afii10067', // D4 to D7
+ 'afii10094', 'afii10093', 'afii10073', 'afii10090', // D8 to DB
+ 'afii10095', 'afii10091', 'afii10089', 'afii10092', // DC to DF
+ 'afii10048', 'afii10017', 'afii10018', 'afii10040', // E0 to E3
+ 'afii10021', 'afii10022', 'afii10038', 'afii10020', // E4 to E7
+ 'afii10039', 'afii10026', 'afii10027', 'afii10028', // E8 to EB
+ 'afii10029', 'afii10030', 'afii10031', 'afii10032', // EC to EF
+ 'afii10033', 'afii10049', 'afii10034', 'afii10035', // F0 to F3
+ 'afii10036', 'afii10037', 'afii10024', 'afii10019', // F4 to F7
+ 'afii10046', 'afii10045', 'afii10025', 'afii10042', // F8 to FB
+ 'afii10047', 'afii10043', 'afii10041', 'afii10044'); // FC to FF
+
+const
+ koi8_r_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, // 80 to 87
+ 9516, 9524, 9532, 9600, 9604, 9608, 9612, 9616, // 88 to 8F
+ 9617, 9618, 9619, 8992, 9632, 8729, 8730, 8776, // 90 to 97
+ 8804, 8805, 160, 8993, 176, 178, 183, 247, // 98 to 9F
+ 9552, 9553, 9554, 1105, 9555, 9556, 9557, 9558, // A0 to A7
+ 9559, 9560, 9561, 9562, 9563, 9564, 9565, 9566, // A8 to AF
+ 9567, 9568, 9569, 1025, 9570, 9571, 9572, 9573, // B0 to B7
+ 9574, 9575, 9576, 9577, 9578, 9579, 9580, 169, // B8 to BF
+ 1102, 1072, 1073, 1094, 1076, 1077, 1092, 1075, // C0 to C7
+ 1093, 1080, 1081, 1082, 1083, 1084, 1085, 1086, // C8 to CF
+ 1087, 1103, 1088, 1089, 1090, 1091, 1078, 1074, // D0 to D7
+ 100, 1099, 1079, 1096, 1101, 1097, 1095, 1098, // D8 to DF
+ 1070, 1040, 1041, 1062, 1044, 1045, 1060, 1043, // E0 to E7
+ 1061, 1048, 1049, 1050, 1051, 1052, 1053, 1054, // E8 to EF
+ 1055, 1071, 1056, 1057, 1058, 1059, 1046, 1042, // F0 to F7
+ 1068, 1067, 1047, 1064, 1069, 1065, 1063, 1066); // F8 to FF
+
+const
+ koi8_u_n: array[0..255] of string =
+ ('.notdef', '.notdef', '.notdef', '.notdef', // 00 to 03
+ '.notdef', '.notdef', '.notdef', '.notdef', // 04 to 07
+ '.notdef', '.notdef', '.notdef', '.notdef', // 08 to 0B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 0C to 0F
+ '.notdef', '.notdef', '.notdef', '.notdef', // 10 to 13
+ '.notdef', '.notdef', '.notdef', '.notdef', // 14 to 17
+ '.notdef', '.notdef', '.notdef', '.notdef', // 18 to 1B
+ '.notdef', '.notdef', '.notdef', '.notdef', // 1C to 1F
+ 'space', 'exclam', 'quotedbl', 'numbersign', // 20 to 23
+ 'dollar', 'percent', 'ampersand', 'quotesingle', // 24 to 27
+ 'parenleft', 'parenright', 'asterisk', 'plus', // 28 to 2B
+ 'comma', 'hyphen', 'period', 'slash', // 2C to 2F
+ 'zero', 'one', 'two', 'three', // 30 to 33
+ 'four', 'five', 'six', 'seven', // 34 to 37
+ 'eight', 'nine', 'colon', 'semicolon', // 38 to 3B
+ 'less', 'equal', 'greater', 'question', // 3C to 3F
+ 'at', 'A', 'B', 'C', // 40 to 43
+ 'D', 'E', 'F', 'G', // 44 to 47
+ 'H', 'I', 'J', 'K', // 48 to 4B
+ 'L', 'M', 'N', 'O', // 4C to 4F
+ 'P', 'Q', 'R', 'S', // 50 to 53
+ 'T', 'U', 'V', 'W', // 54 to 57
+ 'X', 'Y', 'Z', 'bracketleft', // 58 to 5B
+ 'backslash', 'bracketright', 'asciicircum', 'underscore', // 5C to 5F
+ 'grave', 'a', 'b', 'c', // 60 to 63
+ 'd', 'e', 'f', 'g', // 64 to 67
+ 'h', 'i', 'j', 'k', // 68 to 6B
+ 'l', 'm', 'n', 'o', // 6C to 6F
+ 'p', 'q', 'r', 's', // 70 to 73
+ 't', 'u', 'v', 'w', // 74 to 77
+ 'x', 'y', 'z', 'braceleft', // 78 to 7B
+ 'bar', 'braceright', 'asciitilde', '.notdef', // 7C to 7F
+ 'SF100000', 'SF110000', 'SF010000', 'SF030000', // 80 to 83
+ 'SF020000', 'SF040000', 'SF080000', 'SF090000', // 84 to 87
+ 'SF060000', 'SF070000', 'SF050000', 'upblock', // 88 to 8B
+ 'dnblock', 'block', 'lfblock', 'rtblock', // 8C to 8F
+ 'ltshade', 'shade', 'dkshade', 'integraltp', // 90 to 93
+ 'filledbox', 'bullet', 'radical', 'approxequal', // 94 to 97
+ 'lessequal', 'greaterequal', 'space', 'integralbt', // 98 to 9B
+ 'degree', 'twosuperior', 'periodcentered', 'divide', // 9C to 9F
+ 'SF430000', 'SF240000', 'SF510000', 'afii10071', // A0 to A3
+ 'afii10101', 'SF390000', 'afii10103', 'afii10104', // A4 to A7
+ 'SF250000', 'SF500000', 'SF490000', 'SF380000', // A8 to AB
+ 'SF280000', 'afii10098', 'SF260000', 'SF360000', // AC to AF
+ 'SF370000', 'SF420000', 'SF190000', 'afii10023', // B0 to B3
+ 'afii10053', 'SF230000', 'afii10055', 'afii10056', // B4 to B7
+ 'SF410000', 'SF450000', 'SF460000', 'SF400000', // B8 to BB
+ 'SF540000', 'afii10050', 'SF440000', 'copyright', // BC to BF
+ 'afii10096', 'afii10065', 'afii10066', 'afii10088', // C0 to C3
+ 'afii10069', 'afii10070', 'afii10086', 'afii10068', // C4 to C7
+ 'afii10087', 'afii10074', 'afii10075', 'afii10076', // C8 to CB
+ 'afii10077', 'afii10078', 'afii10079', 'afii10080', // CC to CF
+ 'afii10081', 'afii10097', 'afii10082', 'afii10083', // D0 to D3
+ 'afii10084', 'afii10085', 'afii10072', 'afii10067', // D4 to D7
+ 'afii10094', 'afii10093', 'afii10073', 'afii10090', // D8 to DB
+ 'afii10095', 'afii10091', 'afii10089', 'afii10092', // DC to DF
+ 'afii10048', 'afii10017', 'afii10018', 'afii10040', // E0 to E3
+ 'afii10021', 'afii10022', 'afii10038', 'afii10020', // E4 to E7
+ 'afii10039', 'afii10026', 'afii10027', 'afii10028', // E8 to EB
+ 'afii10029', 'afii10030', 'afii10031', 'afii10032', // EC to EF
+ 'afii10033', 'afii10049', 'afii10034', 'afii10035', // F0 to F3
+ 'afii10036', 'afii10037', 'afii10024', 'afii10019', // F4 to F7
+ 'afii10046', 'afii10045', 'afii10025', 'afii10042', // F8 to FB
+ 'afii10047', 'afii10043', 'afii10041', 'afii10044'); // FC to FF
+
+const
+ koi8_u_v: array[0..255] of Word =
+ (0, 1, 2, 3, 4, 5, 6, 7, // 00 to 07
+ 8, 9, 10, 11, 12, 13, 14, 15, // 08 to 0F
+ 16, 17, 18, 19, 20, 21, 22, 23, // 10 to 17
+ 24, 25, 26, 27, 28, 29, 30, 31, // 18 to 1F
+ 32, 33, 34, 35, 36, 37, 38, 39, // 20 to 27
+ 40, 41, 42, 43, 44, 45, 46, 47, // 28 to 2F
+ 48, 49, 50, 51, 52, 53, 54, 55, // 30 to 37
+ 56, 57, 58, 59, 60, 61, 62, 63, // 38 to 3F
+ 64, 65, 66, 67, 68, 69, 70, 71, // 40 to 47
+ 72, 73, 74, 75, 76, 77, 78, 79, // 48 to 4F
+ 80, 81, 82, 83, 84, 85, 86, 87, // 50 to 57
+ 88, 89, 90, 91, 92, 93, 94, 95, // 58 to 5F
+ 96, 97, 98, 99, 100, 101, 102, 103, // 60 to 67
+ 104, 105, 106, 107, 108, 109, 110, 111, // 68 to 6F
+ 112, 113, 114, 115, 116, 117, 118, 119, // 70 to 77
+ 120, 121, 122, 123, 124, 125, 126, 127, // 78 to 7F
+ 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, // 80 to 87
+ 9516, 9524, 9532, 9600, 9604, 9608, 9612, 9616, // 88 to 8F
+ 9617, 9618, 9619, 8992, 9632, 8226, 8730, 8776, // 90 to 97
+ 8804, 8805, 160, 8993, 176, 178, 183, 247, // 98 to 9F
+ 9552, 9553, 9554, 1105, 1108, 9556, 1110, 1111, // A0 to A7
+ 9559, 9560, 9561, 9562, 9563, 1169, 9565, 9566, // A8 to AF
+ 9567, 9568, 9569, 1025, 1028, 9571, 1030, 1031, // B0 to B7
+ 9574, 9575, 9576, 9577, 9578, 1168, 9580, 169, // B8 to BF
+ 1102, 1072, 1073, 1094, 1076, 1077, 1092, 1075, // C0 to C7
+ 1093, 1080, 1081, 1082, 1083, 1084, 1085, 1086, // C8 to CF
+ 1087, 1103, 1088, 1089, 1090, 1091, 1078, 1074, // D0 to D7
+ 1100, 1099, 1079, 1096, 1101, 1097, 1095, 1098, // D8 to DF
+ 1070, 1040, 1041, 1062, 1044, 1045, 1060, 1043, // E0 to E7
+ 1061, 1048, 1049, 1050, 1051, 1052, 1053, 1054, // E8 to EF
+ 1055, 1071, 1056, 1057, 1058, 1059, 1046, 1042, // F0 to F7
+ 1068, 1067, 1047, 1064, 1069, 1065, 1063, 1066); // F8 to FF
+
+implementation
+
+end.
+
diff --git a/tools/makefont/u_main.pas b/tools/makefont/u_main.pas
new file mode 100644
index 00000000..677173e1
--- /dev/null
+++ b/tools/makefont/u_main.pas
@@ -0,0 +1,120 @@
+unit u_main;
+
+{$mode objfpc}
+
+interface
+
+uses
+ Classes, SysUtils, Dos,
+ fpg_main, fpg_base,
+ fpg_form, fpg_button, fpg_label, fpg_dialogs, fpg_combobox;
+
+type
+ TF_MainForm= class(TfpgForm)
+ private
+ L_SelectMap: Tfpglabel;
+ Cb_SelectMap: TfpgComboBox;
+ Bt_SelectFile: TfpgButton;
+ Bt_Exit: TfpgButton;
+ procedure Bt_SelectFileClick(Sender: TObject);
+ procedure Bt_ExitClick(Sender: TObject);
+ public
+ constructor Create(AOwner: TComponent); override;
+ end;
+
+var
+ F_MainForm: TF_MainForm;
+
+implementation
+
+uses
+ u_Parsettf;
+
+var
+ MapList: TStringList;
+
+procedure TF_MainForm.Bt_SelectFileClick(Sender: TObject);
+var
+ FileDlg: TfpgFileDialog;
+ Fichier,Extension,FontType: string;
+begin
+FileDlg:= TfpgFileDialog.Create(nil);
+//FileDlg.Filter:= 'True type fonts (*.ttf;*.otf)|*.ttf;*.otf|Type1 fonts (*.pfa;*.pfb)|*.pfa;*.pfb';
+FileDlg.Filter:= 'True type fonts (*.ttf;*.otf)|*.ttf;*.otf';
+FileDlg.FontDesc:= 'bitstream vera sans-9';
+{$ifdef linux}
+FileDlg.InitialDir:= GetEnv('GS_LIB');
+{$endif}
+{$ifdef win32}
+//FileDlg.InitialDir:= '/WINDOWS/Fonts';
+{$endif}
+try
+ if FileDlg.RunOpenFile
+ then
+ begin
+ Fichier:= ExtractFileName(FileDlg.FileName);
+ //Extension:= Lowercase(Copy(Fichier,Length(Fichier)-3,3));
+ //if (Extension= 'ttf') or (Extension= 'otf')
+ //then
+ // FontType:= 'TrueType'
+ //else
+ // if Extension= 'pfb'
+ // then
+ // FontType:= 'Type1';
+ Parser:= T_Parser.Create(nil);
+ Parser.MakeFont(Fichier,Cb_SelectMap.Text,True);
+ end;
+finally
+ FileDlg.Free;
+ end;
+end;
+
+procedure TF_MainForm.Bt_ExitClick(Sender: TObject);
+begin
+Parser.Free;
+MapList.Free;
+Close;
+end;
+
+constructor TF_MainForm.Create(AOwner: TComponent);
+begin
+inherited Create(AOwner);
+Name := 'F_MainForm';
+WindowTitle:= 'TTF parser';
+SetPosition(0, 0, 400, 300);
+WindowPosition:= wpScreenCenter;
+Sizeable:= False;
+MapList:= TStringList.Create;
+with MapList do
+ begin
+ Add('cp874');
+ Add('cp1250');
+ Add('cp1251');
+ Add('cp1252');
+ Add('cp1253');
+ Add('cp1254');
+ Add('cp1255');
+ Add('cp1257');
+ Add('cp1258');
+ Add('iso-8859-1');
+ Add('iso-8859-2');
+ Add('iso-8859-4');
+ Add('iso-8859-5');
+ Add('iso-8859-7');
+ Add('iso-8859-9');
+ Add('iso-8859-11');
+ Add('iso-8859-15');
+ Add('iso-8859-16');
+ Add('koi8-r');
+ Add('koi8-u');
+ end;
+L_SelectMap:= CreateLabel(Self,150,30,'Select mapping',100,20,taCenter);
+Cb_SelectMap:= CreateComboBox(Self,150,50,100,MapList,20);
+Cb_SelectMap.FocusItem:= 3;
+Bt_SelectFile:= CreateButton(Self,150,200,100,'Select file',@Bt_SelectFileClick,'');
+Bt_Exit:= CreateButton(Self,160,250,80,'Exit',@Bt_ExitClick,'');
+RepCourant:= ExtractFilePath(Paramstr(0));
+end;
+
+end.
+
diff --git a/tools/makefont/u_parsettf.pas b/tools/makefont/u_parsettf.pas
new file mode 100644
index 00000000..e7a1584c
--- /dev/null
+++ b/tools/makefont/u_parsettf.pas
@@ -0,0 +1,708 @@
+unit u_parsettf;
+
+{$mode objfpc}
+
+interface
+
+uses
+ Classes, SysUtils, StrUtils,
+ fpg_dialogs;
+
+type
+ T_Parser= class(TObject)
+ private
+ OriginalSize: Longint;
+ FEncoding: string;
+ UnitsPerEm: Integer;
+ Coef: Extended;
+ BBox: array[0..3] of Smallint;
+ NumHMetrix: Integer;
+ NumGlyphs: Integer;
+ Widths: array of Smallint;
+ Chars: array of Word;
+ PostScriptName: string;
+ Embeddable: Boolean;
+ Bold: Boolean;
+ StemV: SmallInt;
+ Ascender: SmallInt;
+ Descender: SmallInt;
+ CapHeight: SmallInt;
+ ItalicAngle: Smallint;
+ Flags: Integer;
+ MissingWidth: SmallInt;
+ UnderlinePos: Smallint;
+ UnderlineThick: Smallint;
+ IsFixedPitch: Boolean;
+ CharWidth: array[0..255] of SmallInt;
+ Differences: widestring;
+ procedure ParseHead;
+ procedure ParseHhea;
+ procedure ParseMaxp;
+ procedure ParseHmtx;
+ procedure ParseCmap;
+ procedure ParseName;
+ procedure ParseOS2;
+ procedure ParsePost;
+ procedure ParseTtfFile(const FontFile: string);
+ procedure PrepareEncoding;
+ procedure MakedefinitionFile(FontFile: string);
+ function MakeDifferences: widestring;
+ public
+ procedure MakeFont(const FontFile: string; const Encoding: string; Embed: Boolean);
+ constructor Create(AOwner: TComponent);
+ end;
+
+var
+ Parser: T_Parser;
+ RepCourant: string;
+
+implementation
+
+uses
+ u_data;
+
+var
+ Flux: TFileStream;
+ CharNames: array[0..255] of string;
+ CharCodes: array[0..255] of Word;
+ CharBase: array[0..255] of string;
+
+function Puissance(Base,Exposant: Integer): Integer;
+begin
+if Exposant> 1
+then
+ Puissance:= Base*Puissance(Base,Pred(Exposant))
+else
+ Puissance:= Exposant;
+end;
+
+function ReadULong(AFlux: TFileStream): Longword;
+var
+ ALong: Longword;
+ Chaine: string;
+ Cpt,Coef: Integer;
+ Value: array of Longword;
+begin
+AFlux.Read(ALong,SizeOf(ALong));
+Chaine:= IntToHex(ALong,8);
+Chaine:= Copy(Chaine,7,2)+Copy(Chaine,5,2)+Copy(Chaine,3,2)+Copy(Chaine,1,2);
+SetLength(Value,8);
+for Cpt:= 1 to 8 do
+ begin
+ Coef:= 9-Cpt;
+ case Chaine[Cpt] of
+ '0'..'9':
+ Value[Cpt]:= Puissance(16,Coef)*StrToInt(Chaine[Cpt]);
+ 'A':
+ Value[Cpt]:= Puissance(16,Coef)*10;
+ 'B':
+ Value[Cpt]:= Puissance(16,Coef)*11;
+ 'C':
+ Value[Cpt]:= Puissance(16,Coef)*12;
+ 'D':
+ Value[Cpt]:= Puissance(16,Coef)*13;
+ 'E':
+ Value[Cpt]:= Puissance(16,Coef)*14;
+ 'F':
+ Value[Cpt]:= Puissance(16,Coef)*15;
+ end;
+ end;
+Result:= 0;
+for Cpt:= 1 to 8 do
+ Result:= Result+Value[Cpt];
+end;
+
+function ReadUShort(AFlux: TFileStream): Word;
+var
+ AWord: Word;
+ Chaine: string;
+ Cpt,Coef: Integer;
+ Value: array of Word;
+begin
+AFlux.Read(AWord,SizeOf(AWord));
+Chaine:= IntToHex(AWord,4);
+Chaine:= Copy(Chaine,3,2)+Copy(Chaine,1,2);
+SetLength(Value,4);
+for Cpt:= 1 to 4 do
+ begin
+ Coef:= 5-Cpt;
+ case Chaine[Cpt] of
+ '0'..'9':
+ Value[Cpt]:= Puissance(16,Coef)*StrToInt(Chaine[Cpt]);
+ 'A':
+ Value[Cpt]:= Puissance(16,Coef)*10;
+ 'B':
+ Value[Cpt]:= Puissance(16,Coef)*11;
+ 'C':
+ Value[Cpt]:= Puissance(16,Coef)*12;
+ 'D':
+ Value[Cpt]:= Puissance(16,Coef)*13;
+ 'E':
+ Value[Cpt]:= Puissance(16,Coef)*14;
+ 'F':
+ Value[Cpt]:= Puissance(16,Coef)*15;
+ end;
+ end;
+Result:= 0;
+for Cpt:= 1 to 4 do
+ Result:= Result+Value[Cpt];
+end;
+
+function ReadShort(AFlux: TFileStream): Smallint;
+var
+ AWord: Word;
+ Chaine: string;
+ Cpt,Coef: Integer;
+ Value: array of Word;
+begin
+AFlux.Read(AWord,SizeOf(AWord));
+Chaine:= IntToHex(AWord,4);
+Chaine:= Copy(Chaine,3,2)+Copy(Chaine,1,2);
+SetLength(Value,4);
+for Cpt:= 1 to 4 do
+ begin
+ Coef:= 5-Cpt;
+ case Chaine[Cpt] of
+ '0'..'9':
+ Value[Cpt]:= Puissance(16,Coef)*StrToInt(Chaine[Cpt]);
+ 'A':
+ Value[Cpt]:= Puissance(16,Coef)*10;
+ 'B':
+ Value[Cpt]:= Puissance(16,Coef)*11;
+ 'C':
+ Value[Cpt]:= Puissance(16,Coef)*12;
+ 'D':
+ Value[Cpt]:= Puissance(16,Coef)*13;
+ 'E':
+ Value[Cpt]:= Puissance(16,Coef)*14;
+ 'F':
+ Value[Cpt]:= Puissance(16,Coef)*15;
+ end;
+ end;
+Result:= 0;
+for Cpt:= 1 to 4 do
+ Result:= Result+Value[Cpt];
+end;
+
+procedure T_Parser.ParseHead;
+var
+ AWord: Word;
+ ALong: Longword;
+ MagicNumber: Longword;
+ Cpt: Integer;
+begin
+for Cpt:= 1 to 3 do
+ Flux.Read(ALong,SizeOf(ALong)); // skip 12 bytes - Version, FontRevision, ChecksumAdjustment
+MagicNumber:= ReadULong(Flux); // 4 bytes - MagicNumber
+if IntToHex(MagicNumber,4)<> '5F0F3CF5'
+then
+ begin
+ ShowMessage('Incorrect magic number',True);
+ Exit;
+ end;
+Flux.Read(AWord,SizeOf(AWord)); // skip 2 bytes - Flags
+UnitsPerEm:= ReadUShort(Flux); // 2 bytes - UnitsPerEm
+Coef:= 1000/UnitsPerEm;
+for Cpt:= 1 to 4 do
+ Flux.Read(ALong,SizeOf(ALong)); // skip 16 bytes - Created, Modified
+BBox[0]:= Round(Coef*ReadShort(Flux)); // 2 bytes
+BBox[1]:= Round(Coef*ReadShort(Flux)); // 2 bytes
+BBox[2]:= Round(Coef*ReadShort(Flux)); // 2 bytes
+BBox[3]:= Round(Coef*ReadShort(Flux)); // 2 bytes
+end;
+
+procedure T_Parser.ParseHhea;
+var
+ AWord: Word;
+ ALong: Longword;
+ Cpt: Integer;
+begin
+Flux.Read(ALong,SizeOf(ALong)); // skip 4 bytes
+for Cpt:= 1 to 15 do
+ Flux.Read(AWord,SizeOf(AWord)); // skip 30 bytes
+NumHMetrix:= ReadUShort(Flux); // 2 bytes
+end;
+
+procedure T_Parser.ParseMaxp;
+var
+ ALong: Longword;
+begin
+Flux.Read(ALong,SizeOf(ALong)); // skip 4 bytes
+NumGlyphs:= ReadUShort(Flux); // 2 bytes
+end;
+
+procedure T_Parser.ParseHmtx;
+var
+ AWord: Word;
+ Cpt: Integer;
+begin
+SetLength(Widths,NumGlyphs);
+for Cpt:= 0 to Pred(NumHMetrix) do
+ begin
+ Widths[Cpt]:= ReadUShort(Flux); // 2 bytes
+ Flux.Read(AWord,SizeOf(AWord)); // skip 2 bytes - Lsb
+ end;
+if NumHMetrix< NumGlyphs
+then
+ for Cpt:= NumHMetrix to Pred(NumGlyphs) do
+ Widths[Cpt]:= 0;
+//MissingWidth:= Round(Coef*Widths[0]);
+//for Cpt:= 0 to 255 do
+// CharWidth[Cpt]:= MissingWidth;
+end;
+
+procedure T_Parser.ParseCmap;
+var
+ AWord: Word;
+ ALong: Longword;
+ NumTables: Word;
+ SubTableFormat: Word;
+ SegCount: Word;
+ Gid: Word;
+ EndCount: array of Word;
+ StartCount: array of Word;
+ IDDelta: array of Word;
+ IDRangeOffset: array of Word;
+ Cpt,Cpt2: Integer;
+ PlatformID,EncodingID: Word;
+ Offset,Offset31,TableStartPos,TablePos: LongWord;
+begin
+TableStartPos:= Flux.Position; // memorize Table start position
+Flux.Read(AWord,SizeOf(AWord)); // skip 2 bytes - version
+NumTables:= ReadUShort(Flux); // 2 bytes
+Offset31:= 0;
+for Cpt:= 1 to NumTables do
+ begin
+ PlatformID:= ReadUShort(Flux); // 2 bytes
+ EncodingID:= ReadUShort(Flux); // 2 bytes
+ Offset:= ReadULong(Flux); // 4 bytes - Offset of subtable
+ if (PlatformID= 3) and (EncodingID= 1)
+ then
+ Offset31:= Offset;
+ end;
+if Offset31= 0
+then
+ begin
+ ShowMessage('No unicode encoding found',True);
+ Exit;
+ end;
+Flux.Position:= TableStartPos+Offset31;
+SubTableFormat:= ReadUShort(Flux); // 2 bytes - Format of subtable
+if SubTableFormat<> 4
+then
+ begin
+ ShowMessage('Unexpected subtable format',True);
+ Exit;
+ end;
+Flux.Read(ALong,SizeOf(ALong)); // skip 4 bytes - Length, language
+SegCount:= Round(ReadUShort(Flux)/2); // 2 bytes - Segments count
+for Cpt:= 1 to 3 do
+ Flux.Read(AWord,SizeOf(AWord)); // skip 6 bytes - SearchRange, EntrySelector, RangeShift
+SetLength(EndCount,SegCount);
+for Cpt:= 0 to Pred(SegCount) do
+ EndCount[Cpt]:= ReadUShort(Flux); // 2 bytes * SegCount
+Flux.Read(AWord,SizeOf(AWord)); // skip 2 bytes - ReservedPad
+SetLength(StartCount,SegCount);
+for Cpt:= 0 to Pred(SegCount) do
+ StartCount[Cpt]:= ReadUShort(Flux); // 2 bytes * SegCount
+SetLength(IDDelta,SegCount);
+for Cpt:= 0 to Pred(SegCount) do
+ IDDelta[Cpt]:= ReadUShort(Flux); // 2 bytes * SegCount
+TablePos:= Flux.Position; // set position to Table offset
+SetLength(IDRangeOffset,SegCount);
+for Cpt:= 0 to Pred(SegCount) do
+ IDRangeOffset[Cpt]:= ReadUShort(Flux); // 2 bytes * SegCount
+for Cpt:= 0 to Pred(SegCount) do
+ begin
+ if IDRangeOffset[Cpt]> 0
+ then
+ Flux.Position:= TablePos+2*Cpt+IDRangeOffset[Cpt]; // set position
+ SetLength(Chars,Length(Chars)+EndCount[Cpt]);
+ for Cpt2:= StartCount[Cpt] to EndCount[Cpt] do
+ begin
+ if Cpt2= 65535
+ then
+ Break;
+ if IDRangeOffset[Cpt]> 0
+ then
+ begin
+ Gid:= ReadUShort(Flux);
+ if Gid> 0
+ then
+ Gid:= Gid+IDDelta[Cpt];
+ end
+ else
+ Gid:= Cpt2+IDDelta[Cpt];
+ if Gid>= 65536
+ then
+ Gid:= Gid-65536;
+ if Gid> 0
+ then
+ Chars[Cpt2]:= Gid;
+ end;
+ end;
+end;
+
+procedure T_Parser.ParseName;
+var
+ AWord: Word;
+ NameID: Word;
+ Count: Word;
+ Long: Word;
+ StringOffset: Word;
+ Offset: Word;
+ TableStartPos: LongWord;
+ Cpt,Cpt2: Integer;
+ Chaine: string;
+ CharIdent: Char;
+begin
+TableStartPos:= Flux.Position; // memorize Table start position
+PostScriptName:= '';
+Flux.Read(AWord,SizeOf(AWord)); // skip 2 bytes - Format
+Count:= ReadUShort(Flux); // 2 bytes
+StringOffset:= ReadUShort(Flux); // 2 bytes
+for Cpt:= 0 to Pred(Count) do
+ begin
+ for Cpt2:= 1 to 3 do
+ Flux.Read(AWord,SizeOf(AWord)); // skip 6 bytes - PlatformID, encodingID, languageID
+ NameID:= ReadUShort(Flux); // 2 bytes
+ Long:= ReadUShort(Flux); // 2 bytes
+ Offset:= ReadUShort(Flux); // 2 bytes
+ if NameID= 6
+ then
+ begin
+ Flux.Position:= TableStartPos+StringOffset+Offset; // set position
+ Chaine:= '';
+ for Cpt2:= 1 to Long do
+ begin
+ Flux.Read(CharIdent,SizeOf(CharIdent)); // 1 byte
+ Chaine:= Chaine+CharIdent;
+ end;
+ PostScriptName:= Chaine;
+ Break;
+ end;
+ end;
+end;
+
+procedure T_Parser.ParseOS2;
+var
+ AWord: Word;
+ ALong: Longword;
+ Version: Word;
+ FsType: Word;
+ Cpt: Integer;
+begin
+Version:= ReadUShort(Flux); // 2 bytes
+for Cpt:= 1 to 3 do
+ Flux.Read(AWord,SizeOf(AWord)); // skip 6 bytes - xAvgCharWidth, usWeightClass, usWidthClass
+FsType:= ReadUShort(Flux); // 2 bytes
+Embeddable:= (FsType<> 2) and ((FsType and 512)= 0);
+if not Embeddable
+then
+ begin
+ ShowMessage('Font licence does not allow embedding',True);
+ Exit;
+ end;
+for Cpt:= 1 to 13 do
+ Flux.Read(ALong,SizeOf(ALong)); // skip 52 bytes
+Bold:= (ReadUShort(Flux) and 32)<> 0 ; // 2 bytes
+if Bold
+then
+ StemV:= 120
+else
+ StemV:= 70;
+Flux.Read(ALong,SizeOf(ALong)); // skip 4 bytes - usFirstCharIndex, usLastCharIndex
+Ascender:= Round(Coef*ReadShort(Flux)); // 2 bytes
+Descender:= Round(Coef*ReadShort(Flux)); // 2 bytes
+if Version>= 2
+then
+ begin
+ for Cpt:= 1 to 4 do
+ Flux.Read(ALong,SizeOf(ALong)); // skip 16 bytes
+ CapHeight:= Round(Coef*ReadShort(Flux)); // 2 bytes
+ end
+else
+ CapHeight:= Ascender;
+end;
+
+procedure T_Parser.ParsePost;
+var
+ AWord: Word;
+ ALong: Longint;
+begin
+Flux.Read(ALong,SizeOf(ALong)); // skip 4 bytes - Version
+ItalicAngle:= ReadShort(Flux); // 2 bytes
+Flux.Read(AWord,SizeOf(AWord)); // skip 2 bytes - decimal part
+UnderlinePos:= Round(Coef*ReadShort(Flux)); // 2 bytes
+UnderlineThick:= Round(Coef*ReadShort(Flux)); // 2 bytes
+IsFixedPitch:= ReadULong(Flux)<> 0; // 4 bytes
+Flags:= 32; // non symbolic
+if IsFixedPitch
+then
+ Flags:= Flags+1;
+if ItalicAngle<> 0
+then
+ Flags:= Flags+64;
+end;
+
+procedure T_Parser.ParseTtfFile(const FontFile: string);
+var
+ Version: Longint;
+ NumTables: Word;
+ AWord: Word;
+ ALong: Longword;
+ TableIdent: array of string;
+ TableOffset: array of Longword;
+ Cpt,Cpt2: Integer;
+ CharIdent: Char;
+begin
+Flux:= TFileStream.Create(FontFile,fmOpenRead);
+try
+ OriginalSize:= Flux.Size;
+ Flux.Position:= 0; // Affset Table (starts at byte 0
+ Flux.Read(Version,SizeOf(Version)); // 4 bytes
+ NumTables:= ReadUShort(Flux); // 2 bytes - Number of Tables
+ Flux.Read(ALong,SizeOf(ALong)); // skip 4 bytes
+ Flux.Read(AWord,SizeOf(AWord)); // skip 2 bytes
+ SetLength(TableIdent,NumTables);
+ SetLength(TableOffset,NumTables);
+ for Cpt:= 0 to Pred(NumTables) do // Table Directory (start at byte 12)
+ begin
+ for Cpt2:= 1 to 4 do
+ begin
+ Flux.Read(CharIdent,SizeOf(CharIdent)); // 1 byte
+ TableIdent[Cpt]:= TableIdent[Cpt]+CharIdent;
+ end;
+ Flux.Read(ALong,SizeOf(ALong)); // skip 4 bytes - Checksum
+ TableOffset[Cpt]:= ReadULong(Flux); // 4 bytes - Offset
+ Flux.Read(ALong,SizeOf(ALong)); // skip 4 bytes - Length
+ end;
+ for Cpt:= 0 to Pred(NumTables) do
+ if TableIdent[Cpt]= 'head'
+ then
+ begin
+ Flux.Position:= TableOffset[Cpt];
+ ParseHead; // lecture table "Head"
+ Break;
+ end;
+ for Cpt:= 0 to Pred(NumTables) do
+ if TableIdent[Cpt]= 'hhea'
+ then
+ begin
+ Flux.Position:= TableOffset[Cpt];
+ ParseHhea; // lecture table "Hhea"
+ Break;
+ end;
+ for Cpt:= 0 to Pred(NumTables) do
+ if TableIdent[Cpt]= 'maxp'
+ then
+ begin
+ Flux.Position:= TableOffset[Cpt];
+ ParseMaxp; // lecture table "Maxp"
+ Break;
+ end;
+ for Cpt:= 0 to Pred(NumTables) do
+ if TableIdent[Cpt]= 'hmtx'
+ then
+ begin
+ Flux.Position:= TableOffset[Cpt];
+ ParseHmtx; // lecture table "Hmtx"
+ Break;
+ end;
+ for Cpt:= 0 to Pred(NumTables) do
+ if TableIdent[Cpt]= 'cmap'
+ then
+ begin
+ Flux.Position:= TableOffset[Cpt];
+ ParseCmap; // lecture table "Cmap"
+ Break;
+ end;
+ for Cpt:= 0 to Pred(NumTables) do
+ if TableIdent[Cpt]= 'name'
+ then
+ begin
+ Flux.Position:= TableOffset[Cpt];
+ ParseName; // lecture table "Name"
+ Break;
+ end;
+ for Cpt:= 0 to Pred(NumTables) do
+ if TableIdent[Cpt]= 'OS/2'
+ then
+ begin
+ Flux.Position:= TableOffset[Cpt];
+ ParseOS2; // lecture table "OS/2"
+ Break;
+ end;
+ for Cpt:= 0 to Pred(NumTables) do
+ if TableIdent[Cpt]= 'post'
+ then
+ begin
+ Flux.Position:= TableOffset[Cpt];
+ ParsePost; // lecture table "Post"
+ Break;
+ end;
+finally
+ Flux.Free;
+ end;
+end;
+
+procedure T_Parser.PrepareEncoding;
+var
+ Cpt: Integer;
+begin
+if FEncoding= 'cp874'
+then
+ for Cpt:= 0 to 255 do
+ begin
+ CharNames[Cpt]:= cp874_n[Cpt];
+ CharCodes[Cpt]:= cp874_v[Cpt];
+ end;
+if FEncoding= 'cp1250'
+then
+ for Cpt:= 0 to 255 do
+ begin
+ CharNames[Cpt]:= cp1250_n[Cpt];
+ CharCodes[Cpt]:= cp1250_v[Cpt];
+ end;
+if FEncoding= 'cp1251'
+then
+ for Cpt:= 0 to 255 do
+ begin
+ CharNames[Cpt]:= cp1251_n[Cpt];
+ CharCodes[Cpt]:= cp1251_v[Cpt];
+ end;
+if FEncoding= 'cp1252'
+then
+ for Cpt:= 0 to 255 do
+ begin
+ CharNames[Cpt]:= cp1252_n[Cpt];
+ CharCodes[Cpt]:= cp1252_v[Cpt];
+ end
+else
+ for Cpt:= 0 to 255 do
+ CharBase[Cpt]:= cp1252_n[Cpt];
+if FEncoding= 'cp1253'
+then
+ for Cpt:= 0 to 255 do
+ begin
+ CharNames[Cpt]:= cp1253_n[Cpt];
+ CharCodes[Cpt]:= cp1253_v[Cpt];
+ end;
+end;
+
+procedure T_Parser.MakedefinitionFile(FontFile: string);
+var
+ FileDlg: TfpgFileDialog;
+ DestFile: TStringList;
+ Chaine,Fichier: widestring;
+ Cpt: Integer;
+begin
+DestFile:= TStringList.Create;
+Chaine:= 'FontType=TrueType';
+DestFile.Add(Chaine);
+Chaine:= 'FontName='+PostScriptName;
+DestFile.Add(Chaine);
+Chaine:= 'Ascent='+IntToStr(Ascender);
+DestFile.Add(Chaine);
+Chaine:= 'Descent='+IntToStr(Descender);
+DestFile.Add(Chaine);
+Chaine:= 'CapHeight='+IntToStr(CapHeight);
+DestFile.Add(Chaine);
+Chaine:= 'Flags='+IntToStr(Flags);
+DestFile.Add(Chaine);
+Chaine:= 'FontBBox=';
+for Cpt:= 0 to 3 do
+ Chaine:= Chaine+IntToStr(BBox[Cpt])+' ';
+Chaine:= Chaine+']';
+DestFile.Add(Chaine);
+Chaine:= 'ItalicAngle='+IntToStr(ItalicAngle);
+DestFile.Add(Chaine);
+Chaine:= 'StemV='+IntToStr(StemV);
+DestFile.Add(Chaine);
+Chaine:= 'MissingWidth='+IntToStr(MissingWidth);
+DestFile.Add(Chaine);
+Chaine:= 'FontUp='+IntToStr(UnderlinePos);
+DestFile.Add(Chaine);
+Chaine:= 'FontUt='+IntToStr(UnderlineThick);
+DestFile.Add(Chaine);
+Chaine:= 'Encoding='+FEncoding;
+DestFile.Add(Chaine);
+Chaine:= 'FontFile='+Copy(FontFile,1,Length(FontFile)-4)+'.z';
+//Chaine:= 'FontFile='+FontFile;
+DestFile.Add(Chaine);
+Chaine:= 'OriginalSize='+IntToStr(OriginalSize);
+DestFile.Add(Chaine);
+if Differences> ''
+then
+ begin
+ Chaine:= 'Diffs='+Differences;
+ DestFile.Add(Chaine);
+ end;
+Chaine:= 'CharWidth=';
+for Cpt:= 32 to 255 do
+ Chaine:= Chaine+IntToStr(CharWidth[Cpt])+' ';
+Chaine:= Chaine+']';
+DestFile.Add(Chaine);
+FileDlg:= TfpgFileDialog.Create(nil);
+FileDlg.InitialDir:= RepCourant;
+FileDlg.Filter:= 'Fichiers fnt |*.fnt';
+FontFile:= StringReplace(FontFile,'-Regular','',[rfIgnoreCase]);
+Fichier:= Copy(FontFile,1,Length(FontFile)-3)+'fnt';
+FileDlg.FileName:= Fichier;
+try
+ if FileDlg.RunSaveFile
+ then
+ DestFile.SaveToFile(Fichier);
+finally
+ FileDlg.Free;
+ DestFile.Free;
+ end;
+end;
+
+function T_Parser.MakeDifferences: widestring;
+var
+ Cpt,Last: Integer;
+begin
+Result:= '';
+Last:= 0;
+for Cpt:=32 to 255 do
+ if CharNames[Cpt]<> CharBase[Cpt]
+ then
+ begin
+ if Cpt<> Succ(Cpt)
+ then
+ Result:= Result+IntToStr(Cpt)+' ';
+ Last:= Cpt;
+ Result:= Result+'/'+CharNames[Cpt]+' ';
+ end;
+end;
+
+procedure T_Parser.MakeFont(const FontFile: string; const Encoding:string; Embed: Boolean);
+var
+ Cpt: Integer;
+begin
+FEncoding:= Encoding;
+PrepareEncoding;
+ParseTtfFile(FontFile);
+MissingWidth:= Round(Coef*Widths[Chars[CharCodes[32]]]);
+for Cpt:= 0 to 255 do
+ begin
+ if (Widths[Chars[CharCodes[Cpt]]]> 0) and (CharNames[Cpt]<> '.notdef')
+ then
+ CharWidth[Cpt]:= Round(Coef*Widths[Chars[CharCodes[Cpt]]])
+ else
+ CharWidth[Cpt]:= MissingWidth;
+ end;
+if Encoding<> 'cp1252'
+then
+ Differences:= MakeDifferences;
+MakeDefinitionFile(FontFile);
+end;
+
+constructor T_Parser.Create(AOwner: TComponent);
+begin
+inherited Create;
+end;
+
+end.
+
diff --git a/uidesigner/anchors.inc b/uidesigner/anchors.inc
index 0c9b3738..a53b557e 100644
--- a/uidesigner/anchors.inc
+++ b/uidesigner/anchors.inc
@@ -206,3 +206,55 @@ Const
255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
255, 0,255,255, 0,255);
+
+Const
+ vfd_grid : Array[0..821] of byte = (
+ 66, 77, 54, 3, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
+ 0, 16, 0, 0, 0, 16, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 0, 3, 0, 0,196, 14, 0, 0,196, 14, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,192,113, 65,255, 0,255,255, 0,
+ 255,176,105, 65,255, 0,255,255, 0,255,160, 97, 49,255, 0,255,255,
+ 0,255,160, 89, 49,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,192,121, 81,255, 0,255,255, 0,255,176,105,
+ 65,255, 0,255,255, 0,255,160, 97, 49,255, 0,255,255, 0,255,160,
+ 89, 49,255, 0,255,255, 0,255,255, 0,255,255, 0,255,192,129, 81,
+ 192,129, 81,192,121, 81,192,121, 81,192,113, 65,176,113, 65,176,105,
+ 65,176,105, 49,176, 97, 49,176, 97, 49,160, 89, 49,160, 89, 49,160,
+ 89, 49,160, 89, 49,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 192,129, 81,255,255,255,255,255,255,192,113, 65,255,255,255,255,255,
+ 255,176,105, 65,255,255,255,255,255,255,160, 97, 49,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,192,129, 81,
+ 255,255,255,255,255,255,192,121, 65,255,255,255,255,255,255,176,105,
+ 65,255,255,255,255,255,255,176, 97, 49,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,208,144, 97,208,136, 97,208,136, 97,192,129, 81,
+ 192,129, 81,192,121, 81,192,121, 81,192,113, 65,176,105, 65,176,105,
+ 65,176,105, 49,176, 97, 49,176, 97, 49,160, 89, 49,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,208,136, 97,255,255,255,255,255,255,
+ 192,129, 81,255,255,255,255,255,255,192,113, 65,255,255,255,255,255,
+ 255,176,105, 65,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,208,144, 97,255,255,255,255,255,255,192,129, 81,
+ 255,255,255,255,255,255,192,121, 81,255,255,255,255,255,255,176,105,
+ 65,255, 0,255,255, 0,255,255, 0,255,255, 0,255,224,152,113,224,
+ 152,113,208,144, 97,208,144, 97,208,136, 97,208,136, 97,192,129, 81,
+ 192,129, 81,192,121, 81,192,121, 65,176,113, 65,176,113, 65,176,105,
+ 65,176,105, 65,255, 0,255,255, 0,255,255, 0,255,255, 0,255,224,
+ 152, 97,255,255,255,255,255,255,208,136, 97,255,255,255,255,255,255,
+ 192,129, 81,255,255,255,255,255,255,192,113, 65,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,224,152,113,255,
+ 255,255,255,255,255,208,144, 97,255,255,255,255,255,255,192,129, 81,
+ 255,255,255,255,255,255,192,121, 81,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,224,152,113,224,152,113,224,152,113,224,152,113,224,
+ 152, 97,208,144, 97,208,144, 97,208,136, 97,208,136, 97,208,129, 81,
+ 192,129, 81,192,121, 81,192,121, 81,176,113, 65,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,224,152,113,255, 0,255,255, 0,255,224,
+ 144, 97,255, 0,255,255, 0,255,208,136, 97,255, 0,255,255, 0,255,
+ 192,129, 81,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,224,152,113,255, 0,255,255, 0,255,224,152,113,255,
+ 0,255,255, 0,255,208,144, 97,255, 0,255,255, 0,255,208,129, 81,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255);
diff --git a/uidesigner/icons.inc b/uidesigner/icons.inc
index b764e738..f58ab0a0 100644
--- a/uidesigner/icons.inc
+++ b/uidesigner/icons.inc
@@ -3619,3 +3619,217 @@ const
0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
255,255, 0,255,255, 0,255, 0, 0, 0);
+
+
+const
+ stdimg_vfd_scrollframe: array[0..1617] of byte = (
+ 66, 77, 82, 6, 0, 0, 0, 0, 0, 0,122, 0, 0, 0,108, 0, 0,
+ 0, 22, 0, 0, 0, 22, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 216, 5, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 66, 71, 82,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,255,255,255,146,119,119,146,119,119,146,119,119,146,119,
+ 119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,
+ 119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,
+ 146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,
+ 119, 0, 0,146,119,119,193,192,194,193,192,194,193,192,194,193,192,
+ 194,146,119,119,255,252,251,201,188,186,255,252,251,201,188,186,255,
+ 252,251,146,119,119,193,192,194,193,192,194,193,192,194,193,192,194,
+ 146,119,119,237,239,239,237,239,239,237,239,239,237,239,239,146,119,
+ 119, 0, 0,146,119,119,193,192,194,137,137,137, 6, 8, 8,237,239,
+ 239,146,119,119,201,188,186,255,252,251,201,188,186,255,252,251,201,
+ 188,186,146,119,119,193,192,194, 4, 6, 7,137,137,137,237,239,239,
+ 146,119,119,237,239,239,237,239,239,237,239,239,237,239,239,146,119,
+ 119, 0, 0,146,119,119,193,192,194,122,122,122, 1, 1, 1,237,239,
+ 239,146,119,119,255,252,251,201,188,186,255,252,251,201,188,186,255,
+ 252,251,146,119,119,193,192,194, 1, 5, 6,122,122,122,237,239,239,
+ 146,119,119,237,239,239,237,239,239,237,239,239,237,239,239,146,119,
+ 119, 0, 0,146,119,119,193,192,194,237,239,239,237,239,239,237,239,
+ 239,146,119,119,201,188,186,255,252,251,201,188,186,255,252,251,201,
+ 188,186,146,119,119,193,192,194,237,239,239,237,239,239,237,239,239,
+ 146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,
+ 119, 0, 0,146,119,119,146,119,119,146,119,119,146,119,119,146,119,
+ 119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,
+ 119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,
+ 146,119,119,193,192,194,193,192,194,193,192,194,193,192,194,146,119,
+ 119, 0, 0,146,119,119,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 146,119,119,237,239,239,122,122,122,137,137,137,193,192,194,146,119,
+ 119, 0, 0,146,119,119,255,255,255,148,145,148,148,145,148,148,145,
+ 148,148,145,148,148,145,148,148,145,148,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 146,119,119,237,239,239, 1, 1, 1, 6, 8, 8,193,192,194,146,119,
+ 119, 0, 0,146,119,119,255,255,255,193,192,194,237,239,239,237,239,
+ 239,237,239,239,237,239,239,148,145,148,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 146,119,119,237,239,239,237,239,239,237,239,239,193,192,194,146,119,
+ 119, 0, 0,146,119,119,255,255,255,193,192,194,237,239,239,237,239,
+ 239,237,239,239,237,239,239,148,145,148,255,255,255,148,145,148,148,
+ 145,148,148,145,148,148,145,148,148,145,148,148,145,148,255,255,255,
+ 146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,
+ 119, 0, 0,146,119,119,255,255,255,193,192,194,193,192,194,193,192,
+ 194,193,192,194,193,192,194,148,145,148,255,255,255,193,192,194,237,
+ 239,239,237,239,239,237,239,239,237,239,239,148,145,148,255,255,255,
+ 146,119,119,201,188,186,255,254,254,198,193,192,255,251,252,146,119,
+ 119, 0, 0,146,119,119,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,193,192,194,237,
+ 239,239,237,239,239,237,239,239,237,239,239,148,145,148,255,255,255,
+ 146,119,119,255,252,251,209,193,194,255,251,251,204,196,197,146,119,
+ 119, 0, 0,146,119,119,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,193,192,194,193,
+ 192,194,193,192,194,193,192,194,193,192,194,148,145,148,255,255,255,
+ 146,119,119,213,204,201,254,244,244,208,200,200,255,254,255,146,119,
+ 119, 0, 0,146,119,119,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 146,119,119,255,255,252,189,184,183,255,254,253,192,192,192,146,119,
+ 119, 0, 0,146,119,119,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,148,145,148,148,
+ 145,148,148,145,148,148,145,148,148,145,148,148,145,148,255,255,255,
+ 146,119,119,197,188,185,255,255,254,183,188,186,251,255,255,146,119,
+ 119, 0, 0,146,119,119,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,193,192,194,237,
+ 239,239,237,239,239,237,239,239,237,239,239,148,145,148,255,255,255,
+ 146,119,119,255,255,254,187,192,190,248,255,255,184,190,189,146,119,
+ 119, 0, 0,146,119,119,255,255,255,148,145,148,148,145,148,148,145,
+ 148,148,145,148,148,145,148,148,145,148,255,255,255,193,192,194,237,
+ 239,239,237,239,239,237,239,239,237,239,239,148,145,148,255,255,255,
+ 146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,
+ 119, 0, 0,146,119,119,255,255,255,193,192,194,237,239,239,237,239,
+ 239,237,239,239,237,239,239,148,145,148,255,255,255,193,192,194,193,
+ 192,194,193,192,194,193,192,194,193,192,194,148,145,148,255,255,255,
+ 146,119,119,193,192,194,193,192,194,193,192,194,193,192,194,146,119,
+ 119, 0, 0,146,119,119,255,255,255,193,192,194,237,239,239,237,239,
+ 239,237,239,239,237,239,239,148,145,148,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 146,119,119,237,239,239, 1, 5, 6, 4, 6, 7,193,192,194,146,119,
+ 119, 0, 0,146,119,119,255,255,255,193,192,194,193,192,194,193,192,
+ 194,193,192,194,193,192,194,148,145,148,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 146,119,119,237,239,239,122,122,122,137,137,137,193,192,194,146,119,
+ 119, 0, 0,146,119,119,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 146,119,119,237,239,239,237,239,239,237,239,239,193,192,194,146,119,
+ 119, 0, 0,146,119,119,146,119,119,146,119,119,146,119,119,146,119,
+ 119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,
+ 119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,
+ 146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,255,255,
+ 255, 0, 0);
+
+
+const
+ stdimg_vfd_toggle: array[0..1849] of byte = (
+ 66, 77, 58, 7, 0, 0, 0, 0, 0, 0,122, 0, 0, 0,108, 0, 0,
+ 0, 24, 0, 0, 0, 24, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 192, 6, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 66, 71, 82,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,
+ 119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,
+ 119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,
+ 146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,255, 0,
+ 255,255, 0,255,146,119,119,200,208,212,200,208,212,200,208,212,200,
+ 208,212,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,
+ 200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,200,208,
+ 212,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,146,
+ 119,119,255, 0,255,255, 0,255,146,119,119,200,208,212, 0,230, 0,
+ 0,230, 0, 0,230, 0, 0,230, 0,255,255,255,132,132,132,132,132,
+ 132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,
+ 132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,
+ 200,208,212,146,119,119,255, 0,255,255, 0,255,146,119,119,200,208,
+ 212, 0,230, 0, 0,230, 0, 0,230, 0, 0,230, 0,255,255,255,200,
+ 208,212,159,159,159, 0, 0, 0, 0, 0, 0,159,159,159,200,208,212,
+ 0, 0, 0,200,208,212,145,145,145, 0, 0, 0,200,208,212,200,208,
+ 212,132,132,132,200,208,212,146,119,119,255, 0,255,255, 0,255,146,
+ 119,119,200,208,212, 0,230, 0, 0,230, 0, 0,230, 0, 0,230, 0,
+ 255,255,255,200,208,212, 0, 0, 0,200,208,212,200,208,212, 0, 0,
+ 0,200,208,212, 0, 0, 0,132,132,132, 0, 0, 0, 0, 0, 0,200,
+ 208,212,200,208,212,132,132,132,200,208,212,146,119,119,255, 0,255,
+ 255, 0,255,146,119,119,200,208,212, 0,230, 0, 0,230, 0, 0,230,
+ 0, 0,230, 0,255,255,255,200,208,212, 0, 0, 0,200,208,212,200,
+ 208,212, 0, 0, 0,200,208,212, 0, 0, 0, 0, 0, 0,132,132,132,
+ 0, 0, 0,200,208,212,200,208,212,132,132,132,200,208,212,146,119,
+ 119,255, 0,255,255, 0,255,146,119,119,200,208,212, 0,230, 0, 0,
+ 230, 0, 0,230, 0, 0,230, 0,255,255,255,200,208,212,159,159,159,
+ 0, 0, 0, 0, 0, 0,159,159,159,200,208,212, 0, 0, 0,145,145,
+ 145,200,208,212, 0, 0, 0,200,208,212,200,208,212,132,132,132,200,
+ 208,212,146,119,119,255, 0,255,255, 0,255,146,119,119,200,208,212,
+ 0,230, 0, 0,230, 0, 0,230, 0, 0,230, 0,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,200,208,212,146,119,119,255, 0,255,255, 0,255,146,119,
+ 119,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,200,
+ 208,212,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,
+ 200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,200,208,
+ 212,200,208,212,200,208,212,200,208,212,146,119,119,255, 0,255,255,
+ 0,255,146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,
+ 146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,
+ 119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,
+ 119,119,146,119,119,146,119,119,146,119,119,146,119,119,146,119,119,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255);
+
diff --git a/uidesigner/images/scrollframe.bmp b/uidesigner/images/scrollframe.bmp
new file mode 100644
index 00000000..3733100b
--- /dev/null
+++ b/uidesigner/images/scrollframe.bmp
Binary files differ
diff --git a/uidesigner/images/toggle.bmp b/uidesigner/images/toggle.bmp
new file mode 100644
index 00000000..304d0973
--- /dev/null
+++ b/uidesigner/images/toggle.bmp
Binary files differ
diff --git a/uidesigner/newformdesigner.pas b/uidesigner/newformdesigner.pas
index 341019de..29962b93 100644
--- a/uidesigner/newformdesigner.pas
+++ b/uidesigner/newformdesigner.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -62,6 +62,8 @@ type
procedure miHelpAboutGUI(Sender: TObject);
procedure miMRUClick(Sender: TObject; const FileName: string);
procedure SetupCaptions;
+ procedure BuildThemePreviewMenu;
+ procedure ToggleDesignerGrid(Sender: TObject);
public
{@VFD_HEAD_BEGIN: frmMain}
MainMenu: TfpgMenuBar;
@@ -76,6 +78,7 @@ type
miOpenRecentMenu: TfpgPopupMenu;
helpmenu: TfpgPopupMenu;
previewmenu: TfpgPopupMenu;
+ btnGrid: TfpgButton;
{@VFD_HEAD_END: frmMain}
mru: TfpgMRU;
constructor Create(AOwner: TComponent); override;
@@ -178,6 +181,7 @@ uses
fpg_iniutils,
fpg_dialogs,
fpg_constants,
+ fpg_stylemanager,
vfdmain,
vfd_constants;
@@ -216,7 +220,6 @@ begin
WindowTitle := 'Product Information...';
Hint := '';
WindowPosition := wpScreenCenter;
- Sizeable := False;
OnShow := @FormShow;
lblAppName := TfpgLabel.Create(self);
@@ -463,11 +466,25 @@ begin
begin
Name := 'previewmenu';
SetPosition(324, 36, 120, 20);
- AddMenuItem('with Windows 9x', '', nil).Enabled := False;
- AddMenuItem('with Windows XP', '', nil).Enabled := False;
- AddMenuItem('with OpenSoft', '', nil).Enabled := False;
- AddMenuItem('with Motif', '', nil).Enabled := False;
- AddMenuItem('with OpenLook', '', nil).Enabled := False;
+ end;
+
+ btnGrid := TfpgButton.Create(self);
+ with btnGrid do
+ begin
+ Name := 'btnGrid';
+ SetPosition(103, 28, 25, 24);
+ Text := '';
+ AllowAllUp := True;
+ FontDesc := '#Label1';
+ GroupIndex := 1;
+ Hint := 'Toggle designer grid';
+ ImageMargin := -1;
+ ImageName := 'vfd.grid';
+ ImageSpacing := 0;
+ TabOrder := 13;
+ Focusable := False;
+ AllowDown := True;
+ OnClick := @ToggleDesignerGrid;
end;
{@VFD_BODY_END: frmMain}
@@ -500,6 +517,8 @@ begin
end;
end;
+ BuildThemePreviewMenu;
+
chlPalette.Items.Sort;
MainMenu.AddMenuItem('&File', nil).SubMenu := filemenu;
MainMenu.AddMenuItem('&Settings', nil).SubMenu := setmenu;
@@ -964,9 +983,35 @@ begin
btnOpen.Hint := rsOpenFormFile;
end;
+procedure TfrmMain.BuildThemePreviewMenu;
+var
+ sl: TStringList;
+ i: integer;
+begin
+ sl := TStringList.Create;
+ fpgStyleManager.AssignStyleTypes(sl);
+ sl.Sort;
+ for i := 0 to sl.Count-1 do
+ begin
+ if sl[i] = 'auto' then
+ continue;
+ previewmenu.AddMenuItem(sl[i], '', nil).Enabled := False;
+ end;
+ sl.Free;
+end;
+
+procedure TfrmMain.ToggleDesignerGrid(Sender: TObject);
+begin
+ maindsgn.ShowGrid := btnGrid.Down;
+end;
+
constructor TfrmMain.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
+ fpgImages.AddMaskedBMP(
+ 'vfd.grid', @vfd_grid,
+ sizeof(vfd_grid), 0, 0);
+
OnShow := @FormShow;
end;
diff --git a/uidesigner/uidesigner.lpi b/uidesigner/uidesigner.lpi
index be5b651a..fb0afe9c 100644
--- a/uidesigner/uidesigner.lpi
+++ b/uidesigner/uidesigner.lpi
@@ -36,7 +36,6 @@
<Unit0>
<Filename Value="uidesigner.lpr"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="uidesigner"/>
</Unit0>
<Unit1>
<Filename Value="vfdmain.pas"/>
@@ -46,7 +45,6 @@
<Unit2>
<Filename Value="vfdresizer.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="vfdresizer"/>
</Unit2>
<Unit3>
<Filename Value="vfdforms.pas"/>
@@ -81,7 +79,6 @@
<Unit9>
<Filename Value="vfdeditors.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="vfdeditors"/>
</Unit9>
<Unit10>
<Filename Value="vfdformparser.pas"/>
@@ -96,12 +93,10 @@
<Unit12>
<Filename Value="vfdutils.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="vfdutils"/>
</Unit12>
<Unit13>
<Filename Value="vfdpropeditgrid.pas"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="vfdpropeditgrid"/>
</Unit13>
<Unit14>
<Filename Value="anchors.inc"/>
@@ -134,8 +129,5 @@
<OptimizationLevel Value="0"/>
</Optimizations>
</CodeGeneration>
- <Other>
- <CompilerPath Value="$(CompPath)"/>
- </Other>
</CompilerOptions>
</CONFIG>
diff --git a/uidesigner/uidesigner.lpr b/uidesigner/uidesigner.lpr
index 90da9d39..17d54a24 100644
--- a/uidesigner/uidesigner.lpr
+++ b/uidesigner/uidesigner.lpr
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Library
- Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -23,9 +23,24 @@ uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
- Classes, SysUtils, fpg_base, fpg_main, vfdmain, vfdresizer, vfdforms,
- vfdfile, newformdesigner, vfdwidgets, vfdformparser, vfdeditors,
- vfdwidgetclass, vfdutils, vfdprops, vfddesigner, vfdpropeditgrid,
+ Classes,
+ SysUtils,
+ fpg_base,
+ fpg_main,
+ fpg_utils,
+ vfdmain,
+ vfdresizer,
+ vfdforms,
+ vfdfile,
+ newformdesigner,
+ vfdwidgets,
+ vfdformparser,
+ vfdeditors,
+ vfdwidgetclass,
+ vfdutils,
+ vfdprops,
+ vfddesigner,
+ vfdpropeditgrid,
vfd_constants;
@@ -43,7 +58,7 @@ begin
{ If a file is passed in as a parameter, then load it }
maindsgn.EditedFileName := ParamStr(1);
- if FileExists(maindsgn.EditedFileName) then
+ if fpgFileExists(maindsgn.EditedFileName) then
maindsgn.OnLoadFile(maindsgn);
fpgApplication.Run;
diff --git a/uidesigner/uidesigner.prj b/uidesigner/uidesigner.prj
index 2523d8ce..26cfb3fd 100644
--- a/uidesigner/uidesigner.prj
+++ b/uidesigner/uidesigner.prj
@@ -15,9 +15,48 @@ order12=0
order13=0
order14=0
order15=0
+order16=0
[projectoptions]
-projectdir=/home/graemeg/programming/fpgui/uidesigner
-projectfilename=/home/graemeg/programming/fpgui/uidesigner/uidesigner.prj
+projectdir=/data/devel/fpgui/uidesigner
+projectfilename=/data/devel/fpgui/uidesigner/uidesigner.prj
+findinfiledialog=37
+ [findinfileadialogfo.subdirs]
+ value=1
+ [findinfileadialogfo.inopenfiles]
+ value=0
+ [findinfileadialogfo.wholeword]
+ value=0
+ [findinfileadialogfo.casesensitive]
+ value=0
+ [findinfileadialogfo.indirectories]
+ value=1
+ [findinfileadialogfo.mask]
+ value="*.pas" "*.pp" "*.inc"
+ history=1
+ "*.pas" "*.pp" "*.inc"
+ [findinfileadialogfo.dir]
+ filenames=1
+ /data/devel/fpgui/src/
+ filehistory=1
+ /data/devel/fpgui/src/
+ filefilterindex=0
+ filefilter="*.pas" "*.pp" "*.inc"
+ filecolwidth=174
+ x=0
+ y=0
+ cx=0
+ cy=0
+ [findinfileadialogfo.findtext]
+ value=MenuFont
+ history=2
+ MenuFont
+
+ [findinfileadialogfo]
+ stackedunder=
+ x=268
+ y=415
+ cx=339
+ cy=251
finddialog=8
[finddialogfo.selectedonly]
value=0
@@ -45,98 +84,98 @@ replacedialog=15
cy=171
options=99
[projectoptionsfo.twidgetgrid3]
- propcolwidthref=666
- sortdescent0=0
- sortdescent1=0
- sortdescent2=0
- width3=102
- sortdescent3=0
- width4=310
- sortdescent4=0
- width5=204
- sortdescent5=0
+ propcolwidthref=653
+ sortdescend0=0
+ sortdescend1=0
+ sortdescend2=0
+ sortdescend3=0
+ width4=190
+ sortdescend4=0
+ width5=185
+ sortdescend5=0
+ width6=227
+ sortdescend6=0
[projectoptionsfo.twidgetgrid4]
propcolwidthref=477
width0=96
- sortdescent0=0
- width1=13
- sortdescent1=0
+ sortdescend0=0
+ sortdescend1=0
width2=73
- sortdescent2=0
+ sortdescend2=0
width3=229
- sortdescent3=0
+ sortdescend3=0
width4=238
- sortdescent4=0
+ sortdescend4=0
sorted=0
col=0
row=0
- rowheight=17
+ rowheight=16
[projectoptionsfo.newfile]
firsttab=0
index=0
[projectoptionsfo.fontaliasgrid]
propcolwidthref=336
width0=98
- sortdescent0=0
+ sortdescend0=0
width1=325
- sortdescent1=0
+ sortdescend1=0
width2=30
- sortdescent2=0
+ sortdescend2=0
width3=50
- sortdescent3=0
+ sortdescend3=0
width4=50
- sortdescent4=0
+ sortdescend4=0
width5=50
- sortdescent5=0
+ sortdescend5=0
width6=70
- sortdescent6=0
+ sortdescend6=0
[projectoptionsfo.macrosplitter]
x=0
- y=143
+ y=144
xprop=1
yprop=0.32808988764045
[projectoptionsfo.macrogrid]
propcolwidthref=460
- sortdescent0=0
- sortdescent1=0
- sortdescent2=0
- sortdescent3=0
- sortdescent4=0
- sortdescent5=0
+ sortdescend0=0
+ sortdescend1=0
+ sortdescend2=0
+ sortdescend3=0
+ sortdescend4=0
+ sortdescend5=0
width6=146
- sortdescent6=0
+ sortdescend6=0
width7=448
- sortdescent7=0
+ sortdescend7=0
[projectoptionsfo.makegroupbox]
firsttab=0
index=2
[projectoptionsfo.exceptionsgrid]
- propcolwidthref=637
+ propcolwidthref=694
width0=47
- sortdescent0=0
- width1=631
- sortdescent1=0
+ sortdescend0=0
+ width1=688
+ sortdescend1=0
[projectoptionsfo.ttabwidget1]
firsttab=0
- index=1
+ index=0
[projectoptionsfo.grid]
propcolwidthref=438
width0=219
- sortdescent0=0
+ sortdescend0=0
width1=431
- sortdescent1=0
+ sortdescend1=0
[projectoptionsfo.filefiltergrid]
propcolwidthref=545
width0=112
- sortdescent0=0
+ sortdescend0=0
width1=538
- sortdescent1=0
+ sortdescend1=0
[projectoptionsfo.ttabwidget2]
firsttab=0
index=0
[projectoptionsfo.tabwidget]
firsttab=0
- index=3
+ index=9
[projectoptionsfo]
stackedunder=
x=263
@@ -162,7 +201,12 @@ programparameters=18
y=243
cx=328
cy=348
-settings=8
+settings=13
+ [settingsfo.tsplitter2]
+ x=223
+ y=16
+ xprop=0.57879656160458
+ yprop=1
[settingsfo]
x=88
y=108
@@ -171,35 +215,96 @@ settings=8
wsize=0
active=1
visible=1
+mainfile=${PROJECTNAME}.lpr
+targetfile=units/${TARGET}/${PROJECTNAME}${EXEEXT}
+messageoutputfile=
+makecommand=${COMPILER}
+makedir=
+unitdirs=7
+ ${FPGUI}/lib/${TARGET}
+ ${FPGUI}/src/reportengine
+ ${FPGUI}/src/corelib/render/software
+ ${FPGUI}/src
+ ${FPGUI}/src/corelib/${FPG_GFX}
+ ${FPGUI}/src/gui
+ ${FPGUI}/src/corelib
+unitpref=-Fu
+incpref=-Fi
+libpref=-Fl
+objpref=-Fo
+targpref=-o
+befcommand=0
+aftcommand=0
+makeoptions=6
+ -l -Mobjfpc -Sh
+ -gl -O-
+ -B
+ -O2 -XX -Xs -CX
+ -vewinh
+ -FEunits/${TARGET}/
+codetemplatedirs=1
+ ${TEMPLATEDIR}
+toolmenus=3
+ fpGUI &DocView
+ UI Designer
+ Image Converter
+toolfiles=3
+ ${FPGUI}/docview/src/units/${TARGET}/docview${EXEEXT}
+ ${FPGUI}/uidesigner/units/${TARGET}/uidesigner${EXEEXT}
+ ${FPGUI}/tools/imageconvert/imgcnv${EXEEXT}
+toolparams=3
+ fpgui+rtl+fcl -k ${cursword}
+ ${CURSOURCEFILE}
+
+fontnames=0
+scriptbeforecopy=
+scriptaftercopy=
+newprojectfiles=4
+ ${TEMPLATEDIR}/fpgui_single_unit/project.pas
+ ${TEMPLATEDIR}fpgui/units/i386-linux/placeholder.txt
+ ${TEMPLATEDIR}fpgui/units/i386-win32/placeholder.txt
+ ${TEMPLATEDIR}fpgui/units/x86_64-linux/placeholder.txt
+newprojectfilesdest=4
+ ${%PROJECTNAME%}.pas
+ ${%PROJECTDIR%}units/i386-linux/placeholder.txt
+ ${%PROJECTDIR%}units/i386-win32/placeholder.txt
+ ${%PROJECTDIR%}units/x86_64-linux/placeholder.txt
+newfinames=3
+ Program
+ Unit
+ Textfile
+newfifilters=3
+ "*.pas" "*.pp"
+ "*.pas" "*.pp"
+
+newfiexts=3
+ pas
+ pas
+
+newfisources=3
+ ${TEMPLATEDIR}default/program.pas
+ ${TEMPLATEDIR}default/unit.pas
+
+newfonames=2
+ Mainform
+ Simple Form
+newfonamebases=2
+
+
+newfosources=2
+ ${TEMPLATEDIR}fpgui/mainform.pas
+ ${TEMPLATEDIR}fpgui/simpleform.pas
+newfoforms=2
+
+
+forcezorder=0
+stripmessageesc=0
copymessages=0
closemessages=0
checkmethods=1
-showgrid=1
-snaptogrid=1
-moveonfirstclick=1
-gridsizex=8
-gridsizey=8
-autoindent=1
-blockindent=2
-rightmarginon=1
-rightmarginchars=80
-scrollheight=0
-tabstops=2
-spacetabs=1
-tabindent=0
-editfontname=DeJaVu Sans Mono
-editfontheight=13
-editfontwidth=0
-editfontextraspace=0
-editfontcolor=-1879048183
-editbkcolor=-1879048186
-statementcolor=14745599
-editfontantialiased=1
-editmarkbrackets=1
-backupfilecount=0
-encoding=0
-codetemplatedirs=1
- ${TEMPLATEDIR}
+colorerror=-1610612712
+colorwarning=-1610612717
+colornote=-1610612716
usercolors=30
0
0
@@ -262,24 +367,185 @@ usercolorcomment=30
+formatmacronames=0
+formatmacrovalues=0
+settingsfile=uidesigner_clean.prj
+settingseditor=1
+settingsdebugger=1
+settingsstorage=1
+settingsprojecttree=0
+settingsautoload=0
+settingsautosave=0
+modulenames=0
+moduletypes=0
+modulefiles=0
+befcommandon=0
+makeoptionson=6
+ 39
+ 3
+ 6
+ 4
+ 39
+ 39
+aftcommandon=0
+unitdirson=7
+ 65568
+ 65543
+ 196615
+ 131079
+ 196615
+ 65543
+ 65543
+macroon=0
+macronames=0
+macrovalues=0
+macrogroup=0
+groupcomments=6
+
+
+
+
+
+
+toolsave=3
+ 0
+ 0
+ 0
+toolhide=3
+ 0
+ 0
+ 0
+toolparse=3
+ 0
+ 0
+ 0
+toolmessages=3
+ 0
+ 0
+ 0
+fontalias=0
+fontancestors=0
+fontheights=0
+fontwidths=0
+fontoptions=0
+fontxscales=0
+expandprojectfilemacros=4
+ 1
+ -1
+ -1
+ -1
+loadprojectfile=4
+ 1
+ 0
+ 0
+ 0
+newinheritedforms=2
+ 0
+ 0
+uid=0
+sourcefilemasks=5
+ "*.pas" "*.dpr" "*.pp" "*.inc" "*.lpr"
+ "*.c" "*.cc" "*.h"
+ "*.mfm"
+ "*.ipf"
+ "*.sql"
+syntaxdeffiles=5
+ ${SYNTAXDEFDIR}pascal_dark.sdef
+ ${SYNTAXDEFDIR}cpp.sdef
+ ${SYNTAXDEFDIR}objecttext.sdef
+ ${SYNTAXDEFDIR}ipf2.sdef
+ ${SYNTAXDEFDIR}sql.sdef
+filemasknames=5
+ Source
+ Forms
+ Text
+ IPF help
+ All Files
+filemasks=5
+ "*.pp" "*.pas" "*.inc" "*.dpr" "*.lpr"
+ *.mfm
+ *.txt
+ *.ipf
+ *
+showgrid=1
+snaptogrid=1
+moveonfirstclick=1
+noformdesignerdocking=0
+gridsizex=8
+gridsizey=8
+autoindent=1
+blockindent=2
+linenumberson=0
+rightmarginon=1
+rightmarginchars=80
+scrollheight=0
+tabstops=2
+spacetabs=1
+showtabs=0
+tabindent=0
+editfontname=Raize
+editfontheight=16
+editfontwidth=0
+editfontextraspace=0
+editfontcolor=-1879048183
+editbkcolor=-1879048186
+statementcolor=14745599
+editfontantialiased=1
+editmarkbrackets=1
+backupfilecount=0
+encoding=0
+codetemplatedirs=1
+ ${TEMPLATEDIR}
+debugcommand=${DEBUGGER}
+debugoptions=
+debugtarget=
+runcommand=
+xtermcommand=xterm -S${PTSN}/${PTSH}
+remoteconnection=
+uploadcommand=
+gdbprocessor=i386
+gdbservercommand=
+gdbservercommandattach=
+beforeconnect=
+afterconnect=
+beforeload=
+afterload=
+beforerun=
+sourcedirs=7
+ ${FPGUI}/src/reportengine/
+ ${FPGUI}/src/corelib/render/software/
+ ${FPGUI}/src/
+ ${FPGUI}/src/corelib/${FPG_GFX}/
+ ${FPGUI}/src/gui/
+ ${FPGUI}/src/corelib/
+ ./
+defines=0
+progparameters=
+progworkingdirectory=
+envvarnames=0
+envvarvalues=0
+defineson=0
stoponexception=0
valuehints=1
activateonbreak=1
+raiseonbreak=1
showconsole=1
externalconsole=0
+settty=1
gdbdownload=0
downloadalways=0
startupbkpt=0
startupbkpton=0
gdbsimulator=0
+gdbserverstartonce=0
gdbserverwait=0
nogdbserverexit=0
+gdbservertty=0
exceptclassnames=1
EconvertError
exceptignore=1
0
-settingsfile=
-settingseditor=0
+nodebugbeginend=0
sigsettings=27
1,1,T,F
3,3,T,F
@@ -308,197 +574,7 @@ sigsettings=27
28,28,T,F
29,29,T,F
30,30,T,F
-modulenames=0
-moduletypes=0
-modulefiles=0
-mainfile=${PROJECTNAME}.lpr
-targetfile=units/${TargetCPU}-${TargetOS}/${PROJECTNAME}${EXEEXT}
-messageoutputfile=
-makecommand=${COMPILER}
-makedir=
-debugcommand=${DEBUGGER}
-debugoptions=
-debugtarget=
-runcommand=
-remoteconnection=
-uploadcommand=
-gdbprocessor=i386
-gdbservercommand=
-gdbservercommandattach=
-beforeload=
-afterload=
-beforerun=
defaultmake=4
-befcommand=0
-befcommandon=0
-aftcommand=0
-aftcommandon=0
-makeoptions=6
- -l -Mobjfpc -Sh
- -gl -O-
- -B
- -O2 -XX -Xs -CX
- -vewinh
- -FEunits/${TargetCPU}-${TargetOS}/
-makeoptionson=6
- 63
- 31
- 34
- 32
- 63
- 63
-macroon=6
- 1
- 3
- 6
- 4
- 63
- 63
-macronames=6
- TargetCPU
- TargetOS
- TargetCPU
- TargetOS
- FPGUI_DIR
- HelpPath
-macrovalues=6
- x86_64
- linux
- i386
- win32
- /home/graemeg/programming/fpgui
- /opt/FPC_Docs/inf/
-macrogroup=0
-groupcomments=6
- Linux 64-bit
- Linux 32-bit
- Windows 32-bit
-
-
-
-sourcedirs=5
- ${FPGUI_DIR}/src/gui/
- ${FPGUI_DIR}/src/corelib/gdi/X/
- ${FPGUI_DIR}/src/corelib/x11/
- ${FPGUI_DIR}/src/corelib/
- ./
-defines=0
-defineson=0
-unitdirs=6
- ${FPGUI_DIR}/lib/${TargetCPU}-${TargetOS}/
- ${FPGUI_DIR}/
- ${FPGUI_DIR}/src/corelib/gdi/
- ${FPGUI_DIR}/src/corelib/x11/
- ${FPGUI_DIR}/src/gui/
- ${FPGUI_DIR}/src/corelib/
-unitdirson=6
- 65539
- 131100
- 196616
- 196612
- 65564
- 65564
-unitpref=-Fu
-incpref=-Fi
-libpref=-Fl
-objpref=-Fo
-targpref=-o
-sourcefilemasks=5
- "*.pas" "*.dpr" "*.pp" "*.inc" "*.lpr"
- "*.c" "*.cc" "*.h"
- "*.mfm"
- "*.ipf"
- "*.sql"
-syntaxdeffiles=5
- ${SYNTAXDEFDIR}pascal_dark.sdef
- ${SYNTAXDEFDIR}cpp.sdef
- ${SYNTAXDEFDIR}objecttext.sdef
- ${SYNTAXDEFDIR}ipf2.sdef
- ${SYNTAXDEFDIR}sql.sdef
-filemasknames=5
- Source
- Forms
- Text
- IPF help
- All Files
-filemasks=5
- "*.pp" "*.pas" "*.inc" "*.dpr" "*.lpr"
- *.mfm
- *.txt
- *.ipf
- *
-toolsave=1
- 0
-toolhide=1
- 0
-toolparse=1
- 0
-toolmenus=1
- fpGUI &DocView
-toolfiles=1
- /home/graemeg/bin/docview
-toolparams=1
- FPCHELP -k ${cursword}
-fontalias=0
-fontancestors=0
-fontnames=0
-fontheights=0
-fontwidths=0
-fontoptions=0
-fontxscales=0
-scriptbeforecopy=
-scriptaftercopy=
-newprojectfiles=4
- ${TEMPLATEDIR}/fpgui_single_unit/project.pas
- ${TEMPLATEDIR}fpgui/units/i386-linux/placeholder.txt
- ${TEMPLATEDIR}fpgui/units/i386-win32/placeholder.txt
- ${TEMPLATEDIR}fpgui/units/x86_64-linux/placeholder.txt
-newprojectfilesdest=4
- ${%PROJECTNAME%}.pas
- ${%PROJECTDIR%}units/i386-linux/placeholder.txt
- ${%PROJECTDIR%}units/i386-win32/placeholder.txt
- ${%PROJECTDIR%}units/x86_64-linux/placeholder.txt
-expandprojectfilemacros=4
- 1
- -1
- -1
- -1
-loadprojectfile=4
- 1
- 0
- 0
- 0
-newfinames=3
- Program
- Unit
- Textfile
-newfinfilters=3
- "*.pas" "*.pp"
- "*.pas" "*.pp"
-
-newfiexts=3
- pas
- pas
-
-newfisources=3
- ${TEMPLATEDIR}default/program.pas
- ${TEMPLATEDIR}default/unit.pas
-
-newfonames=2
- Mainform
- Simple Form
-newfonamebases=2
-
-
-newinheritedforms=2
- 0
- 0
-newfosources=2
- ${TEMPLATEDIR}fpgui/mainform.pas
- ${TEMPLATEDIR}fpgui/simpleform.pas
-newfoforms=2
-
-
[breakpoints]
on=0
path=0
@@ -511,126 +587,171 @@ panels=1
panel1
units=
(
- modulefilenames=0
- modulenames=0
- moduleclassnames=0
- a=0,4149,0,Pascal Units
- c=16
- (
- file=/home/graemeg/programming/fpgui/uidesigner/anchors.inc
- kind=1
- a=0,4100,0,anchors.inc
- )
- (
- file=/home/graemeg/programming/fpgui/uidesigner/icons.inc
- kind=1
- a=0,4100,0,icons.inc
- )
- (
- file=/home/graemeg/programming/fpgui/uidesigner/newformdesigner.pas
- kind=1
- a=0,4100,0,newformdesigner.pas
- )
- (
- file=/home/graemeg/programming/fpgui/uidesigner/uidesigner.lpr
- kind=1
- a=0,4100,0,uidesigner.lpr
- )
- (
- file=/home/graemeg/programming/fpgui/uidesigner/vfddesigner.pas
- kind=1
- a=0,4100,0,vfddesigner.pas
- )
- (
- file=/home/graemeg/programming/fpgui/uidesigner/vfdeditors.pas
- kind=1
- a=0,4100,0,vfdeditors.pas
- )
- (
- file=/home/graemeg/programming/fpgui/uidesigner/vfdfile.pas
- kind=1
- a=0,4100,0,vfdfile.pas
- )
- (
- file=/home/graemeg/programming/fpgui/uidesigner/vfdformparser.pas
- kind=1
- a=0,4100,0,vfdformparser.pas
- )
- (
- file=/home/graemeg/programming/fpgui/uidesigner/vfdforms.pas
- kind=1
- a=0,4100,0,vfdforms.pas
- )
- (
- file=/home/graemeg/programming/fpgui/uidesigner/vfdmain.pas
- kind=1
- a=0,4100,0,vfdmain.pas
- )
- (
- file=/home/graemeg/programming/fpgui/uidesigner/vfdpropeditgrid.pas
- kind=1
- a=0,4100,0,vfdpropeditgrid.pas
- )
- (
- file=/home/graemeg/programming/fpgui/uidesigner/vfdprops.pas
- kind=1
- a=0,4100,0,vfdprops.pas
- )
- (
- file=/home/graemeg/programming/fpgui/uidesigner/vfdresizer.pas
- kind=1
- a=0,4100,0,vfdresizer.pas
- )
- (
- file=/home/graemeg/programming/fpgui/uidesigner/vfdutils.pas
- kind=1
- a=0,4100,0,vfdutils.pas
- )
- (
- file=/home/graemeg/programming/fpgui/uidesigner/vfdwidgetclass.pas
- kind=1
- a=0,4100,0,vfdwidgetclass.pas
- )
- (
- file=/home/graemeg/programming/fpgui/uidesigner/vfdwidgets.pas
- kind=1
- a=0,4100,0,vfdwidgets.pas
- )
+ a=0,4133,6,Pascal Units
)
cmodules=
(
- a=0,4132,0,C Modules
+ a=0,4132,6,C Modules
)
files=
(
- a=0,4149,0,Text Files
- c=1
- (
- file=/home/graemeg/programming/fpgui/uidesigner/extrafpc.cfg
- kind=1
- a=0,4100,0,extrafpc.cfg
- )
+ a=0,4133,6,Text Files
)
[componentstore]
-storedir=/opt/msegui/apps/ide/compstore/
+storedir=/data/devel/msegui/apps/ide/compstore/
filename=
+[components]
+[selecteditpage]
+colwidth=100
+x=160
+y=124
+cx=704
+cy=473
+[progparams]
+progparamhistory=0
+envvarons=0
+[edit]
+hintwidth=462
+hintheight=214
+finddtext=fpg_dialog
+findhistory=9
+ fpg_dialog
+ fpgSetNamedFont(
+ res=
+ 30005
+ NewView
+ images
+ Sort
+ sort
+ uses
+findoptions=1
+editpos=14
+ 0,-1073741823
+ 0,-1073741823
+ 0,-1073741823
+ 0,-1073741823
+ 0,-1073741823
+ 0,-1073741823
+ 0,-1073741823
+ 0,-1073741823
+ 0,-1073741823
+ 6,27
+ 0,-1073741823
+ 0,-1073741823
+ 0,-1073741823
+ 0,-1073741823
+bookmarks0=0
+bookmarks1=0
+bookmarks2=0
+bookmarks3=0
+bookmarks4=0
+bookmarks5=0
+bookmarks6=0
+bookmarks7=0
+bookmarks8=0
+bookmarks9=0
+bookmarks10=1
+ 568,1
+bookmarks11=0
+bookmarks12=0
+bookmarks13=0
+sourcefiles=14
+ /home/graemeg/programming/fpgui/uidesigner/vfdforms.pas
+ /home/graemeg/programming/fpgui/uidesigner/vfdwidgets.pas
+ /home/graemeg/programming/fpgui/uidesigner/vfdmain.pas
+ /home/graemeg/programming/fpgui/uidesigner/newformdesigner.pas
+ /data/devel/fpgui/uidesigner/vfddesigner.pas
+ /data/devel/fpgui/src/gui/fpg_dialogs.pas
+ /data/devel/fpgui/src/corelib/fpg_base.pas
+ /data/devel/fpgui/src/corelib/fpg_main.pas
+ /data/devel/fpgui/src/gui/fpg_menu.pas
+ /data/devel/fpgui/uidesigner/uidesigner.lpr
+ /data/devel/fpgui/src/gui/messagedialog.inc
+ /data/devel/fpgui/src/corelib/fpg_stdimages.pas
+ /data/devel/fpgui/src/corelib/stdimages.inc
+ /data/devel/fpgui/src/corelib/fpg_imgfmt_png.pas
+relpaths=14
+ vfdforms.pas
+ vfdwidgets.pas
+ vfdmain.pas
+ newformdesigner.pas
+ vfddesigner.pas
+ ../src/gui/fpg_dialogs.pas
+ ../src/corelib/fpg_base.pas
+ ../src/corelib/fpg_main.pas
+ ../src/gui/fpg_menu.pas
+ uidesigner.lpr
+ ../src/gui/messagedialog.inc
+ ../src/corelib/fpg_stdimages.pas
+ ../src/corelib/stdimages.inc
+ ../src/corelib/fpg_imgfmt_png.pas
+ismoduletexts=14
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+modules=0
+moduleoptions=0
+visiblemodules=0
+nomenumodules=0
+[sourcefo.tabwidget]
+order=14
+ 0
+ 1
+ 2
+ 3
+ 4
+ 6
+ 7
+ 11
+ 12
+ 5
+ 13
+ 10
+ 8
+ 9
+tabsize=152
+firsttab=0
+index=13
[layout]
-windowlayout=539
+windowlayout=543
+ [mainfo.openform]
+ filenames=1
+ /data/devel/msegui/apps/ide/componentpaletteform.mfm
+ filehistory=1
+ /data/devel/msegui/apps/ide/componentpaletteform.mfm
+ filefilterindex=0
+ filefilter=*.mfm
+ filecolwidth=174
+ x=0
+ y=0
+ cx=0
+ cy=0
[mainfo.projectfiledia]
filenames=1
- /home/graemeg/programming/MasterMaths/m2_system/Source/tools/script_runner/sqleditor.prj
- lastdir=/home/graemeg/programming/MasterMaths/m2_system/Source/tools/script_runner/
+ /data/devel/fpgui/uidesigner/uidesigner_clean.prj
+ lastdir=/data/devel/fpgui/uidesigner/
filehistory=10
- /home/graemeg/programming/MasterMaths/m2_system/Source/tools/script_runner/sqleditor.prj
- /home/graemeg/programming/fpgui/uidesigner/uidesigner.prj
- /home/graemeg/programming/MasterMaths/m2_system/Source/tutoradmin/tutoradmin.prj
- /opt/git/fpgui_opengl.git/examples/corelib/helloworld/helloworld.prj
- /home/graemeg/programming/tests/gridspeed/fpgui/test.prj
- /home/graemeg/programming/tests/gridspeed/fpgui/columns/test.prj
- /home/graemeg/programming/fpgui/docview/src/docview.prj
- /home/graemeg/programming/MasterMaths/m2_system/Source/tutoradmin/tutoradmin_clean.prj
- /home/graemeg/programming/tests/dndtest4/project1.prj
- /home/graemeg/programming/tests/gridspeed/msegui/test.prj
+ /data/devel/fpgui/uidesigner/uidesigner_clean.prj
+ /data/devel/fpgui/uidesigner/uidesigner.prj
+ /data/devel/opensource/mseuniverse/tools/msegit/msegit.prj
+ /data/devel/QTS/csvimporter/src/csvimporter.prj
+ /data/devel/MasterMaths/m2_system/Source/tools/script_runner/sqleditor_clean.prj
+ /data/devel/MasterMaths/m2_system/Source/tutoradmin/tutoradmin.prj
+ /data/devel/msegui/apps/facedemo/facedemo.prj
+ /data/devel/opensoft/bugcollector/src/bugcollector.prj
+ /data/devel/msegui/apps/ide/mseide_gg.prj
+ /data/devel/msegui/apps/ide/mseide.prj
filefilterindex=0
filefilter=*.prj
filecolwidth=174
@@ -641,6 +762,9 @@ windowlayout=539
[mainfo.openfile]
filenames=0
filehistory=10
+ /data/devel/fpgui/src/gui/messagedialog.inc
+ /data/devel/fpgui/src/gui/fpg_style.pas
+ /data/devel/fpgui/src/gui/colordialog.inc
/home/graemeg/programming/fpgui/docview/docs/docview.ipf
/home/graemeg/kylix3/examples/delphi/threads/SortThds.pas
/home/graemeg/kylix3/source/clx/QComCtrls.pas
@@ -648,9 +772,6 @@ windowlayout=539
/home/graemeg/programming/fpgui/src/gui/fpg_tree.pas
/home/graemeg/programming/fpgui/uidesigner/tests/test_widget_order.pas
/opt/msegui_svn/apps/ide/sourcepage.pas
- /home/graemeg/programming/fpgui/uidesigner/extrafpc.cfg
- /home/graemeg/programming/fpgui/uidesigner/uidesigner.lpr
- /home/mse/proj/msegui/testcase/jean-pierre/Demo/main.pas
filefilterindex=4
filefilter="*.pp" "*.pas" "*.inc" "*.dpr" "*.lpr"
filecolwidth=174
@@ -663,7 +784,7 @@ windowlayout=539
useroptions=15488
[mainfo]
splitdir=0
- useroptions=33554559
+ useroptions=33554555
stackedunder=
parent=
mdistate=0
@@ -671,15 +792,12 @@ windowlayout=539
ny=0
ncx=0
ncy=0
- x=27
- y=52
- cx=1086
- cy=809
+ x=384
+ y=49
+ cx=1266
+ cy=1250
rcx=0
rcy=0
- children=2
- container,0,17,1076,792
- ,0,0,1076,17
wsize=0
active=1
visible=1
@@ -710,10 +828,10 @@ windowlayout=539
ny=0
ncx=0
ncy=0
- x=37
- y=270
- cx=349
- cy=276
+ x=0
+ y=0
+ cx=0
+ cy=0
rcx=0
rcy=0
wsize=0
@@ -722,7 +840,7 @@ windowlayout=539
[memoryfo]
splitdir=0
useroptions=16507
- stackedunder=threadsfo
+ stackedunder=cpui386fo
parent=
mdistate=0
nx=0
@@ -768,15 +886,15 @@ windowlayout=539
[findinfilefo]
splitdir=0
useroptions=16491
- stackedunder=componentstorefo
+ stackedunder=mainfo
parent=
mdistate=0
nx=0
ny=0
ncx=0
ncy=0
- x=239
- y=115
+ x=1700
+ y=107
cx=678
cy=414
rcx=0
@@ -785,7 +903,7 @@ windowlayout=539
splitdir=0
useroptions=49259
parent=mainfo.panel1.container
- visible=1
+ visible=0
mdistate=0
nx=0
ny=0
@@ -794,32 +912,32 @@ windowlayout=539
x=0
y=0
cx=205
- cy=604
- rcx=0
- rcy=0
+ cy=987
+ rcx=1246
+ rcy=987
[projecttreefo.grid]
propcolwidthref=35
width0=170
- sortdescent0=0
+ sortdescend0=0
width1=29
- sortdescent1=0
+ sortdescend1=0
sorted=0
col=0
- row=9
- rowheight=17
+ row=1
+ rowheight=16
[stackfo]
splitdir=0
- useroptions=16489
+ useroptions=24681
parent=
mdistate=0
nx=0
ny=0
ncx=0
ncy=0
- x=407
- y=349
- cx=254
- cy=180
+ x=0
+ y=0
+ cx=0
+ cy=0
rcx=0
rcy=0
wsize=0
@@ -845,28 +963,27 @@ windowlayout=539
visible=0
[watchpointsfo.grid]
propcolwidthref=352
- width0=16
- sortdescent0=0
+ sortdescend0=0
values1=0
values1_ci=-1
width1=33
- sortdescent1=0
+ sortdescend1=0
values2=0
width2=158
- sortdescent2=0
+ sortdescend2=0
width4=34
- sortdescent4=0
+ sortdescend4=0
values5=0
values5_ci=-1
width5=38
- sortdescent5=0
+ sortdescend5=0
values6=0
width6=184
- sortdescent6=0
+ sortdescend6=0
[breakpointsfo]
splitdir=0
useroptions=16491
- stackedunder=watchpointsfo
+ stackedunder=componentpalettefo
parent=
mdistate=0
nx=0
@@ -906,13 +1023,13 @@ windowlayout=539
[objectinspectorfo.grid]
propcolwidthref=306
width0=73
- sortdescent0=0
+ sortdescend0=0
width1=227
- sortdescent1=0
+ sortdescend1=0
[symbolfo]
splitdir=0
- useroptions=16511
- stackedunder=findinfilefo
+ useroptions=16507
+ stackedunder=breakpointsfo
parent=
mdistate=0
nx=0
@@ -925,8 +1042,6 @@ windowlayout=539
cy=137
rcx=0
rcy=0
- children=1
- container,0,0,351,137
wsize=0
active=0
visible=0
@@ -934,9 +1049,9 @@ windowlayout=539
propcolwidthref=222
values0=0
width0=111
- sortdescent0=0
+ sortdescend0=0
width1=135
- sortdescent1=0
+ sortdescend1=0
[symbolfo.symbol]
[watchfo]
splitdir=0
@@ -952,33 +1067,31 @@ windowlayout=539
y=0
cx=247
cy=44
- rcx=1235
- rcy=782
+ rcx=1256
+ rcy=1214
[watchfo.grid]
propcolwidthref=123
values0=2
-1
-1
values0_ci=-1
- width0=13
- sortdescent0=0
+ sortdescend0=0
values1=2
po2^
test
width1=66
- sortdescent1=0
+ sortdescend1=0
values3=2
0
0
values3_ci=-1
- width3=12
- sortdescent3=0
+ sortdescend3=0
values4=2
0
0
values4_ci=-1
width4=13
- sortdescent4=0
+ sortdescend4=0
[watchfo.watchon]
[watchfo.expression]
[watchfo.watcheson]
@@ -994,14 +1107,14 @@ windowlayout=539
ncx=0
ncy=0
x=0
- y=641
- cx=1076
- cy=130
+ y=1025
+ cx=1256
+ cy=189
rcx=0
rcy=0
[componentstorefo]
splitdir=0
- useroptions=24675
+ useroptions=24699
stackedunder=memoryfo
parent=
mdistate=0
@@ -1021,12 +1134,12 @@ windowlayout=539
[componentstorefo.grid]
propcolwidthref=435
width0=111
- sortdescent0=0
- sortdescent1=0
+ sortdescend0=0
+ sortdescend1=0
width2=160
- sortdescent2=0
+ sortdescend2=0
width3=185
- sortdescent3=0
+ sortdescend3=0
[componentstorefo.storefiledialog]
filenames=1
/home/mse/test/msegui/apps/ide/compstore/
@@ -1065,7 +1178,7 @@ windowlayout=539
[componentpalettefo]
splitdir=0
useroptions=24683
- stackedunder=disassfo
+ stackedunder=componentstorefo
parent=
mdistate=0
nx=0
@@ -1095,8 +1208,8 @@ windowlayout=539
ncy=0
x=0
y=0
- cx=1076
- cy=31
+ cx=1256
+ cy=32
rcx=0
rcy=0
[sourcefo]
@@ -1109,10 +1222,10 @@ windowlayout=539
ny=0
ncx=0
ncy=0
- x=208
+ x=0
y=0
- cx=868
- cy=604
+ cx=1256
+ cy=987
rcx=0
rcy=0
[actionsmo.watchesonact]
@@ -1130,16 +1243,16 @@ windowlayout=539
ncx=0
ncy=0
x=0
- y=34
- cx=1076
- cy=604
+ y=35
+ cx=1256
+ cy=987
rcx=0
rcy=0
[cpui386fo]
irqoff=0
splitdir=0
useroptions=16491
- stackedunder=mainfo
+ stackedunder=findinfilefo
parent=
mdistate=0
nx=0
@@ -1155,65 +1268,7 @@ windowlayout=539
wsize=0
active=0
visible=0
-[edit]
-hintwidth=462
-hintheight=214
-finddtext=res=
-findhistory=7
- res=
- 30005
- NewView
- images
- Sort
- sort
- uses
+[targetconsole]
+finddtext=
+findhistory=0
findoptions=1
-editpos=5
- 0,-1073741823
- 0,-1073741823
- 0,-1073741823
- 0,-1073741823
- 23,73
-bookmarks0=0
-bookmarks1=0
-bookmarks2=0
-bookmarks3=0
-bookmarks4=0
-sourcefiles=5
- /home/graemeg/programming/fpgui/uidesigner/vfdforms.pas
- /home/graemeg/programming/fpgui/uidesigner/vfdwidgets.pas
- /home/graemeg/programming/fpgui/uidesigner/vfdmain.pas
- /home/graemeg/programming/fpgui/uidesigner/newformdesigner.pas
- /home/graemeg/programming/fpgui/uidesigner/vfddesigner.pas
-relpaths=5
- vfdforms.pas
- vfdwidgets.pas
- vfdmain.pas
- newformdesigner.pas
- vfddesigner.pas
-ismoduletexts=5
- 0
- 0
- 0
- 0
- 0
-modules=0
-visiblemodules=0
-[sourcefo.tabwidget]
-tabsize=152
-firsttab=0
-index=4
-[components]
-[selecteditpage]
-colwidth=100
-x=160
-y=124
-cx=704
-cy=473
-[progparams]
-parameters=
-progparamhistory=0
-workingdirectory=
-envvarons=0
-envvarnames=0
-envvarvalues=0
diff --git a/uidesigner/uidesigner_clean.prj b/uidesigner/uidesigner_clean.prj
new file mode 100644
index 00000000..bb71809f
--- /dev/null
+++ b/uidesigner/uidesigner_clean.prj
@@ -0,0 +1,361 @@
+[projectoptions]
+mainfile=${PROJECTNAME}.lpr
+targetfile=units/${TARGET}/${PROJECTNAME}${EXEEXT}
+messageoutputfile=
+makecommand=${COMPILER}
+makedir=
+unitdirs=7
+ ${FPGUI}/lib/${TARGET}
+ ${FPGUI}/src/reportengine
+ ${FPGUI}/src/corelib/render/software
+ ${FPGUI}/src
+ ${FPGUI}/src/corelib/${FPG_GFX}
+ ${FPGUI}/src/gui
+ ${FPGUI}/src/corelib
+unitpref=-Fu
+incpref=-Fi
+libpref=-Fl
+objpref=-Fo
+targpref=-o
+befcommand=0
+aftcommand=0
+makeoptions=6
+ -l -Mobjfpc -Sh
+ -gl -O-
+ -B
+ -O2 -XX -Xs -CX
+ -vewinh
+ -FEunits/${TARGET}/
+codetemplatedirs=1
+ ${TEMPLATEDIR}
+toolmenus=3
+ fpGUI &DocView
+ UI Designer
+ Image Converter
+toolfiles=3
+ ${FPGUI}/docview/src/units/${TARGET}/docview${EXEEXT}
+ ${FPGUI}/uidesigner/units/${TARGET}/uidesigner${EXEEXT}
+ ${FPGUI}/tools/imageconvert/imgcnv${EXEEXT}
+toolparams=3
+ fpgui+rtl+fcl -k ${cursword}
+ ${CURSOURCEFILE}
+
+fontnames=0
+scriptbeforecopy=
+scriptaftercopy=
+newprojectfiles=4
+ ${TEMPLATEDIR}/fpgui_single_unit/project.pas
+ ${TEMPLATEDIR}fpgui/units/i386-linux/placeholder.txt
+ ${TEMPLATEDIR}fpgui/units/i386-win32/placeholder.txt
+ ${TEMPLATEDIR}fpgui/units/x86_64-linux/placeholder.txt
+newprojectfilesdest=4
+ ${%PROJECTNAME%}.pas
+ ${%PROJECTDIR%}units/i386-linux/placeholder.txt
+ ${%PROJECTDIR%}units/i386-win32/placeholder.txt
+ ${%PROJECTDIR%}units/x86_64-linux/placeholder.txt
+newfinames=3
+ Program
+ Unit
+ Textfile
+newfifilters=3
+ "*.pas" "*.pp"
+ "*.pas" "*.pp"
+
+newfiexts=3
+ pas
+ pas
+
+newfisources=3
+ ${TEMPLATEDIR}default/program.pas
+ ${TEMPLATEDIR}default/unit.pas
+
+newfonames=2
+ Mainform
+ Simple Form
+newfonamebases=2
+
+
+newfosources=2
+ ${TEMPLATEDIR}fpgui/mainform.pas
+ ${TEMPLATEDIR}fpgui/simpleform.pas
+newfoforms=2
+
+
+forcezorder=0
+stripmessageesc=0
+copymessages=0
+closemessages=0
+checkmethods=1
+colorerror=-1610612712
+colorwarning=-1610612717
+colornote=-1610612716
+usercolors=30
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+usercolorcomment=30
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+formatmacronames=0
+formatmacrovalues=0
+settingsfile=uidesigner_clean.prj
+settingseditor=1
+settingsdebugger=1
+settingsstorage=1
+settingsprojecttree=0
+settingsautoload=0
+settingsautosave=0
+modulenames=0
+moduletypes=0
+modulefiles=0
+befcommandon=0
+makeoptionson=6
+ 39
+ 3
+ 6
+ 4
+ 39
+ 39
+aftcommandon=0
+unitdirson=7
+ 65568
+ 65543
+ 196615
+ 131079
+ 196615
+ 65543
+ 65543
+macroon=0
+macronames=0
+macrovalues=0
+macrogroup=0
+groupcomments=6
+
+
+
+
+
+
+toolsave=3
+ 0
+ 0
+ 0
+toolhide=3
+ 0
+ 0
+ 0
+toolparse=3
+ 0
+ 0
+ 0
+toolmessages=3
+ 0
+ 0
+ 0
+fontalias=0
+fontancestors=0
+fontheights=0
+fontwidths=0
+fontoptions=0
+fontxscales=0
+expandprojectfilemacros=4
+ 1
+ -1
+ -1
+ -1
+loadprojectfile=4
+ 1
+ 0
+ 0
+ 0
+newinheritedforms=2
+ 0
+ 0
+uid=0
+sourcefilemasks=5
+ "*.pas" "*.dpr" "*.pp" "*.inc" "*.lpr"
+ "*.c" "*.cc" "*.h"
+ "*.mfm"
+ "*.ipf"
+ "*.sql"
+syntaxdeffiles=5
+ ${SYNTAXDEFDIR}pascal_dark.sdef
+ ${SYNTAXDEFDIR}cpp.sdef
+ ${SYNTAXDEFDIR}objecttext.sdef
+ ${SYNTAXDEFDIR}ipf2.sdef
+ ${SYNTAXDEFDIR}sql.sdef
+filemasknames=5
+ Source
+ Forms
+ Text
+ IPF help
+ All Files
+filemasks=5
+ "*.pp" "*.pas" "*.inc" "*.dpr" "*.lpr"
+ *.mfm
+ *.txt
+ *.ipf
+ *
+showgrid=1
+snaptogrid=1
+moveonfirstclick=1
+noformdesignerdocking=0
+gridsizex=8
+gridsizey=8
+autoindent=1
+blockindent=2
+linenumberson=0
+rightmarginon=1
+rightmarginchars=80
+scrollheight=0
+tabstops=2
+spacetabs=1
+showtabs=0
+tabindent=0
+editfontname=Raize
+editfontheight=16
+editfontwidth=0
+editfontextraspace=0
+editfontcolor=-1879048183
+editbkcolor=-1879048186
+statementcolor=14745599
+editfontantialiased=1
+editmarkbrackets=1
+backupfilecount=0
+encoding=0
+codetemplatedirs=1
+ ${TEMPLATEDIR}
+debugcommand=${DEBUGGER}
+debugoptions=
+debugtarget=
+runcommand=
+xtermcommand=xterm -S${PTSN}/${PTSH}
+remoteconnection=
+uploadcommand=
+gdbprocessor=i386
+gdbservercommand=
+gdbservercommandattach=
+beforeconnect=
+afterconnect=
+beforeload=
+afterload=
+beforerun=
+sourcedirs=7
+ ${FPGUI}/src/reportengine/
+ ${FPGUI}/src/corelib/render/software/
+ ${FPGUI}/src/
+ ${FPGUI}/src/corelib/${FPG_GFX}/
+ ${FPGUI}/src/gui/
+ ${FPGUI}/src/corelib/
+ ./
+defines=0
+progparameters=
+progworkingdirectory=
+envvarnames=0
+envvarvalues=0
+defineson=0
+stoponexception=0
+valuehints=1
+activateonbreak=1
+raiseonbreak=1
+showconsole=1
+externalconsole=0
+settty=1
+gdbdownload=0
+downloadalways=0
+startupbkpt=0
+startupbkpton=0
+gdbsimulator=0
+gdbserverstartonce=0
+gdbserverwait=0
+nogdbserverexit=0
+gdbservertty=0
+exceptclassnames=1
+ EconvertError
+exceptignore=1
+ 0
+nodebugbeginend=0
+sigsettings=27
+ 1,1,T,F
+ 3,3,T,F
+ 4,4,T,F
+ 6,6,T,F
+ 7,7,T,F
+ 8,8,T,F
+ 9,9,T,F
+ 10,10,T,F
+ 11,11,T,F
+ 12,12,T,F
+ 13,13,T,F
+ 15,15,T,F
+ 16,16,T,F
+ 17,17,F,F
+ 18,18,T,F
+ 19,19,T,F
+ 20,20,T,F
+ 21,21,T,F
+ 22,22,T,F
+ 23,23,T,F
+ 24,24,T,F
+ 25,25,T,F
+ 26,26,T,F
+ 27,27,T,F
+ 28,28,T,F
+ 29,29,T,F
+ 30,30,T,F
+defaultmake=4
diff --git a/uidesigner/units/i386-freebsd/.gitignore b/uidesigner/units/i386-freebsd/.gitignore
new file mode 100644
index 00000000..72e8ffc0
--- /dev/null
+++ b/uidesigner/units/i386-freebsd/.gitignore
@@ -0,0 +1 @@
+*
diff --git a/uidesigner/units/i386-linux/.gitignore b/uidesigner/units/i386-linux/.gitignore
new file mode 100644
index 00000000..72e8ffc0
--- /dev/null
+++ b/uidesigner/units/i386-linux/.gitignore
@@ -0,0 +1 @@
+*
diff --git a/uidesigner/units/i386-win32/.gitignore b/uidesigner/units/i386-win32/.gitignore
new file mode 100644
index 00000000..72e8ffc0
--- /dev/null
+++ b/uidesigner/units/i386-win32/.gitignore
@@ -0,0 +1 @@
+*
diff --git a/uidesigner/units/x86_64-freebsd/.gitignore b/uidesigner/units/x86_64-freebsd/.gitignore
new file mode 100644
index 00000000..72e8ffc0
--- /dev/null
+++ b/uidesigner/units/x86_64-freebsd/.gitignore
@@ -0,0 +1 @@
+*
diff --git a/uidesigner/units/x86_64-linux/.gitignore b/uidesigner/units/x86_64-linux/.gitignore
new file mode 100644
index 00000000..72e8ffc0
--- /dev/null
+++ b/uidesigner/units/x86_64-linux/.gitignore
@@ -0,0 +1 @@
+*
diff --git a/uidesigner/vfddesigner.pas b/uidesigner/vfddesigner.pas
index 70757ba4..a3b60597 100644
--- a/uidesigner/vfddesigner.pas
+++ b/uidesigner/vfddesigner.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -59,8 +59,15 @@ type
TDesignedForm = class(TfpgForm)
+ private
+ FShowGrid: boolean;
+ procedure SetShowGrid(AValue: boolean);
+ protected
+ procedure HandlePaint; override;
public
+ constructor Create(AOwner: TComponent); override;
procedure AfterCreate; override;
+ property ShowGrid: boolean read FShowGrid write SetShowGrid;
end;
@@ -74,11 +81,12 @@ type
FSelected: boolean;
resizer: array[1..8] of TwgResizer;
other: TStringList;
+ MarkForDeletion: Boolean;
constructor Create(AFormDesigner: TFormDesigner; wg: TfpgWidget; wgc: TVFDWidgetClass);
destructor Destroy; override;
+ procedure UpdateResizerPositions;
property Selected: boolean read FSelected write SetSelected;
property Widget: TfpgWidget read FWidget;
- procedure UpdateResizerPositions;
property FormDesigner: TFormDesigner read FFormDesigner;
end;
@@ -88,7 +96,7 @@ type
FOneClickMove: boolean;
protected
FWidgets: TList;
- FForm: TfpgForm;
+ FForm: TDesignedForm;
FFormOther: string;
FDragging: boolean;
FDragPosX,
@@ -134,7 +142,7 @@ type
function GetWidgetSourceImpl(wd: TWidgetDesigner; ident: string): string;
// The widgets can be selected and dragged within one click
property OneClickMove: boolean read FOneClickMove write FOneClickMove;
- property Form: TfpgForm read FForm;
+ property Form: TDesignedForm read FForm;
property FormOther: string read FFormOther write FFormOther;
end;
@@ -198,6 +206,7 @@ begin
FSelected := False;
wg.MouseCursor := mcDefault;
other := TStringList.Create;
+ MarkForDeletion := False;
end;
destructor TWidgetDesigner.Destroy;
@@ -623,20 +632,44 @@ procedure TFormDesigner.DeleteWidgets;
var
n: integer;
cd: TWidgetDesigner;
+
+ procedure DeleteChildWidget(ADesignWidget: TWidgetDesigner);
+ var
+ i: integer;
+ begin
+ if not Assigned(ADesignWidget.Widget) then // safety check
+ Exit;
+ if ADesignWidget.Widget.IsContainer and (ADesignWidget.Widget.ComponentCount > 0) then
+ begin
+ for i := ADesignWidget.Widget.ComponentCount - 1 downto 0 do
+ DeleteChildWidget(WidgetDesigner(TfpgWidget(ADesignWidget.Widget.Components[i])));
+ end;
+ ADesignWidget.MarkForDeletion := True;
+ end;
+
begin
n := 0;
+ // Pass 1: Mark widgets and children than need deletion
while n < FWidgets.Count do
begin
cd := TWidgetDesigner(FWidgets.Items[n]);
if cd.Selected then
+ DeleteChildWidget(cd);
+ Inc(n);
+ end;
+
+ // Pass 2: free TWidgetDesigner instances that have no more Widget instances
+ for n := FWidgets.Count-1 downto 0 do
+ begin
+ cd := TWidgetDesigner(FWidgets.Items[n]);
+ if cd.MarkForDeletion then
begin
cd.Widget.Free;
cd.Free;
FWidgets.Delete(n);
- end
- else
- Inc(n);
+ end;
end;
+
UpdatePropWin;
end;
@@ -676,7 +709,7 @@ var
begin
frm := TWidgetOrderForm.Create(nil);
frm.WindowTitle := cEditOrder[AMode];
- frm.Title := cEditOrder[AMode];
+ frm.Title := maindsgn.selectedform.Form.Name;
frm.Treeview1.RootNode.Clear;
lFocused := nil;
@@ -1178,6 +1211,14 @@ begin
s := s + Ind(1) + 'Hint := ' + QuotedStr(t) + ';' + LineEnding;
end;
+ // IconName property - This is ugly, Form's properties are not handled well!!
+ PropInfo := GetPropInfo(FForm.ClassType, 'IconName');
+ t := GetStrProp(FForm, 'IconName');
+ if IsStoredProp(FForm, PropInfo) then
+ begin
+ s := s + Ind(1) + 'IconName := ' + QuotedStr(t) + ';' + LineEnding;
+ end;
+
// ShowHint property - This is ugly, Form's properties are not handled well!!
PropInfo := GetPropInfo(FForm.ClassType, 'ShowHint');
i := GetOrdProp(FForm, 'ShowHint');
@@ -1466,6 +1507,51 @@ end;
{ TDesignedForm }
+procedure TDesignedForm.SetShowGrid(AValue: boolean);
+begin
+ if FShowGrid = AValue then
+ Exit;
+ FShowGrid := AValue;
+ Invalidate;
+end;
+
+procedure TDesignedForm.HandlePaint;
+var
+ i: integer;
+begin
+ inherited HandlePaint;
+ if FShowGrid then
+ begin
+ Canvas.Clear(TfpgColor($ff3e85cd));
+ // horizontal lines
+ for i := 0 to Height-1 do
+ begin
+ if i mod 50 = 0 then
+ Canvas.SetColor(TfpgColor($ff5492d0))
+ else
+ Canvas.SetColor(TfpgColor($ff488bcf));
+ if i mod 10 = 0 then
+ Canvas.DrawLine(0, i, Width-1, i);
+ end;
+ // vertical lines
+ for i := 0 to Width-1 do
+ begin
+ if i mod 50 = 0 then
+ Canvas.SetColor(TfpgColor($ff5492d0))
+ else
+ Canvas.SetColor(TfpgColor($ff488bcf));
+ if i mod 10 = 0 then
+ Canvas.DrawLine(i, 0, i, Height-1);
+ end;
+ end;
+end;
+
+constructor TDesignedForm.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FShowGrid := False;
+end;
+
procedure TDesignedForm.AfterCreate;
begin
inherited AfterCreate;
diff --git a/uidesigner/vfdforms.pas b/uidesigner/vfdforms.pas
index 9d9b42bd..d7558bac 100644
--- a/uidesigner/vfdforms.pas
+++ b/uidesigner/vfdforms.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -128,7 +128,6 @@ type
public
{@VFD_HEAD_BEGIN: frmVFDSetup}
lb1: TfpgLabel;
- chlGrid: TfpgComboBox;
btnOK: TfpgButton;
btnCancel: TfpgButton;
lblRecentFiles: TfpgLabel;
@@ -144,6 +143,7 @@ type
chkCodeRegions: TfpgCheckBox;
cbIndentationType: TfpgComboBox;
lblIndentType: TfpgLabel;
+ edtGridX: TfpgEditInteger;
{@VFD_HEAD_END: frmVFDSetup}
procedure AfterCreate; override;
procedure BeforeDestruction; override;
@@ -292,8 +292,6 @@ end;
procedure TWidgetOrderForm.SetupCaptions;
begin
inherited SetupCaptions;
- WindowTitle := rsDlgWidgetOrder;
- lblTitle.Text := fpgAddColon(rsFormTitle);
btnOK.Text := rsOK;
btnCancel.Text := rsCancel;
btnUp.Text := rsUp;
@@ -330,7 +328,7 @@ begin
SetPosition(4, 4, 248, 16);
FontDesc := '#Label1';
Hint := '';
- Text := 'Form %s:';
+ Text := 'Form: %s';
end;
btnOK := TfpgButton.Create(self);
@@ -491,7 +489,7 @@ end;
procedure TfrmVFDSetup.LoadSettings;
begin
FINIVersion := gINI.ReadInteger('Designer', 'Version', 0);
- chlGrid.FocusItem := gINI.ReadInteger('Options', 'GridResolution', 2);
+ edtGridX.Value := gINI.ReadInteger('Options', 'GridResolution', 4);
tbMRUFileCount.Position := gINI.ReadInteger('Options', 'MRUFileCount', 4);
chkFullPath.Checked := gINI.ReadBool('Options', 'ShowFullPath', True);
edtDefaultExt.Text := gINI.ReadString('Options', 'DefaultFileExt', '.pas');
@@ -504,7 +502,7 @@ end;
procedure TfrmVFDSetup.SaveSettings;
begin
gINI.WriteInteger('Designer', 'Version', cDesignerINIVersion);
- gINI.WriteInteger('Options', 'GridResolution', chlGrid.FocusItem);
+ gINI.WriteInteger('Options', 'GridResolution', edtGridX.Value);
gINI.WriteInteger('Options', 'MRUFileCount', tbMRUFileCount.Position);
gINI.WriteBool('Options', 'ShowFullPath', chkFullPath.Checked);
gINI.WriteString('Options', 'DefaultFileExt', edtDefaultExt.Text);
@@ -542,21 +540,6 @@ begin
Text := 'Grid resolution:';
end;
- chlGrid := TfpgComboBox.Create(self);
- with chlGrid do
- begin
- Name := 'chlGrid';
- SetPosition(144, 28, 88, 24);
- ExtraHint := '';
- FontDesc := '#List';
- Hint := '';
- Items.Add('1');
- Items.Add('4');
- Items.Add('8');
- FocusItem := -1;
- TabOrder := 1;
- end;
-
btnOK := TfpgButton.Create(self);
with btnOK do
begin
@@ -729,6 +712,19 @@ begin
Text := 'Indent Type for generated code:';
end;
+ edtGridX := TfpgEditInteger.Create(self);
+ with edtGridX do
+ begin
+ Name := 'edtGridX';
+ SetPosition(119, 28, 48, 24);
+ FontDesc := '#Edit1';
+ Hint := '';
+ MaxValue := 10;
+ MinValue := 1;
+ TabOrder := 18;
+ Value := 4;
+ end;
+
{@VFD_BODY_END: frmVFDSetup}
LoadSettings;
diff --git a/uidesigner/vfdmain.pas b/uidesigner/vfdmain.pas
index 5dcb90d4..d94fee05 100644
--- a/uidesigner/vfdmain.pas
+++ b/uidesigner/vfdmain.pas
@@ -38,8 +38,10 @@ type
TMainDesigner = class(TObject)
private
+ FShowGrid: boolean;
procedure SetEditedFileName(const Value: string);
procedure LoadDefaults;
+ procedure SetShowGrid(AValue: boolean);
protected
FDesigners: TList;
FFile: TVFDFile;
@@ -71,6 +73,7 @@ type
procedure OnExit(Sender: TObject);
procedure OnOptionsClick(Sender: TObject);
property EditedFileName: string read FEditedFileName write SetEditedFileName;
+ property ShowGrid: boolean read FShowGrid write SetShowGrid;
end;
@@ -165,7 +168,13 @@ begin
CreateParseForm(bl.FormName, bl.Data, bl2.Data); // pair was found
end;
end;
-
+
+ for n := 0 to FDesigners.Count - 1 do
+ begin
+ selectedform := nil;
+ TFormDesigner(FDesigners[n]).Form.ShowGrid := FShowGrid;
+ end;
+
frmMain.mru.AddItem(fname);
end;
@@ -310,6 +319,7 @@ begin
if nfrm.edName.Text <> '' then
fd.Form.Name := nfrm.edName.Text;
fd.Form.WindowTitle := fd.Form.Name;
+ fd.Form.ShowGrid := FShowGrid;
fd.OneClickMove := OneClickMove;
FDesigners.Add(fd);
SelectedForm := fd;
@@ -466,16 +476,23 @@ end;
procedure TMainDesigner.LoadDefaults;
begin
- case gINI.ReadInteger('Options', 'GridResolution', 1) of
- 0: GridResolution := 2;
- 1: GridResolution := 4;
- 2: GridResolution := 8;
- end;
+ GridResolution := gINI.ReadInteger('Options', 'GridResolution', 4);
DefaultPasExt := gINI.ReadString('Options', 'DefaultFileExt', '.pas');
UndoOnPropExit := gINI.ReadBool('Options', 'UndoOnExit', DefUndoOnPropExit);
OneClickMove := gINI.ReadBool('Options', 'OneClickMove', True);
fpgApplication.HintPause := 1000;
end;
+procedure TMainDesigner.SetShowGrid(AValue: boolean);
+var
+ i: integer;
+begin
+ if FShowGrid = AValue then
+ Exit;
+ FShowGrid := AValue;
+ for i := 0 to FDesigners.Count-1 do
+ TFormDesigner(FDesigners[i]).Form.ShowGrid := AValue;
+end;
+
end.
diff --git a/uidesigner/vfdresizer.pas b/uidesigner/vfdresizer.pas
index 657746b6..a01af27b 100644
--- a/uidesigner/vfdresizer.pas
+++ b/uidesigner/vfdresizer.pas
@@ -43,7 +43,7 @@ type
constructor Create(ACompDesigner: TObject; adirection: integer); reintroduce;
procedure Show;
end;
-
+
implementation
@@ -65,18 +65,14 @@ begin
FDragging := True;
FDragPosX := x;
FDragPosy := y;
- {$IFDEF MSWINDOWS}
CaptureMouse;
- {$ENDIF}
end;
procedure TwgResizer.HandleLMouseUp(x, y: integer; shiftstate: TShiftState);
begin
inherited HandleLMouseUp(x, y, shiftstate);
FDragging := False;
- {$IFDEF MSWINDOWS}
ReleaseMouse;
- {$ENDIF}
end;
procedure TwgResizer.HandleMouseMove(x, y: integer; btnstate: word;
@@ -91,7 +87,7 @@ begin
if (not FDragging) or ((btnstate and MOUSE_LEFT) = 0) then
Exit;
-
+
dx := x - FDragPosX;
dy := y - FDragPosY;
diff --git a/uidesigner/vfdwidgets.pas b/uidesigner/vfdwidgets.pas
index e1e05935..f0a9d62e 100644
--- a/uidesigner/vfdwidgets.pas
+++ b/uidesigner/vfdwidgets.pas
@@ -67,6 +67,7 @@ uses
fpg_ColorWheel,
fpg_splitter,
fpg_hyperlink,
+ fpg_toggle,
vfdpropeditgrid,
vfdmain;
@@ -172,7 +173,6 @@ begin
sizeof(stdimg_vfd_colorlistbox),
0, 0);
-
fpgImages.AddMaskedBMP(
'vfd.combobox', @stdimg_vfd_combobox,
sizeof(stdimg_vfd_combobox),
@@ -322,6 +322,16 @@ begin
'vfd.hyperlink', @stdimg_vfd_hyperlink,
sizeof(stdimg_vfd_hyperlink),
0, 0);
+
+ fpgImages.AddBMP(
+ 'vfd.scrollframe', @stdimg_vfd_scrollframe,
+ sizeof(stdimg_vfd_scrollframe));
+
+ fpgImages.AddMaskedBMP(
+ 'vfd.toggle', @stdimg_vfd_toggle,
+ sizeof(stdimg_vfd_toggle),
+ 0, 0);
+
end;
procedure AddWidgetPosProps(wgc: TVFDWidgetClass);
@@ -341,6 +351,7 @@ begin
wc := TVFDWidgetClass.Create(TfpgForm);
wc.NameBase := 'frm';
wc.AddProperty('WindowTitle', TPropertyString, '');
+ wc.AddProperty('IconName', TPropertyString, 'Image name to change window icon');
wc.AddProperty('Hint', TPropertyString, 'Tooltip hint');
wc.AddProperty('ShowHint', TPropertyBoolean, '');
wc.AddProperty('Sizeable', TPropertyBoolean, 'Can the form be resized at runtime');
@@ -789,6 +800,8 @@ begin
wc.AddProperty('Enabled', TPropertyBoolean, '');
wc.AddProperty('FontDesc', TPropertyFontDesc, 'The font used for displaying the text');
wc.AddProperty('Hint', TPropertyString, 'Tooltip hint');
+ wc.AddProperty('MaxValue', TPropertyInteger, '');
+ wc.AddProperty('MinValue', TPropertyInteger, '');
wc.AddProperty('NegativeColor', TPropertyColor, 'Color used for negative values');
wc.AddProperty('ParentShowHint', TPropertyBoolean, '');
wc.AddProperty('ReadOnly', TPropertyBoolean, '');
@@ -810,6 +823,8 @@ begin
wc.AddProperty('FixedDecimals', TPropertyBoolean, '');
wc.AddProperty('FontDesc', TPropertyFontDesc, 'The font used for displaying the text');
wc.AddProperty('Hint', TPropertyString, 'Tooltip hint');
+ wc.AddProperty('MaxValue', TPropertyFloat, '');
+ wc.AddProperty('MinValue', TPropertyFloat, '');
wc.AddProperty('NegativeColor', TPropertyColor, 'Color used for negative values');
wc.AddProperty('ParentShowHint', TPropertyBoolean, '');
wc.AddProperty('ReadOnly', TPropertyBoolean, '');
@@ -982,6 +997,30 @@ begin
wc.WidgetIconName := 'vfd.hyperlink';
RegisterVFDWidget(wc);
+ // ToggleBox
+ wc := TVFDWidgetClass.Create(TfpgToggle);
+ wc.NameBase := 'Toggle';
+ wc.AddProperty('Align', TPropertyEnum, '');
+ wc.AddProperty('Checked', TPropertyBoolean, 'Boolean value');
+ wc.AddProperty('CheckedCaption', TPropertyString, 'Initial text');
+ wc.AddProperty('CheckedColor', TPropertyColor, '');
+ wc.AddProperty('CheckedTextColor', TPropertyColor, '');
+ wc.AddProperty('Enabled', TPropertyBoolean, '');
+ wc.AddProperty('FontDesc', TPropertyFontDesc, 'The font used for displaying the text');
+ wc.AddProperty('Hint', TPropertyString, 'Tooltip hint');
+ wc.AddProperty('ParentShowHint', TPropertyBoolean, '');
+ wc.AddProperty('ShowHint', TPropertyBoolean, '');
+ wc.AddProperty('TabOrder', TPropertyInteger, 'The tab order');
+ wc.AddProperty('Text', TPropertyString, 'Initial text');
+ wc.AddProperty('TextColor', TPropertyColor, '');
+ wc.AddProperty('ToggleWidth', TPropertyInteger, 'Width of toggle button');
+ wc.AddProperty('UnCheckedCaption', TPropertyString, 'Initial text');
+ wc.AddProperty('UnCheckedColor', TPropertyColor, '');
+ wc.AddProperty('UnCheckedTextColor', TPropertyColor, '');
+ wc.AddProperty('UseAnimation', TPropertyBoolean, '');
+ wc.WidgetIconName := 'vfd.toggle';
+ RegisterVFDWidget(wc);
+
// Other - do not delete!!! this should be the last...
wc := TVFDWidgetClass.Create(TOtherWidget);
wc.NameBase := 'Custom';