diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-23 08:54:39 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-23 08:54:39 +0000 |
commit | 1e00430227e56fd2691f8374418f352c171039b1 (patch) | |
tree | 0451194af432a8b80270defb403bb100f1e95d90 | |
parent | 2ecc101eb1573c272d570289987807c44937631b (diff) | |
download | fpGUI-1e00430227e56fd2691f8374418f352c171039b1.tar.xz |
The first part of removing the obsolete fpGUI and replacing it with the new multi-handle design from the prototypes directory.
-rw-r--r-- | COPYING.modifiedLGPL | 5 | ||||
-rw-r--r-- | Makefile | 1900 | ||||
-rw-r--r-- | Makefile.fpc | 7 | ||||
-rw-r--r-- | TODO.txt | 51 | ||||
-rw-r--r-- | docs/xml/gfx/fpgfx.xml | 92 | ||||
-rw-r--r-- | docs/xml/gfx/geldirty.xml | 150 | ||||
-rw-r--r-- | docs/xml/gfx/gelimage.xml | 109 | ||||
-rw-r--r-- | docs/xml/gfx/gfx_x11.xml | 1402 | ||||
-rw-r--r-- | docs/xml/gfx/gfxbase.xml | 4332 | ||||
-rw-r--r-- | docs/xml/gfx/gfxinterface.xml | 82 | ||||
-rw-r--r-- | docs/xml/gfx/unitxft.xml | 635 | ||||
-rw-r--r-- | docs/xml/gui/examples/TComboBox.ex1.pas | 10 | ||||
-rw-r--r-- | docs/xml/gui/examples/TGroupBox.ex1.pas | 20 | ||||
-rw-r--r-- | docs/xml/gui/examples/TStyleManager.RegisterClass.pas | 6 | ||||
-rw-r--r-- | docs/xml/gui/fpgui.xml | 9063 | ||||
-rw-r--r-- | docs/xml/gui/motifstyle.xml | 103 | ||||
-rw-r--r-- | docs/xml/gui/opensoftstyle.xml | 159 | ||||
-rw-r--r-- | docs/xml/gui/stylemanager.xml | 198 | ||||
-rw-r--r-- | docs/xml/gui/windowsstyle.xml | 46 | ||||
-rw-r--r-- | docs/xml/img/imageio_de.xml | 730 | ||||
-rw-r--r-- | gfx/Makefile | 2041 | ||||
-rw-r--r-- | gfx/Makefile.fpc | 37 | ||||
-rw-r--r-- | gfx/carbon/fpgfxpackage.lpk | 81 | ||||
-rw-r--r-- | gfx/carbon/fpgfxpackage.pas | 15 | ||||
-rw-r--r-- | gfx/carbon/gfx_carbon.pas | 513 | ||||
-rw-r--r-- | gfx/carbon/gfxinterface.pas | 45 | ||||
-rw-r--r-- | gfx/commandlineparams.pas | 439 | ||||
-rw-r--r-- | gfx/fpgfx.pas | 100 | ||||
-rw-r--r-- | gfx/fputf8utils.pas | 132 | ||||
-rw-r--r-- | gfx/gdi/Makefile | 1249 | ||||
-rw-r--r-- | gfx/gdi/Makefile.fpc | 36 | ||||
-rw-r--r-- | gfx/gdi/fpgfxpackage.lpk | 72 | ||||
-rw-r--r-- | gfx/gdi/fpgfxpackage.pas | 14 | ||||
-rw-r--r-- | gfx/gdi/gdikeys.inc | 332 | ||||
-rw-r--r-- | gfx/gdi/gfx_gdi.pas | 1991 | ||||
-rw-r--r-- | gfx/gdi/gfxinterface.pas | 39 | ||||
-rw-r--r-- | gfx/geldirty.pas | 195 | ||||
-rw-r--r-- | gfx/gelimage.pas | 440 | ||||
-rw-r--r-- | gfx/gfxbase.pas | 1504 | ||||
-rw-r--r-- | gfx/keys.inc | 270 | ||||
-rw-r--r-- | gfx/schar16.pas | 339 | ||||
-rw-r--r-- | gfx/template/Makefile | 1249 | ||||
-rw-r--r-- | gfx/template/Makefile.fpc | 22 | ||||
-rw-r--r-- | gfx/template/gfx_xxx.pas | 170 | ||||
-rw-r--r-- | gfx/template/gfxinterface.pas | 39 | ||||
-rw-r--r-- | gfx/unitkeys.pas | 347 | ||||
-rw-r--r-- | gfx/x11/Makefile | 1985 | ||||
-rw-r--r-- | gfx/x11/Makefile.fpc | 27 | ||||
-rwxr-xr-x | gfx/x11/build.sh | 3 | ||||
-rw-r--r-- | gfx/x11/fpgfxpackage.lpk | 77 | ||||
-rw-r--r-- | gfx/x11/fpgfxpackage.pas | 15 | ||||
-rw-r--r-- | gfx/x11/gfx_x11.pas | 2037 | ||||
-rw-r--r-- | gfx/x11/gfxinterface.pas | 45 | ||||
-rw-r--r-- | gfx/x11/unitxft.pas | 162 | ||||
-rw-r--r-- | gui/Makefile | 2014 | ||||
-rw-r--r-- | gui/Makefile.fpc | 41 | ||||
-rw-r--r-- | gui/db/Makefile | 1373 | ||||
-rw-r--r-- | gui/db/Makefile.fpc | 20 | ||||
-rw-r--r-- | gui/db/fpgui_db.pas | 299 | ||||
-rw-r--r-- | gui/defimpl/defstyle.inc | 60 | ||||
-rw-r--r-- | gui/fpgui.pas | 363 | ||||
-rw-r--r-- | gui/fpgui.rst | 60 | ||||
-rw-r--r-- | gui/fpguibin.inc | 111 | ||||
-rw-r--r-- | gui/fpguibuttons.inc | 155 | ||||
-rw-r--r-- | gui/fpguicheckbox.inc | 127 | ||||
-rw-r--r-- | gui/fpguicolors.inc | 229 | ||||
-rw-r--r-- | gui/fpguicombobox.inc | 288 | ||||
-rw-r--r-- | gui/fpguicontainer.inc | 88 | ||||
-rw-r--r-- | gui/fpguidialogs.inc | 199 | ||||
-rw-r--r-- | gui/fpguiedit.inc | 430 | ||||
-rw-r--r-- | gui/fpguiform.inc | 587 | ||||
-rw-r--r-- | gui/fpguigrid.inc | 657 | ||||
-rw-r--r-- | gui/fpguigroupbox.inc | 106 | ||||
-rw-r--r-- | gui/fpguilabel.inc | 104 | ||||
-rw-r--r-- | gui/fpguilayouts.inc | 1088 | ||||
-rw-r--r-- | gui/fpguilistbox.inc | 430 | ||||
-rw-r--r-- | gui/fpguimemo.inc | 295 | ||||
-rw-r--r-- | gui/fpguimenus.inc | 246 | ||||
-rw-r--r-- | gui/fpguipackage.lpk | 79 | ||||
-rw-r--r-- | gui/fpguipackage.pas | 14 | ||||
-rw-r--r-- | gui/fpguipanel.inc | 126 | ||||
-rw-r--r-- | gui/fpguipopupwindow.inc | 57 | ||||
-rw-r--r-- | gui/fpguiprogressbar.inc | 159 | ||||
-rw-r--r-- | gui/fpguiradiobutton.inc | 139 | ||||
-rw-r--r-- | gui/fpguiscrollbar.inc | 723 | ||||
-rw-r--r-- | gui/fpguiscrollbox.inc | 428 | ||||
-rw-r--r-- | gui/fpguiseparator.inc | 103 | ||||
-rw-r--r-- | gui/fpguistyle.inc | 834 | ||||
-rw-r--r-- | gui/fpguiwidget.inc | 1368 | ||||
-rw-r--r-- | gui/motifstyle.pas | 174 | ||||
-rw-r--r-- | gui/opensoftstyle.pas | 327 | ||||
-rw-r--r-- | gui/stylemanager.pas | 220 | ||||
-rw-r--r-- | gui/win32/defstyle.inc | 47 | ||||
-rw-r--r-- | gui/windowsstyle.pas | 111 | ||||
-rw-r--r-- | img/Makefile | 1284 | ||||
-rw-r--r-- | img/Makefile.fpc | 18 | ||||
-rw-r--r-- | img/bmpreader.pas | 317 | ||||
-rw-r--r-- | img/fpimg.pas | 95 | ||||
-rw-r--r-- | img/fpimgpackage.lpk | 51 | ||||
-rw-r--r-- | img/imageio.pas | 195 | ||||
-rw-r--r-- | prototypes/fpgui2/source/core/gfxbaseinterfaces.pas | 25 | ||||
-rw-r--r-- | prototypes/fpgui2/source/core/resample.pas | 657 | ||||
-rw-r--r-- | prototypes/multihandle/gui2Base.pas | 442 | ||||
-rw-r--r-- | prototypes/multihandle/test.lpi | 54 | ||||
-rw-r--r-- | prototypes/multihandle/test.lpr | 129 | ||||
-rw-r--r-- | prototypes/newmultihandle/examples/helloworld.lpi | 52 | ||||
-rw-r--r-- | prototypes/newmultihandle/examples/helloworld.lpr | 108 | ||||
-rw-r--r-- | prototypes/newmultihandle/fpgui.pas | 43 | ||||
-rw-r--r-- | prototypes/newmultihandle/fpguipackage.lpk | 60 | ||||
-rw-r--r-- | prototypes/newmultihandle/fpguipackage.pas | 20 | ||||
-rw-r--r-- | prototypes/newmultihandle/gui_button.inc | 139 | ||||
-rw-r--r-- | prototypes/newmultihandle/gui_edit.inc | 109 | ||||
-rw-r--r-- | prototypes/newmultihandle/gui_style.inc | 107 | ||||
-rw-r--r-- | prototypes/newmultihandle/gui_widget.inc | 41 | ||||
-rw-r--r-- | src/corelib/fpgfx.pas (renamed from prototypes/fpgui2/source/core/fpgfx.pas) | 0 | ||||
-rw-r--r-- | src/corelib/gdi/fpGFX2.lpk (renamed from prototypes/fpgui2/source/core/gdi/fpGFX2.lpk) | 0 | ||||
-rw-r--r-- | src/corelib/gdi/fpGFX2.pas (renamed from prototypes/fpgui2/source/core/gdi/fpGFX2.pas) | 0 | ||||
-rw-r--r-- | src/corelib/gdi/gdikeys.inc (renamed from prototypes/fpgui2/source/core/gdi/gdikeys.inc) | 0 | ||||
-rw-r--r-- | src/corelib/gdi/gfx_gdi.pas (renamed from prototypes/fpgui2/source/core/gdi/gfx_gdi.pas) | 0 | ||||
-rw-r--r-- | src/corelib/gfx_extinterpolation.pas (renamed from prototypes/fpgui2/source/core/gfx_extinterpolation.pas) | 0 | ||||
-rw-r--r-- | src/corelib/gfx_imgfmt_bmp.pas (renamed from prototypes/fpgui2/source/core/gfx_imgfmt_bmp.pas) | 0 | ||||
-rw-r--r-- | src/corelib/gfx_msgqueue.inc (renamed from prototypes/fpgui2/source/core/gfx_msgqueue.inc) | 0 | ||||
-rw-r--r-- | src/corelib/gfx_stdimages.pas (renamed from prototypes/fpgui2/source/core/gfx_stdimages.pas) | 0 | ||||
-rw-r--r-- | src/corelib/gfx_utf8utils.pas (renamed from prototypes/fpgui2/source/core/gfx_utf8utils.pas) | 0 | ||||
-rw-r--r-- | src/corelib/gfx_widget.pas (renamed from prototypes/fpgui2/source/core/gfx_widget.pas) | 0 | ||||
-rw-r--r-- | src/corelib/gfxbase.pas (renamed from prototypes/fpgui2/source/core/gfxbase.pas) | 0 | ||||
-rw-r--r-- | src/corelib/keys.inc (renamed from prototypes/fpgui2/source/core/keys.inc) | 0 | ||||
-rw-r--r-- | src/corelib/predefinedcolors.inc (renamed from prototypes/fpgui2/source/core/predefinedcolors.inc) | 0 | ||||
-rw-r--r-- | src/corelib/stdimages.inc (renamed from prototypes/fpgui2/source/core/stdimages.inc) | 0 | ||||
-rw-r--r-- | src/corelib/x11/_netlayer.pas (renamed from prototypes/fpgui2/source/core/x11/_netlayer.pas) | 0 | ||||
-rw-r--r-- | src/corelib/x11/fpGFX2.lpk (renamed from prototypes/fpgui2/source/core/x11/fpGFX2.lpk) | 0 | ||||
-rw-r--r-- | src/corelib/x11/fpGFX2.pas (renamed from prototypes/fpgui2/source/core/x11/fpGFX2.pas) | 0 | ||||
-rw-r--r-- | src/corelib/x11/gfx_x11.pas (renamed from prototypes/fpgui2/source/core/x11/gfx_x11.pas) | 0 | ||||
-rw-r--r-- | src/corelib/x11/x11_keyconv.pas (renamed from prototypes/fpgui2/source/core/x11/x11_keyconv.pas) | 0 | ||||
-rw-r--r-- | src/corelib/x11/x11_xft.pas (renamed from prototypes/fpgui2/source/core/x11/x11_xft.pas) | 0 | ||||
-rw-r--r-- | src/gui/gui_button.pas (renamed from prototypes/fpgui2/source/gui/gui_button.pas) | 0 | ||||
-rw-r--r-- | src/gui/gui_combobox.pas (renamed from prototypes/fpgui2/source/gui/gui_combobox.pas) | 0 | ||||
-rw-r--r-- | src/gui/gui_dialogs.pas (renamed from prototypes/fpgui2/source/gui/gui_dialogs.pas) | 0 | ||||
-rw-r--r-- | src/gui/gui_edit.pas (renamed from prototypes/fpgui2/source/gui/gui_edit.pas) | 0 | ||||
-rw-r--r-- | src/gui/gui_form.pas (renamed from prototypes/fpgui2/source/gui/gui_form.pas) | 0 | ||||
-rw-r--r-- | src/gui/gui_label.pas (renamed from prototypes/fpgui2/source/gui/gui_label.pas) | 0 | ||||
-rw-r--r-- | src/gui/gui_listbox.pas (renamed from prototypes/fpgui2/source/gui/gui_listbox.pas) | 0 | ||||
-rw-r--r-- | src/gui/gui_memo.pas (renamed from prototypes/fpgui2/source/gui/gui_memo.pas) | 0 | ||||
-rw-r--r-- | src/gui/gui_popupwindow.pas (renamed from prototypes/fpgui2/source/gui/gui_popupwindow.pas) | 0 | ||||
-rw-r--r-- | src/gui/gui_scrollbar.pas (renamed from prototypes/fpgui2/source/gui/gui_scrollbar.pas) | 0 |
145 files changed, 3 insertions, 53384 deletions
diff --git a/COPYING.modifiedLGPL b/COPYING.modifiedLGPL index 41e2bbbd..61d0f3f1 100644 --- a/COPYING.modifiedLGPL +++ b/COPYING.modifiedLGPL @@ -1,5 +1,6 @@ -This is the file COPYING.modifiedLGPL, it applies to all fpGFX sources -distributed by members of the fpGFX Development Team. + +This is the file COPYING.modifiedLGPL, it applies to all fpGUI sources +distributed by members of the fpGUI Development Team. All files contains headers showing the appropriate license. These files are distributed under the GNU Library Public License diff --git a/Makefile b/Makefile deleted file mode 100644 index f712c3af..00000000 --- a/Makefile +++ /dev/null @@ -1,1900 +0,0 @@ -# -# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/07/01] -# -default: all -MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince arm-gba powerpc64-linux -BSDs = freebsd netbsd openbsd darwin -UNIXs = linux $(BSDs) solaris qnx -LIMIT83fs = go32v2 os2 emx watcom -FORCE: -.PHONY: FORCE -override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH))) -ifneq ($(findstring darwin,$(OSTYPE)),) -inUnix=1 #darwin -SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH))) -else -ifeq ($(findstring ;,$(PATH)),) -inUnix=1 -SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH))) -else -SEARCHPATH:=$(subst ;, ,$(PATH)) -endif -endif -SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE)))) -PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH)))) -ifeq ($(PWD),) -PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH)))) -ifeq ($(PWD),) -$(error You need the GNU utils package to use this Makefile) -else -PWD:=$(firstword $(PWD)) -SRCEXEEXT= -endif -else -PWD:=$(firstword $(PWD)) -SRCEXEEXT=.exe -endif -ifndef inUnix -ifeq ($(OS),Windows_NT) -inWinNT=1 -else -ifdef OS2_SHELL -inOS2=1 -endif -endif -else -ifneq ($(findstring cygdrive,$(PATH)),) -inCygWin=1 -endif -endif -ifdef inUnix -SRCBATCHEXT=.sh -else -ifdef inOS2 -SRCBATCHEXT=.cmd -else -SRCBATCHEXT=.bat -endif -endif -ifdef inUnix -PATHSEP=/ -else -PATHSEP:=$(subst /,\,/) -ifdef inCygWin -PATHSEP=/ -endif -endif -ifdef PWD -BASEDIR:=$(subst \,/,$(shell $(PWD))) -ifdef inCygWin -ifneq ($(findstring /cygdrive/,$(BASEDIR)),) -BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR)) -BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR))) -BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR)) -endif -endif -else -BASEDIR=. -endif -ifdef inOS2 -ifndef ECHO -ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO=echo -else -ECHO:=$(firstword $(ECHO)) -endif -else -ECHO:=$(firstword $(ECHO)) -endif -endif -export ECHO -endif -ifndef FPC -ifdef PP -FPC=$(PP) -endif -endif -ifndef FPC -FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH)))) -ifneq ($(FPCPROG),) -FPCPROG:=$(firstword $(FPCPROG)) -FPC:=$(shell $(FPCPROG) -PB) -ifneq ($(findstring Error,$(FPC)),) -override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH))))) -endif -else -override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH))))) -endif -endif -override FPC:=$(subst $(SRCEXEEXT),,$(FPC)) -override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT) -FOUNDFPC:=$(strip $(wildcard $(FPC))) -ifeq ($(FOUNDFPC),) -FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH)))) -ifeq ($(FOUNDFPC),) -$(error Compiler $(FPC) not found) -endif -endif -ifndef FPC_COMPILERINFO -FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO) -endif -ifndef FPC_VERSION -FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO)) -endif -export FPC FPC_VERSION FPC_COMPILERINFO -unexport CHECKDEPEND ALLDEPENDENCIES -ifndef CPU_TARGET -ifdef CPU_TARGET_DEFAULT -CPU_TARGET=$(CPU_TARGET_DEFAULT) -endif -endif -ifndef OS_TARGET -ifdef OS_TARGET_DEFAULT -OS_TARGET=$(OS_TARGET_DEFAULT) -endif -endif -ifneq ($(words $(FPC_COMPILERINFO)),5) -FPC_COMPILERINFO+=$(shell $(FPC) -iSP) -FPC_COMPILERINFO+=$(shell $(FPC) -iTP) -FPC_COMPILERINFO+=$(shell $(FPC) -iSO) -FPC_COMPILERINFO+=$(shell $(FPC) -iTO) -endif -ifndef CPU_SOURCE -CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO)) -endif -ifndef CPU_TARGET -CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO)) -endif -ifndef OS_SOURCE -OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO)) -endif -ifndef OS_TARGET -OS_TARGET:=$(word 5,$(FPC_COMPILERINFO)) -endif -FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET) -FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE) -ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) -TARGETSUFFIX=$(OS_TARGET) -SOURCESUFFIX=$(OS_SOURCE) -else -TARGETSUFFIX=$(FULL_TARGET) -SOURCESUFFIX=$(FULL_SOURCE) -endif -ifneq ($(FULL_TARGET),$(FULL_SOURCE)) -CROSSCOMPILE=1 -endif -ifeq ($(findstring makefile,$(MAKECMDGOALS)),) -ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),) -$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first) -endif -endif -ifneq ($(findstring $(OS_TARGET),$(BSDs)),) -BSDhier=1 -endif -ifeq ($(OS_TARGET),linux) -linuxHier=1 -endif -export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE -ifdef FPCDIR -override FPCDIR:=$(subst \,/,$(FPCDIR)) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=wrong -endif -else -override FPCDIR=wrong -endif -ifdef DEFAULT_FPCDIR -ifeq ($(FPCDIR),wrong) -override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR)) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=wrong -endif -endif -endif -ifeq ($(FPCDIR),wrong) -ifdef inUnix -override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=/usr/lib/fpc/$(FPC_VERSION) -endif -else -override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH)))))) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR:=$(BASEDIR) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=c:/pp -endif -endif -endif -endif -endif -ifndef CROSSBINDIR -CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX)) -endif -ifndef BINUTILSPREFIX -ifndef CROSSBINDIR -ifdef CROSSCOMPILE -BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)- -endif -endif -endif -UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX)) -ifeq ($(UNITSDIR),) -UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET)) -endif -PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra) -ifeq ($(FULL_TARGET),i386-linux) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-win32) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-os2) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-beos) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-solaris) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-qnx) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-netware) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-darwin) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-emx) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-watcom) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-wince) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),m68k-linux) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),m68k-atari) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),sparc-linux) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),arm-linux) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),arm-palmos) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),arm-wince) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),arm-gba) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override TARGET_DIRS+=src -endif -ifeq ($(FULL_TARGET),i386-linux) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-win32) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-os2) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-beos) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-solaris) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-qnx) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-netware) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-darwin) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-emx) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-watcom) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),i386-wince) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),m68k-linux) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),m68k-atari) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),sparc-linux) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),arm-linux) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),arm-palmos) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),arm-wince) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),arm-gba) -override TARGET_EXAMPLEDIRS+=examples -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override TARGET_EXAMPLEDIRS+=examples -endif -ifdef REQUIRE_UNITSDIR -override UNITSDIR+=$(REQUIRE_UNITSDIR) -endif -ifdef REQUIRE_PACKAGESDIR -override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR) -endif -ifdef ZIPINSTALL -ifneq ($(findstring $(OS_TARGET),$(UNIXs)),) -UNIXHier=1 -endif -else -ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),) -UNIXHier=1 -endif -endif -ifndef INSTALL_PREFIX -ifdef PREFIX -INSTALL_PREFIX=$(PREFIX) -endif -endif -ifndef INSTALL_PREFIX -ifdef UNIXHier -INSTALL_PREFIX=/usr/local -else -ifdef INSTALL_FPCPACKAGE -INSTALL_BASEDIR:=/pp -else -INSTALL_BASEDIR:=/$(PACKAGE_NAME) -endif -endif -endif -export INSTALL_PREFIX -ifdef INSTALL_FPCSUBDIR -export INSTALL_FPCSUBDIR -endif -ifndef DIST_DESTDIR -DIST_DESTDIR:=$(BASEDIR) -endif -export DIST_DESTDIR -ifndef COMPILER_UNITTARGETDIR -ifdef PACKAGEDIR_MAIN -COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX) -else -COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX) -endif -endif -ifndef COMPILER_TARGETDIR -COMPILER_TARGETDIR=. -endif -ifndef INSTALL_BASEDIR -ifdef UNIXHier -ifdef INSTALL_FPCPACKAGE -INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION) -else -INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME) -endif -else -INSTALL_BASEDIR:=$(INSTALL_PREFIX) -endif -endif -ifndef INSTALL_BINDIR -ifdef UNIXHier -INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin -else -INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin -ifdef INSTALL_FPCPACKAGE -ifdef CROSSCOMPILE -ifdef CROSSINSTALL -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX) -else -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX) -endif -else -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX) -endif -endif -endif -endif -ifndef INSTALL_UNITDIR -INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX) -ifdef INSTALL_FPCPACKAGE -ifdef PACKAGE_NAME -INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME) -endif -endif -endif -ifndef INSTALL_LIBDIR -ifdef UNIXHier -INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib -else -INSTALL_LIBDIR:=$(INSTALL_UNITDIR) -endif -endif -ifndef INSTALL_SOURCEDIR -ifdef UNIXHier -ifdef BSDhier -SRCPREFIXDIR=share/src -else -ifdef linuxHier -SRCPREFIXDIR=share/src -else -SRCPREFIXDIR=src -endif -endif -ifdef INSTALL_FPCPACKAGE -ifdef INSTALL_FPCSUBDIR -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME) -else -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -endif -else -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -else -ifdef INSTALL_FPCPACKAGE -ifdef INSTALL_FPCSUBDIR -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME) -else -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME) -endif -else -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source -endif -endif -endif -ifndef INSTALL_DOCDIR -ifdef UNIXHier -ifdef BSDhier -DOCPREFIXDIR=share/doc -else -ifdef linuxHier -DOCPREFIXDIR=share/doc -else -DOCPREFIXDIR=doc -endif -endif -ifdef INSTALL_FPCPACKAGE -INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -else -INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -else -ifdef INSTALL_FPCPACKAGE -INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME) -else -INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc -endif -endif -endif -ifndef INSTALL_EXAMPLEDIR -ifdef UNIXHier -ifdef INSTALL_FPCPACKAGE -ifdef BSDhier -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -else -ifdef linuxHier -INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples -else -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME) -endif -endif -else -ifdef BSDhier -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -else -ifdef linuxHier -INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -else -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -endif -endif -else -ifdef INSTALL_FPCPACKAGE -INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME) -else -INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples -endif -endif -endif -ifndef INSTALL_DATADIR -INSTALL_DATADIR=$(INSTALL_BASEDIR) -endif -ifndef INSTALL_SHAREDDIR -INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib -endif -ifdef CROSSCOMPILE -ifndef CROSSBINDIR -CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX)) -ifeq ($(CROSSBINDIR),) -CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE)) -endif -endif -else -CROSSBINDIR= -endif -BATCHEXT=.bat -LOADEREXT=.as -EXEEXT=.exe -PPLEXT=.ppl -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.so -SHAREDLIBPREFIX=libfp -STATICLIBPREFIX=libp -IMPORTLIBPREFIX=libimp -RSTEXT=.rst -ifeq ($(findstring 1.0.,$(FPC_VERSION)),) -ifeq ($(OS_TARGET),go32v1) -STATICLIBPREFIX= -SHORTSUFFIX=v1 -endif -ifeq ($(OS_TARGET),go32v2) -STATICLIBPREFIX= -SHORTSUFFIX=dos -endif -ifeq ($(OS_TARGET),watcom) -STATICLIBPREFIX= -OEXT=.obj -ASMEXT=.asm -SHAREDLIBEXT=.dll -SHORTSUFFIX=wat -endif -ifeq ($(OS_TARGET),linux) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=lnx -endif -ifeq ($(OS_TARGET),freebsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=fbs -endif -ifeq ($(OS_TARGET),netbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=nbs -endif -ifeq ($(OS_TARGET),openbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=obs -endif -ifeq ($(OS_TARGET),win32) -SHAREDLIBEXT=.dll -SHORTSUFFIX=w32 -endif -ifeq ($(OS_TARGET),os2) -BATCHEXT=.cmd -AOUTEXT=.out -STATICLIBPREFIX= -SHAREDLIBEXT=.dll -SHORTSUFFIX=os2 -ECHO=echo -endif -ifeq ($(OS_TARGET),emx) -BATCHEXT=.cmd -AOUTEXT=.out -STATICLIBPREFIX= -SHAREDLIBEXT=.dll -SHORTSUFFIX=emx -ECHO=echo -endif -ifeq ($(OS_TARGET),amiga) -EXEEXT= -SHAREDLIBEXT=.library -SHORTSUFFIX=amg -endif -ifeq ($(OS_TARGET),morphos) -EXEEXT= -SHAREDLIBEXT=.library -SHORTSUFFIX=mos -endif -ifeq ($(OS_TARGET),atari) -EXEEXT=.ttp -SHORTSUFFIX=ata -endif -ifeq ($(OS_TARGET),beos) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=be -endif -ifeq ($(OS_TARGET),solaris) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=sun -endif -ifeq ($(OS_TARGET),qnx) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=qnx -endif -ifeq ($(OS_TARGET),netware) -EXEEXT=.nlm -STATICLIBPREFIX= -SHORTSUFFIX=nw -endif -ifeq ($(OS_TARGET),netwlibc) -EXEEXT=.nlm -STATICLIBPREFIX= -SHORTSUFFIX=nwl -endif -ifeq ($(OS_TARGET),macos) -BATCHEXT= -EXEEXT= -DEBUGSYMEXT=.xcoff -SHORTSUFFIX=mac -endif -ifeq ($(OS_TARGET),darwin) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=dwn -endif -else -ifeq ($(OS_TARGET),go32v1) -PPUEXT=.pp1 -OEXT=.o1 -ASMEXT=.s1 -SMARTEXT=.sl1 -STATICLIBEXT=.a1 -SHAREDLIBEXT=.so1 -STATICLIBPREFIX= -SHORTSUFFIX=v1 -endif -ifeq ($(OS_TARGET),go32v2) -STATICLIBPREFIX= -SHORTSUFFIX=dos -endif -ifeq ($(OS_TARGET),watcom) -STATICLIBPREFIX= -SHORTSUFFIX=wat -endif -ifeq ($(OS_TARGET),linux) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=lnx -endif -ifeq ($(OS_TARGET),freebsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=fbs -endif -ifeq ($(OS_TARGET),netbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=nbs -endif -ifeq ($(OS_TARGET),openbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=obs -endif -ifeq ($(OS_TARGET),win32) -PPUEXT=.ppw -OEXT=.ow -ASMEXT=.sw -SMARTEXT=.slw -STATICLIBEXT=.aw -SHAREDLIBEXT=.dll -SHORTSUFFIX=w32 -endif -ifeq ($(OS_TARGET),os2) -BATCHEXT=.cmd -PPUEXT=.ppo -ASMEXT=.so2 -OEXT=.oo2 -AOUTEXT=.out -SMARTEXT=.sl2 -STATICLIBPREFIX= -STATICLIBEXT=.ao2 -SHAREDLIBEXT=.dll -SHORTSUFFIX=os2 -ECHO=echo -endif -ifeq ($(OS_TARGET),amiga) -EXEEXT= -PPUEXT=.ppu -ASMEXT=.asm -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.library -SHORTSUFFIX=amg -endif -ifeq ($(OS_TARGET),atari) -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT=.ttp -SHORTSUFFIX=ata -endif -ifeq ($(OS_TARGET),beos) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=be -endif -ifeq ($(OS_TARGET),solaris) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=sun -endif -ifeq ($(OS_TARGET),qnx) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=qnx -endif -ifeq ($(OS_TARGET),netware) -STATICLIBPREFIX= -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.nlm -EXEEXT=.nlm -SHORTSUFFIX=nw -endif -ifeq ($(OS_TARGET),netwlibc) -STATICLIBPREFIX= -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.nlm -EXEEXT=.nlm -SHORTSUFFIX=nwl -endif -ifeq ($(OS_TARGET),macos) -BATCHEXT= -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -DEBUGSYMEXT=.xcoff -SHORTSUFFIX=mac -endif -endif -ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) -FPCMADE=fpcmade.$(SHORTSUFFIX) -ZIPSUFFIX=$(SHORTSUFFIX) -ZIPCROSSPREFIX= -ZIPSOURCESUFFIX=src -ZIPEXAMPLESUFFIX=exm -else -FPCMADE=fpcmade.$(TARGETSUFFIX) -ZIPSOURCESUFFIX=.source -ZIPEXAMPLESUFFIX=.examples -ifdef CROSSCOMPILE -ZIPSUFFIX=.$(SOURCESUFFIX) -ZIPCROSSPREFIX=$(TARGETSUFFIX)- -else -ZIPSUFFIX=.$(TARGETSUFFIX) -ZIPCROSSPREFIX= -endif -endif -ifndef ECHO -ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO= __missing_command_ECHO -else -ECHO:=$(firstword $(ECHO)) -endif -else -ECHO:=$(firstword $(ECHO)) -endif -endif -export ECHO -ifndef DATE -DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(DATE),) -DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(DATE),) -DATE= __missing_command_DATE -else -DATE:=$(firstword $(DATE)) -endif -else -DATE:=$(firstword $(DATE)) -endif -endif -export DATE -ifndef GINSTALL -GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(GINSTALL),) -GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(GINSTALL),) -GINSTALL= __missing_command_GINSTALL -else -GINSTALL:=$(firstword $(GINSTALL)) -endif -else -GINSTALL:=$(firstword $(GINSTALL)) -endif -endif -export GINSTALL -ifndef CPPROG -CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(CPPROG),) -CPPROG= __missing_command_CPPROG -else -CPPROG:=$(firstword $(CPPROG)) -endif -endif -export CPPROG -ifndef RMPROG -RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(RMPROG),) -RMPROG= __missing_command_RMPROG -else -RMPROG:=$(firstword $(RMPROG)) -endif -endif -export RMPROG -ifndef MVPROG -MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MVPROG),) -MVPROG= __missing_command_MVPROG -else -MVPROG:=$(firstword $(MVPROG)) -endif -endif -export MVPROG -ifndef MKDIRPROG -MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MKDIRPROG),) -MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MKDIRPROG),) -MKDIRPROG= __missing_command_MKDIRPROG -else -MKDIRPROG:=$(firstword $(MKDIRPROG)) -endif -else -MKDIRPROG:=$(firstword $(MKDIRPROG)) -endif -endif -export MKDIRPROG -ifndef ECHOREDIR -ifndef inUnix -ECHOREDIR=echo -else -ECHOREDIR=$(ECHO) -endif -endif -ifndef COPY -COPY:=$(CPPROG) -fp -endif -ifndef COPYTREE -COPYTREE:=$(CPPROG) -Rfp -endif -ifndef MKDIRTREE -MKDIRTREE:=$(MKDIRPROG) -p -endif -ifndef MOVE -MOVE:=$(MVPROG) -f -endif -ifndef DEL -DEL:=$(RMPROG) -f -endif -ifndef DELTREE -DELTREE:=$(RMPROG) -rf -endif -ifndef INSTALL -ifdef inUnix -INSTALL:=$(GINSTALL) -c -m 644 -else -INSTALL:=$(COPY) -endif -endif -ifndef INSTALLEXE -ifdef inUnix -INSTALLEXE:=$(GINSTALL) -c -m 755 -else -INSTALLEXE:=$(COPY) -endif -endif -ifndef MKDIR -MKDIR:=$(GINSTALL) -m 755 -d -endif -export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR -ifndef PPUMOVE -PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(PPUMOVE),) -PPUMOVE= __missing_command_PPUMOVE -else -PPUMOVE:=$(firstword $(PPUMOVE)) -endif -endif -export PPUMOVE -ifndef FPCMAKE -FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(FPCMAKE),) -FPCMAKE= __missing_command_FPCMAKE -else -FPCMAKE:=$(firstword $(FPCMAKE)) -endif -endif -export FPCMAKE -ifndef ZIPPROG -ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ZIPPROG),) -ZIPPROG= __missing_command_ZIPPROG -else -ZIPPROG:=$(firstword $(ZIPPROG)) -endif -endif -export ZIPPROG -ifndef TARPROG -TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(TARPROG),) -TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(TARPROG),) -TARPROG= __missing_command_TARPROG -else -TARPROG:=$(firstword $(TARPROG)) -endif -else -TARPROG:=$(firstword $(TARPROG)) -endif -endif -export TARPROG -ASNAME=$(BINUTILSPREFIX)as -LDNAME=$(BINUTILSPREFIX)ld -ARNAME=$(BINUTILSPREFIX)ar -RCNAME=$(BINUTILSPREFIX)rc -ifneq ($(findstring 1.0.,$(FPC_VERSION)),) -ifeq ($(OS_TARGET),win32) -ifeq ($(CROSSBINDIR),) -ASNAME=asw -LDNAME=ldw -ARNAME=arw -endif -endif -endif -ifndef ASPROG -ifdef CROSSBINDIR -ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT) -else -ASPROG=$(ASNAME) -endif -endif -ifndef LDPROG -ifdef CROSSBINDIR -LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT) -else -LDPROG=$(LDNAME) -endif -endif -ifndef RCPROG -ifdef CROSSBINDIR -RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT) -else -RCPROG=$(RCNAME) -endif -endif -ifndef ARPROG -ifdef CROSSBINDIR -ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT) -else -ARPROG=$(ARNAME) -endif -endif -AS=$(ASPROG) -LD=$(LDPROG) -RC=$(RCPROG) -AR=$(ARPROG) -PPAS=ppas$(SRCBATCHEXT) -ifdef inUnix -LDCONFIG=ldconfig -else -LDCONFIG= -endif -ifdef DATE -DATESTR:=$(shell $(DATE) +%Y%m%d) -else -DATESTR= -endif -ifndef UPXPROG -ifeq ($(OS_TARGET),go32v2) -UPXPROG:=1 -endif -ifeq ($(OS_TARGET),win32) -UPXPROG:=1 -endif -ifdef UPXPROG -UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(UPXPROG),) -UPXPROG= -else -UPXPROG:=$(firstword $(UPXPROG)) -endif -else -UPXPROG= -endif -endif -export UPXPROG -ZIPOPT=-9 -ZIPEXT=.zip -ifeq ($(USETAR),bz2) -TAROPT=vj -TAREXT=.tar.bz2 -else -TAROPT=vz -TAREXT=.tar.gz -endif -ifndef NOCPUDEF -override FPCOPTDEF=$(CPU_TARGET) -endif -ifneq ($(OS_TARGET),$(OS_SOURCE)) -override FPCOPT+=-T$(OS_TARGET) -endif -ifneq ($(CPU_TARGET),$(CPU_SOURCE)) -override FPCOPT+=-P$(CPU_TARGET) -endif -ifeq ($(OS_SOURCE),openbsd) -override FPCOPT+=-FD$(NEW_BINUTILS_PATH) -endif -ifndef CROSSBOOTSTRAP -ifneq ($(BINUTILSPREFIX),) -override FPCOPT+=-XP$(BINUTILSPREFIX) -Xc -endif -ifneq ($(BINUTILSPREFIX),) -override FPCOPT+=-Xr$(RLINKPATH) -endif -endif -ifdef UNITDIR -override FPCOPT+=$(addprefix -Fu,$(UNITDIR)) -endif -ifdef LIBDIR -override FPCOPT+=$(addprefix -Fl,$(LIBDIR)) -endif -ifdef OBJDIR -override FPCOPT+=$(addprefix -Fo,$(OBJDIR)) -endif -ifdef INCDIR -override FPCOPT+=$(addprefix -Fi,$(INCDIR)) -endif -ifdef LINKSMART -override FPCOPT+=-XX -endif -ifdef CREATESMART -override FPCOPT+=-CX -endif -ifdef DEBUG -override FPCOPT+=-gl -override FPCOPTDEF+=DEBUG -endif -ifdef RELEASE -ifneq ($(findstring 2.0.,$(FPC_VERSION)),) -ifeq ($(CPU_TARGET),i386) -FPCCPUOPT:=-OG2p3 -endif -ifeq ($(CPU_TARGET),powerpc) -FPCCPUOPT:=-O1r -endif -else -FPCCPUOPT:=-O2 -endif -override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n -override FPCOPTDEF+=RELEASE -endif -ifdef STRIP -override FPCOPT+=-Xs -endif -ifdef OPTIMIZE -override FPCOPT+=-O2 -endif -ifdef VERBOSE -override FPCOPT+=-vwni -endif -ifdef COMPILER_OPTIONS -override FPCOPT+=$(COMPILER_OPTIONS) -endif -ifdef COMPILER_UNITDIR -override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR)) -endif -ifdef COMPILER_LIBRARYDIR -override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR)) -endif -ifdef COMPILER_OBJECTDIR -override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR)) -endif -ifdef COMPILER_INCLUDEDIR -override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR)) -endif -ifdef CROSSBINDIR -override FPCOPT+=-FD$(CROSSBINDIR) -endif -ifdef COMPILER_TARGETDIR -override FPCOPT+=-FE$(COMPILER_TARGETDIR) -ifeq ($(COMPILER_TARGETDIR),.) -override TARGETDIRPREFIX= -else -override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/ -endif -endif -ifdef COMPILER_UNITTARGETDIR -override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR) -ifeq ($(COMPILER_UNITTARGETDIR),.) -override UNITTARGETDIRPREFIX= -else -override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/ -endif -else -ifdef COMPILER_TARGETDIR -override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR) -override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX) -endif -endif -ifdef CREATESHARED -override FPCOPT+=-Cg -ifeq ($(CPU_TARGET),i386) -override FPCOPT+=-Aas -endif -endif -ifdef LINKSHARED -endif -ifdef OPT -override FPCOPT+=$(OPT) -endif -ifdef FPCOPTDEF -override FPCOPT+=$(addprefix -d,$(FPCOPTDEF)) -endif -ifdef CFGFILE -override FPCOPT+=@$(CFGFILE) -endif -ifdef USEENV -override FPCEXTCMD:=$(FPCOPT) -override FPCOPT:=!FPCEXTCMD -export FPCEXTCMD -endif -override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET) -override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE) -ifneq ($(AFULL_TARGET),$(AFULL_SOURCE)) -override ACROSSCOMPILE=1 -endif -ifdef ACROSSCOMPILE -override FPCOPT+=$(CROSSOPT) -endif -override COMPILER:=$(FPC) $(FPCOPT) -ifeq (,$(findstring -s ,$(COMPILER))) -EXECPPAS= -else -ifeq ($(FULL_SOURCE),$(FULL_TARGET)) -EXECPPAS:=@$(PPAS) -endif -endif -ifdef TARGET_RSTS -override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS)) -override CLEANRSTFILES+=$(RSTFILES) -endif -.PHONY: fpc_examples -ifneq ($(TARGET_EXAMPLES),) -HASEXAMPLES=1 -override EXAMPLESOURCEFILES:=$(wildcard $(addsuffix .pp,$(TARGET_EXAMPLES)) $(addsuffix .pas,$(TARGET_EXAMPLES)) $(addsuffix .lpr,$(TARGET_EXAMPLES)) $(addsuffix .dpr,$(TARGET_EXAMPLES))) -override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(TARGET_EXAMPLES)) -override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(TARGET_EXAMPLES)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_EXAMPLES))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_EXAMPLES))) -override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES) -ifeq ($(OS_TARGET),os2) -override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES)) -endif -ifeq ($(OS_TARGET),emx) -override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES)) -endif -endif -ifneq ($(TARGET_EXAMPLEDIRS),) -HASEXAMPLES=1 -endif -fpc_examples: all $(EXAMPLEFILES) $(addsuffix _all,$(TARGET_EXAMPLEDIRS)) -.PHONY: fpc_clean fpc_cleanall fpc_distclean -ifdef EXEFILES -override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES)) -endif -ifdef CLEAN_UNITS -override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS)) -endif -ifdef CLEANPPUFILES -override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) -ifdef DEBUGSYMEXT -override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES)) -endif -override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES)) -override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))) -endif -fpc_clean: $(CLEANTARGET) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif -ifdef CLEANPPUFILES - -$(DEL) $(CLEANPPUFILES) -endif -ifneq ($(CLEANPPULINKFILES),) - -$(DEL) $(CLEANPPULINKFILES) -endif -ifdef CLEANRSTFILES - -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES)) -endif -ifdef CLEAN_FILES - -$(DEL) $(CLEAN_FILES) -endif -ifdef LIB_NAME - -$(DEL) $(LIB_NAME) $(LIB_FULLNAME) -endif - -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE) - -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT) -fpc_cleanall: $(CLEANTARGET) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif -ifdef COMPILER_UNITTARGETDIR -ifdef CLEANPPUFILES - -$(DEL) $(CLEANPPUFILES) -endif -ifneq ($(CLEANPPULINKFILES),) - -$(DEL) $(CLEANPPULINKFILES) -endif -ifdef CLEANRSTFILES - -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES)) -endif -endif - -$(DELTREE) units - -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT) -ifneq ($(PPUEXT),.ppu) - -$(DEL) *.o *.ppu *.a -endif - -$(DELTREE) *$(SMARTEXT) - -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE) - -$(DEL) *_ppas$(BATCHEXT) -ifdef AOUTEXT - -$(DEL) *$(AOUTEXT) -endif -ifdef DEBUGSYMEXT - -$(DEL) *$(DEBUGSYMEXT) -endif -fpc_distclean: cleanall -.PHONY: fpc_baseinfo -override INFORULES+=fpc_baseinfo -fpc_baseinfo: - @$(ECHO) - @$(ECHO) == Package info == - @$(ECHO) Package Name..... $(PACKAGE_NAME) - @$(ECHO) Package Version.. $(PACKAGE_VERSION) - @$(ECHO) - @$(ECHO) == Configuration info == - @$(ECHO) - @$(ECHO) FPC.......... $(FPC) - @$(ECHO) FPC Version.. $(FPC_VERSION) - @$(ECHO) Source CPU... $(CPU_SOURCE) - @$(ECHO) Target CPU... $(CPU_TARGET) - @$(ECHO) Source OS.... $(OS_SOURCE) - @$(ECHO) Target OS.... $(OS_TARGET) - @$(ECHO) Full Source.. $(FULL_SOURCE) - @$(ECHO) Full Target.. $(FULL_TARGET) - @$(ECHO) SourceSuffix. $(SOURCESUFFIX) - @$(ECHO) TargetSuffix. $(TARGETSUFFIX) - @$(ECHO) - @$(ECHO) == Directory info == - @$(ECHO) - @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES) - @$(ECHO) - @$(ECHO) Basedir......... $(BASEDIR) - @$(ECHO) FPCDir.......... $(FPCDIR) - @$(ECHO) CrossBinDir..... $(CROSSBINDIR) - @$(ECHO) UnitsDir........ $(UNITSDIR) - @$(ECHO) PackagesDir..... $(PACKAGESDIR) - @$(ECHO) - @$(ECHO) GCC library..... $(GCCLIBDIR) - @$(ECHO) Other library... $(OTHERLIBDIR) - @$(ECHO) - @$(ECHO) == Tools info == - @$(ECHO) - @$(ECHO) As........ $(AS) - @$(ECHO) Ld........ $(LD) - @$(ECHO) Ar........ $(AR) - @$(ECHO) Rc........ $(RC) - @$(ECHO) - @$(ECHO) Mv........ $(MVPROG) - @$(ECHO) Cp........ $(CPPROG) - @$(ECHO) Rm........ $(RMPROG) - @$(ECHO) GInstall.. $(GINSTALL) - @$(ECHO) Echo...... $(ECHO) - @$(ECHO) Shell..... $(SHELL) - @$(ECHO) Date...... $(DATE) - @$(ECHO) FPCMake... $(FPCMAKE) - @$(ECHO) PPUMove... $(PPUMOVE) - @$(ECHO) Upx....... $(UPXPROG) - @$(ECHO) Zip....... $(ZIPPROG) - @$(ECHO) - @$(ECHO) == Object info == - @$(ECHO) - @$(ECHO) Target Loaders........ $(TARGET_LOADERS) - @$(ECHO) Target Units.......... $(TARGET_UNITS) - @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS) - @$(ECHO) Target Programs....... $(TARGET_PROGRAMS) - @$(ECHO) Target Dirs........... $(TARGET_DIRS) - @$(ECHO) Target Examples....... $(TARGET_EXAMPLES) - @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS) - @$(ECHO) - @$(ECHO) Clean Units......... $(CLEAN_UNITS) - @$(ECHO) Clean Files......... $(CLEAN_FILES) - @$(ECHO) - @$(ECHO) Install Units....... $(INSTALL_UNITS) - @$(ECHO) Install Files....... $(INSTALL_FILES) - @$(ECHO) - @$(ECHO) == Install info == - @$(ECHO) - @$(ECHO) DateStr.............. $(DATESTR) - @$(ECHO) ZipName.............. $(ZIPNAME) - @$(ECHO) ZipPrefix............ $(ZIPPREFIX) - @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX) - @$(ECHO) ZipSuffix............ $(ZIPSUFFIX) - @$(ECHO) FullZipName.......... $(FULLZIPNAME) - @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE) - @$(ECHO) - @$(ECHO) Install base dir..... $(INSTALL_BASEDIR) - @$(ECHO) Install binary dir... $(INSTALL_BINDIR) - @$(ECHO) Install library dir.. $(INSTALL_LIBDIR) - @$(ECHO) Install units dir.... $(INSTALL_UNITDIR) - @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR) - @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR) - @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR) - @$(ECHO) Install data dir..... $(INSTALL_DATADIR) - @$(ECHO) - @$(ECHO) Dist destination dir. $(DIST_DESTDIR) - @$(ECHO) Dist zip name........ $(DIST_ZIPNAME) - @$(ECHO) -.PHONY: fpc_info -fpc_info: $(INFORULES) -.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \ - fpc_makefile_dirs -fpc_makefile: - $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc -fpc_makefile_sub1: -ifdef TARGET_DIRS - $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS)) -endif -ifdef TARGET_EXAMPLEDIRS - $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS)) -endif -fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS)) -fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2 -fpc_makefiles: fpc_makefile fpc_makefile_dirs -ifeq ($(FULL_TARGET),i386-linux) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),i386-go32v2) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),i386-win32) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),i386-os2) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),i386-freebsd) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),i386-beos) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),i386-netbsd) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),i386-solaris) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),i386-qnx) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),i386-netware) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),i386-openbsd) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),i386-wdosx) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),i386-darwin) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),i386-emx) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),i386-watcom) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),i386-wince) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),m68k-linux) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),m68k-amiga) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),m68k-atari) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),m68k-palmos) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),powerpc-linux) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),powerpc-macos) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),sparc-linux) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),sparc-solaris) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),x86_64-linux) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),x86_64-win64) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),arm-linux) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),arm-palmos) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),arm-wince) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),arm-gba) -TARGET_DIRS_SRC=1 -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -TARGET_DIRS_SRC=1 -endif -ifdef TARGET_DIRS_SRC -src_all: - $(MAKE) -C src all -src_debug: - $(MAKE) -C src debug -src_smart: - $(MAKE) -C src smart -src_release: - $(MAKE) -C src release -src_units: - $(MAKE) -C src units -src_examples: - $(MAKE) -C src examples -src_shared: - $(MAKE) -C src shared -src_install: - $(MAKE) -C src install -src_sourceinstall: - $(MAKE) -C src sourceinstall -src_exampleinstall: - $(MAKE) -C src exampleinstall -src_distinstall: - $(MAKE) -C src distinstall -src_zipinstall: - $(MAKE) -C src zipinstall -src_zipsourceinstall: - $(MAKE) -C src zipsourceinstall -src_zipexampleinstall: - $(MAKE) -C src zipexampleinstall -src_zipdistinstall: - $(MAKE) -C src zipdistinstall -src_clean: - $(MAKE) -C src clean -src_distclean: - $(MAKE) -C src distclean -src_cleanall: - $(MAKE) -C src cleanall -src_info: - $(MAKE) -C src info -src_makefiles: - $(MAKE) -C src makefiles -src: - $(MAKE) -C src all -.PHONY: src_all src_debug src_smart src_release src_units src_examples src_shared src_install src_sourceinstall src_exampleinstall src_distinstall src_zipinstall src_zipsourceinstall src_zipexampleinstall src_zipdistinstall src_clean src_distclean src_cleanall src_info src_makefiles src -endif -ifeq ($(FULL_TARGET),i386-linux) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-go32v2) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-win32) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-os2) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-freebsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-beos) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-netbsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-solaris) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-qnx) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-netware) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-openbsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-wdosx) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-darwin) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-emx) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-watcom) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),i386-wince) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),m68k-linux) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),m68k-amiga) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),m68k-atari) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),m68k-palmos) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),powerpc-linux) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),powerpc-macos) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),sparc-linux) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),sparc-solaris) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),x86_64-linux) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),x86_64-win64) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),arm-linux) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),arm-palmos) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),arm-wince) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),arm-gba) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -TARGET_EXAMPLEDIRS_EXAMPLES=1 -endif -ifdef TARGET_EXAMPLEDIRS_EXAMPLES -examples_all: - $(MAKE) -C examples all -examples_debug: - $(MAKE) -C examples debug -examples_smart: - $(MAKE) -C examples smart -examples_release: - $(MAKE) -C examples release -examples_units: - $(MAKE) -C examples units -examples_examples: - $(MAKE) -C examples examples -examples_shared: - $(MAKE) -C examples shared -examples_install: - $(MAKE) -C examples install -examples_sourceinstall: - $(MAKE) -C examples sourceinstall -examples_exampleinstall: - $(MAKE) -C examples exampleinstall -examples_distinstall: - $(MAKE) -C examples distinstall -examples_zipinstall: - $(MAKE) -C examples zipinstall -examples_zipsourceinstall: - $(MAKE) -C examples zipsourceinstall -examples_zipexampleinstall: - $(MAKE) -C examples zipexampleinstall -examples_zipdistinstall: - $(MAKE) -C examples zipdistinstall -examples_clean: - $(MAKE) -C examples clean -examples_distclean: - $(MAKE) -C examples distclean -examples_cleanall: - $(MAKE) -C examples cleanall -examples_info: - $(MAKE) -C examples info -examples_makefiles: - $(MAKE) -C examples makefiles -examples: - $(MAKE) -C examples all -.PHONY: examples_all examples_debug examples_smart examples_release examples_units examples_examples examples_shared examples_install examples_sourceinstall examples_exampleinstall examples_distinstall examples_zipinstall examples_zipsourceinstall examples_zipexampleinstall examples_zipdistinstall examples_clean examples_distclean examples_cleanall examples_info examples_makefiles examples -endif -all: $(addsuffix _all,$(TARGET_DIRS)) -debug: $(addsuffix _debug,$(TARGET_DIRS)) -smart: $(addsuffix _smart,$(TARGET_DIRS)) -release: $(addsuffix _release,$(TARGET_DIRS)) -units: $(addsuffix _units,$(TARGET_DIRS)) -examples: fpc_examples $(addsuffix _examples,$(TARGET_DIRS)) -shared: $(addsuffix _shared,$(TARGET_DIRS)) -install: $(addsuffix _install,$(TARGET_DIRS)) -sourceinstall: $(addsuffix _sourceinstall,$(TARGET_DIRS)) -exampleinstall: $(addsuffix _exampleinstall,$(TARGET_DIRS)) -distinstall: $(addsuffix _distinstall,$(TARGET_DIRS)) -zipinstall: $(addsuffix _zipinstall,$(TARGET_DIRS)) -zipsourceinstall: $(addsuffix _zipsourceinstall,$(TARGET_DIRS)) -zipexampleinstall: $(addsuffix _zipexampleinstall,$(TARGET_DIRS)) -zipdistinstall: $(addsuffix _zipdistinstall,$(TARGET_DIRS)) -clean: $(addsuffix _clean,$(TARGET_DIRS)) $(addsuffix _clean,$(TARGET_EXAMPLEDIRS)) -distclean: $(addsuffix _distclean,$(TARGET_DIRS)) -cleanall: $(addsuffix _cleanall,$(TARGET_DIRS)) -info: fpc_info -makefiles: fpc_makefiles $(addsuffix _makefiles,$(TARGET_DIRS)) -.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles -ifneq ($(wildcard fpcmake.loc),) -include fpcmake.loc -endif diff --git a/Makefile.fpc b/Makefile.fpc deleted file mode 100644 index 3426c475..00000000 --- a/Makefile.fpc +++ /dev/null @@ -1,7 +0,0 @@ -# -# Makefile.fpc for fpGFX base tree -# - -[target] -dirs=src -exampledirs=examples diff --git a/TODO.txt b/TODO.txt deleted file mode 100644 index 0b44b796..00000000 --- a/TODO.txt +++ /dev/null @@ -1,51 +0,0 @@ - - These are all the noted issues with fpGUI so far. - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - -* Selecting text in a Edit field doesn't work. - -* Password edit resizes while you are typing. (minor property fix required) - -* Scrollbar doesn't scroll when you keep the mouse clicked on the up or down - arrows of the scrollbar. - -* (fixed) Scrollbar PageSize property doesn't work 100%. See widgettest demo. - -* Scrollbox seems to work, as it is used internally in the ListBox component. - The demo in the Widget Test Demo app needs to improve though. - -* ComboBox component needs to be completed. - - The dropdown window has borders. (fixed but needs testing). - - The arrow button doesn't close the dropdown window. (fixed but needs testing) - - Text input doesn't work. (n/a combobox is a selection only component) - - Dropdown window width is incorrect. - - Dropdown doesn't close when combobox looses focus. - -* (started) Menu's need to be implemented. - -* Label component needs to be enhanced to allow for keyboard shortcuts and - underline the keyboard shortcut letter. - -* Dialog components need to be added to the Widget Test Demo. - -* More standard dialog components need to be added. Example: File Dialog, - Color Dialog, Diretory Select Dialog, etc. - -* Tab component needs to be created. - -* Toolbar component needs to be created. - -* Treeview component needs to be created. Maybe look at porting the - Virtual Treeview component. That can double up as a altenate ListBox - component as well. - -* Slider component - -* (completed basics) Progress Bar component - -* (completed basics) Panel component - -* (started) Gauge/Dial/Needle component. - - - -------oO0Oo------- diff --git a/docs/xml/gfx/fpgfx.xml b/docs/xml/gfx/fpgfx.xml deleted file mode 100644 index 25459e0c..00000000 --- a/docs/xml/gfx/fpgfx.xml +++ /dev/null @@ -1,92 +0,0 @@ -<?xml version="1.0"?> -<fpdoc-descriptions> - <package name="fpGFX"> - <!-- - ==================================================================== - fpgfx - ==================================================================== ---> - <module name="fpgfx"> - <short /> - <descr></descr> - <!-- unresolved type reference Visibility: default --> - <element name="Classes"> - <short /> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="SysUtils"> - <short /> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="gfxinterface"> - <short /> - <descr></descr> - <seealso></seealso> - </element> - <!-- object Visibility: default --> - <element name="TFFont"> - <short /> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- object Visibility: default --> - <element name="TFCanvas"> - <short /> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- object Visibility: default --> - <element name="TFBitmap"> - <short /> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- object Visibility: default --> - <element name="TFScreen"> - <short /> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- object Visibility: default --> - <element name="TFWindow" /> - <!-- object Visibility: default --> - <element name="TFApplication"> - <short /> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function Visibility: default --> - <element name="GFScreen"> - <short /> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="GFScreen.Result"> - <short /> - </element> - <!-- function Visibility: default --> - <element name="GFApplication"> - <short /> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="GFApplication.Result"> - <short /> - </element> - </module> - <!-- fpgfx --> - </package> -</fpdoc-descriptions> diff --git a/docs/xml/gfx/geldirty.xml b/docs/xml/gfx/geldirty.xml deleted file mode 100644 index 677e4773..00000000 --- a/docs/xml/gfx/geldirty.xml +++ /dev/null @@ -1,150 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<fpdoc-descriptions> - <package name="fpGFX"> - <!-- - ==================================================================== - GELDirty - ==================================================================== ---> - <module name="GELDirty"> - <short></short> - <descr></descr> - <!-- unresolved type reference Visibility: default --> - <element name="Classes"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="GfxBase"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- pointer type Visibility: default --> - <element name="PDirtyListEntry"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- record type Visibility: default --> - <element name="TDirtyListEntry"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TDirtyListEntry.Prev"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TDirtyListEntry.Next"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TDirtyListEntry.Window"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TDirtyListEntry.Rect"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- object Visibility: default --> - <element name="TDirtyList"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TDirtyList.FFirst"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TDirtyList.FLast"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- procedure Visibility: protected --> - <element name="TDirtyList.RemoveEntry"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TDirtyList.RemoveEntry.AEntry"> - <short></short> - </element> - <!-- destructor Visibility: public --> - <element name="TDirtyList.Destroy"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- procedure Visibility: public --> - <element name="TDirtyList.AddRect"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TDirtyList.AddRect.AWindow"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TDirtyList.AddRect.ARect"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TDirtyList.ClearQueueForWindow"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TDirtyList.ClearQueueForWindow.AWindow"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TDirtyList.PaintQueueForWindow"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TDirtyList.PaintQueueForWindow.AWindow"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TDirtyList.PaintAll"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- property Visibility: public --> - <element name="TDirtyList.First"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - </module> - <!-- GELDirty --> - </package> -</fpdoc-descriptions> diff --git a/docs/xml/gfx/gelimage.xml b/docs/xml/gfx/gelimage.xml deleted file mode 100644 index c3b6ab6d..00000000 --- a/docs/xml/gfx/gelimage.xml +++ /dev/null @@ -1,109 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<fpdoc-descriptions> - <package name="fpGFX"> - <!-- - ==================================================================== - GELImage - ==================================================================== ---> - <module name="GELImage"> - <short></short> - <descr></descr> - <!-- unresolved type reference Visibility: default --> - <element name="Classes"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="GfxBase"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- procedure Visibility: default --> - <element name="ConvertImage"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="ConvertImage.ASourceRect"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="ConvertImage.ASourceFormat"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="ConvertImage.ASourcePal"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="ConvertImage.ASourceData"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="ConvertImage.ASourceStride"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="ConvertImage.ADestX"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="ConvertImage.ADestY"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="ConvertImage.ADestFormat"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="ConvertImage.ADestData"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="ConvertImage.ADestStride"> - <short></short> - </element> - <!-- procedure Visibility: default --> - <element name="FlipMonoImageBits"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="FlipMonoImageBits.ASourceRect"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="FlipMonoImageBits.ASourceData"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="FlipMonoImageBits.ASourceStride"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="FlipMonoImageBits.ADestX"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="FlipMonoImageBits.ADestY"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="FlipMonoImageBits.ADestData"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="FlipMonoImageBits.ADestStride"> - <short></short> - </element> - </module> - <!-- GELImage --> - </package> -</fpdoc-descriptions> diff --git a/docs/xml/gfx/gfx_x11.xml b/docs/xml/gfx/gfx_x11.xml deleted file mode 100644 index b8e7c87b..00000000 --- a/docs/xml/gfx/gfx_x11.xml +++ /dev/null @@ -1,1402 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<fpdoc-descriptions> - <package name="fpGFX"> - <!-- - ==================================================================== - GFX_X11 - ==================================================================== ---> - <module name="GFX_X11"> - <short></short> - <descr></descr> - <!-- unresolved type reference Visibility: default --> - <element name="SysUtils"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="Classes"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="X"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="XLib"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="XUtil"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="GfxBase"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="GELDirty"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- resource string Visibility: default --> - <element name="SGCCreationFailed"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- resource string Visibility: default --> - <element name="SXCanvasInvalidFontClass"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- resource string Visibility: default --> - <element name="SOpenDisplayFailed"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- resource string Visibility: default --> - <element name="SWindowCreationFailed"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- resource string Visibility: default --> - <element name="SWindowUnsupportedPixelFormat"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- resource string Visibility: default --> - <element name="SNoDefaultFont"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- resource string Visibility: default --> - <element name="SIncompatibleCanvasForBlitting"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- object Visibility: default --> - <element name="EX11Error"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- object Visibility: default --> - <element name="TX11Canvas"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- object Visibility: default --> - <element name="TX11Application"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function type Visibility: default --> - <element name="TX11EventFilter"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11EventFilter.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11EventFilter.AEvent"> - <short></short> - </element> - <!-- object Visibility: default --> - <element name="TX11Font"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Font.FFontStruct"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- constructor Visibility: public --> - <element name="TX11Font.Create"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Font.Create.Descriptor"> - <short></short> - </element> - <!-- destructor Visibility: public --> - <element name="TX11Font.Destroy"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function Visibility: public --> - <element name="TX11Font.GetDefaultFontName"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11Font.GetDefaultFontName.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Font.GetDefaultFontName.AFontClass"> - <short></short> - </element> - <!-- property Visibility: public --> - <element name="TX11Font.FontStruct"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- pointer type Visibility: default --> - <element name="PX11CanvasState"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- record type Visibility: default --> - <element name="TX11CanvasState"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TX11CanvasState.Prev"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TX11CanvasState.Matrix"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TX11CanvasState.Region"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TX11CanvasState.Color"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TX11CanvasState.Font"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Canvas.FGC"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Canvas.FVisual"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Canvas.FRegion"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Canvas.FDefaultFont"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Canvas.FFontStruct"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Canvas.FStateStackpointer"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Canvas.FColormap"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Canvas.FCurColor"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Canvas.FFont"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- procedure Visibility: private --> - <element name="TX11Canvas.Resized"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.Resized.NewWidth"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.Resized.NewHeight"> - <short></short> - </element> - <!-- function Visibility: protected --> - <element name="TX11Canvas.DoExcludeClipRect"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11Canvas.DoExcludeClipRect.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoExcludeClipRect.ARect"> - <short></short> - </element> - <!-- function Visibility: protected --> - <element name="TX11Canvas.DoIntersectClipRect"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11Canvas.DoIntersectClipRect.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoIntersectClipRect.ARect"> - <short></short> - </element> - <!-- function Visibility: protected --> - <element name="TX11Canvas.DoUnionClipRect"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11Canvas.DoUnionClipRect.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoUnionClipRect.ARect"> - <short></short> - </element> - <!-- function Visibility: protected --> - <element name="TX11Canvas.DoGetClipRect"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11Canvas.DoGetClipRect.Result"> - <short></short> - </element> - <!-- procedure Visibility: protected --> - <element name="TX11Canvas.DoDrawArc"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoDrawArc.ARect"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoDrawArc.StartAngle"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoDrawArc.EndAngle"> - <short></short> - </element> - <!-- procedure Visibility: protected --> - <element name="TX11Canvas.DoDrawCircle"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoDrawCircle.ARect"> - <short></short> - </element> - <!-- procedure Visibility: protected --> - <element name="TX11Canvas.DoDrawLine"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoDrawLine.AFrom"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoDrawLine.ATo"> - <short></short> - </element> - <!-- procedure Visibility: protected --> - <element name="TX11Canvas.DoDrawRect"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoDrawRect.ARect"> - <short></short> - </element> - <!-- procedure Visibility: protected --> - <element name="TX11Canvas.DoDrawPoint"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoDrawPoint.APoint"> - <short></short> - </element> - <!-- procedure Visibility: protected --> - <element name="TX11Canvas.DoFillRect"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoFillRect.ARect"> - <short></short> - </element> - <!-- procedure Visibility: protected --> - <element name="TX11Canvas.DoFillTriangle"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoFillTriangle.P1"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoFillTriangle.P2"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoFillTriangle.P3"> - <short></short> - </element> - <!-- procedure Visibility: protected --> - <element name="TX11Canvas.DoTextOut"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoTextOut.APosition"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoTextOut.AText"> - <short></short> - </element> - <!-- procedure Visibility: protected --> - <element name="TX11Canvas.DoCopyRect"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoCopyRect.ASource"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoCopyRect.ASourceRect"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoCopyRect.ADestPos"> - <short></short> - </element> - <!-- procedure Visibility: protected --> - <element name="TX11Canvas.DoMaskedCopyRect"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoMaskedCopyRect.ASource"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoMaskedCopyRect.AMask"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoMaskedCopyRect.ASourceRect"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoMaskedCopyRect.AMaskPos"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoMaskedCopyRect.ADestPos"> - <short></short> - </element> - <!-- procedure Visibility: protected --> - <element name="TX11Canvas.DoDrawImageRect"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoDrawImageRect.AImage"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoDrawImageRect.ASourceRect"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DoDrawImageRect.ADestPos"> - <short></short> - </element> - <!-- constructor Visibility: public --> - <element name="TX11Canvas.Create"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.Create.AColormap"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.Create.AXDrawable"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.Create.ADefaultFont"> - <short></short> - </element> - <!-- destructor Visibility: public --> - <element name="TX11Canvas.Destroy"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function Visibility: public --> - <element name="TX11Canvas.MapColor"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11Canvas.MapColor.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.MapColor.AColor"> - <short></short> - </element> - <!-- function Visibility: public --> - <element name="TX11Canvas.FontCellHeight"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11Canvas.FontCellHeight.Result"> - <short></short> - </element> - <!-- function Visibility: public --> - <element name="TX11Canvas.TextExtent"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11Canvas.TextExtent.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.TextExtent.AText"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Canvas.SaveState"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Canvas.RestoreState"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Canvas.EmptyClipRect"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Canvas.SetColor_"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.SetColor_.AColor"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Canvas.SetFont"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.SetFont.AFont"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Canvas.SetLineStyle"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.SetLineStyle.ALineStyle"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Canvas.DrawPolyLine"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Canvas.DrawPolyLine.Coords"> - <short></short> - </element> - <!-- property Visibility: public --> - <element name="TX11Canvas.GC"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- property Visibility: public --> - <element name="TX11Canvas.Visual"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- property Visibility: public --> - <element name="TX11Canvas.Colormap"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- property Visibility: public --> - <element name="TX11Canvas.Region"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- object Visibility: default --> - <element name="TX11WindowCanvas"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- constructor Visibility: public --> - <element name="TX11WindowCanvas.Create"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11WindowCanvas.Create.AColormap"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11WindowCanvas.Create.AXDrawable"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11WindowCanvas.Create.ADefaultFont"> - <short></short> - </element> - <!-- object Visibility: default --> - <element name="TX11PixmapCanvas"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- constructor Visibility: public --> - <element name="TX11PixmapCanvas.Create"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11PixmapCanvas.Create.AColormap"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11PixmapCanvas.Create.AHandle"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11PixmapCanvas.Create.APixelFormat"> - <short></short> - </element> - <!-- destructor Visibility: public --> - <element name="TX11PixmapCanvas.Destroy"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- object Visibility: default --> - <element name="TX11MonoPixmapCanvas"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- constructor Visibility: default --> - <element name="TX11MonoPixmapCanvas.Create"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11MonoPixmapCanvas.Create.AColormap"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11MonoPixmapCanvas.Create.AHandle"> - <short></short> - </element> - <!-- object Visibility: default --> - <element name="TX11Bitmap"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Bitmap.IsLocked"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- constructor Visibility: public --> - <element name="TX11Bitmap.Create"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Bitmap.Create.AWidth"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Bitmap.Create.AHeight"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Bitmap.Create.APixelFormat"> - <short></short> - </element> - <!-- destructor Visibility: public --> - <element name="TX11Bitmap.Destroy"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Bitmap.Lock"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Bitmap.Lock.AData"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Bitmap.Lock.AStride"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Bitmap.Unlock"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- object Visibility: default --> - <element name="TX11Screen"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Screen.FScreenIndex"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Screen.FScreenInfo"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- procedure Visibility: protected --> - <element name="TX11Screen.SetMousePos"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Screen.SetMousePos.NewPos"> - <short></short> - </element> - <!-- function Visibility: protected --> - <element name="TX11Screen.GetMousePos"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11Screen.GetMousePos.Result"> - <short></short> - </element> - <!-- constructor Visibility: public --> - <element name="TX11Screen.Create"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function Visibility: public --> - <element name="TX11Screen.CreateBitmapCanvas"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11Screen.CreateBitmapCanvas.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Screen.CreateBitmapCanvas.AWidth"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Screen.CreateBitmapCanvas.AHeight"> - <short></short> - </element> - <!-- function Visibility: public --> - <element name="TX11Screen.CreateMonoBitmapCanvas"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11Screen.CreateMonoBitmapCanvas.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Screen.CreateMonoBitmapCanvas.AWidth"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Screen.CreateMonoBitmapCanvas.AHeight"> - <short></short> - </element> - <!-- property Visibility: public --> - <element name="TX11Screen.ScreenIndex"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- property Visibility: public --> - <element name="TX11Screen.ScreenInfo"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Application.DoBreakRun"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Application.FDirtyList"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Application.FDisplayName"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Application.FDefaultFont"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Application.FEventFilter"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Application.Handle"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Application.FWMProtocols"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Application.FWMDeleteWindow"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Application.FWMHints"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- property Visibility: private --> - <element name="TX11Application.DirtyList"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- function Visibility: private --> - <element name="TX11Application.FindWindowByXID"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11Application.FindWindowByXID.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Application.FindWindowByXID.XWindowID"> - <short></short> - </element> - <!-- constructor Visibility: public --> - <element name="TX11Application.Create"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- destructor Visibility: public --> - <element name="TX11Application.Destroy"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Application.Initialize"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Application.Initialize.ADisplayName"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Application.Run"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Application.Quit"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- property Visibility: public --> - <element name="TX11Application.DisplayName"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- property Visibility: public --> - <element name="TX11Application.EventFilter"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- object Visibility: default --> - <element name="TX11Window"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Window.FComposeStatus"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Window.FComposeBuffer"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: private --> - <element name="TX11Window.FCurCursorHandle"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- function Visibility: private --> - <element name="TX11Window.StartComposing"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11Window.StartComposing.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.StartComposing.Event"> - <short></short> - </element> - <!-- procedure Visibility: private --> - <element name="TX11Window.EndComposing"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- procedure Visibility: private --> - <element name="TX11Window.Expose"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.Expose.Event"> - <short></short> - </element> - <!-- procedure Visibility: private --> - <element name="TX11Window.Configure"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.Configure.Event"> - <short></short> - </element> - <!-- procedure Visibility: private --> - <element name="TX11Window.ClientMessage"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.ClientMessage.Event"> - <short></short> - </element> - <!-- variable Visibility: protected --> - <element name="TX11Window.IsExposing"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: protected --> - <element name="TX11Window.CanMaximize"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- function Visibility: protected --> - <element name="TX11Window.GetTitle"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11Window.GetTitle.Result"> - <short></short> - </element> - <!-- function Visibility: protected --> - <element name="TX11Window.ConvertShiftState"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11Window.ConvertShiftState.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.ConvertShiftState.AState"> - <short></short> - </element> - <!-- function Visibility: protected --> - <element name="TX11Window.KeySymToKeycode"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TX11Window.KeySymToKeycode.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.KeySymToKeycode.KeySym"> - <short></short> - </element> - <!-- procedure Visibility: protected --> - <element name="TX11Window.SetTitle"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.SetTitle.ATitle"> - <short></short> - </element> - <!-- procedure Visibility: protected --> - <element name="TX11Window.DoSetCursor"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- procedure Visibility: protected --> - <element name="TX11Window.UpdateMotifWMHints"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- constructor Visibility: public --> - <element name="TX11Window.Create"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.Create.AParent"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.Create.AWindowOptions"> - <short></short> - </element> - <!-- destructor Visibility: public --> - <element name="TX11Window.Destroy"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Window.SetPosition"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.SetPosition.APosition"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Window.SetSize"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.SetSize.ASize"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Window.SetMinMaxSize"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.SetMinMaxSize.AMinSize"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.SetMinMaxSize.AMaxSize"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Window.SetClientSize"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.SetClientSize.ASize"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Window.SetMinMaxClientSize"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.SetMinMaxClientSize.AMinSize"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.SetMinMaxClientSize.AMaxSize"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Window.Show"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Window.Invalidate"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.Invalidate.ARect"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Window.PaintInvalidRegion"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Window.CaptureMouse"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Window.ReleaseMouse"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- procedure Visibility: public --> - <element name="TX11Window.ProcessEvent"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TX11Window.ProcessEvent.AEvent"> - <short></short> - </element> - <!-- variable Visibility: default --> - <element name="LeaderWindow"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="ClientLeaderAtom"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- function Visibility: default --> - <element name="RectToXRect"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="RectToXRect.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="RectToXRect.ARect"> - <short></short> - </element> - <!-- function Visibility: default --> - <element name="XRectToRect"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="XRectToRect.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XRectToRect.ARect"> - <short></short> - </element> - <!-- function Visibility: default --> - <element name="GetXEventName"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="GetXEventName.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="GetXEventName.Event"> - <short></short> - </element> - </module> - <!-- GFX_X11 --> - </package> -</fpdoc-descriptions> diff --git a/docs/xml/gfx/gfxbase.xml b/docs/xml/gfx/gfxbase.xml deleted file mode 100644 index da931e40..00000000 --- a/docs/xml/gfx/gfxbase.xml +++ /dev/null @@ -1,4332 +0,0 @@ -<?xml version="1.0"?> -<fpdoc-descriptions> - <package name="fpGFX"> - <!-- - ==================================================================== - GfxBase - ==================================================================== ---> - <module name="GfxBase"> - <short /> - <descr /> - <!-- unresolved type reference Visibility: default --> - <element name="SysUtils"> - <short /> - <descr /> - <seealso /> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="Classes"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyNul"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyBackSpace"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyTab"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyLinefeed"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyReturn"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyEscape"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDelete"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyVoid"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyBreak"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyScrollForw"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyScrollBack"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyBoot"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyCompose"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keySAK"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyUndo"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyRedo"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyMenu"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyCancel"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPrintScreen"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyExecute"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyFind"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyBegin"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyClear"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyInsert"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keySelect"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyMacro"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyHelp"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDo"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPause"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyStop"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keySysRq"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyModeSwitch"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyUp"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDown"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyLeft"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyRight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPrior"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPageUp"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyNext"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPageDown"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyHome"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyEnd"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF0"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF1"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF2"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF3"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF4"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF5"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF6"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF7"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF8"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF9"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF10"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF11"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF12"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF13"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF14"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF15"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF16"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF17"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF18"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF19"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF20"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF21"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF22"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF23"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF24"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF25"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF26"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF27"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF28"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF29"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF30"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF31"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF32"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF33"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF34"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF35"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF36"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF37"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF38"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF39"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF40"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF41"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF42"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF43"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF44"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF45"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF46"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF47"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF48"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF49"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF50"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF51"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF52"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF53"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF54"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF55"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF56"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF57"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF58"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF59"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF60"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF61"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF62"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF63"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyF64"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyP0"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyP1"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyP2"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyP3"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyP4"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyP5"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyP6"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyP7"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyP8"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyP9"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPA"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPB"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPC"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPD"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPE"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPF"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPPlus"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPMinus"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPSlash"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPAsterisk"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPStar"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPEqual"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPSeparator"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPDecimal"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPParenLeft"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPParenRight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPSpace"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPEnter"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPTab"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPPlusMinus"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPBegin"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPF1"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPF2"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPF3"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPF4"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPF5"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPF6"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPF7"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPF8"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPF9"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyShift"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyCtrl"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyAlt"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyMeta"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keySuper"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyHyper"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyAltGr"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyCaps"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyNum"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyScroll"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyShiftL"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyShiftR"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyCtrlL"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyCtrlR"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyAltL"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyAltR"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyMetaL"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyMetaR"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keySuperL"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keySuperR"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyHyperL"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyHyperR"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyShiftLock"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyCtrlLock"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyAltLock"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyMetaLock"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keySuperLock"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyHyperLock"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyAltGrLock"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyCapsLock"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyNumLock"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyScrollLock"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadRing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadCaron"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadOgonek"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadIota"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadDoubleAcute"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadBreve"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadAboveDot"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadBelowDot"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadVoicedSound"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadSemiVoicedSound"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadAcute"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadCedilla"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadCircumflex"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadDiaeresis"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadGrave"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadTilde"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDeadMacron"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyNIL"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyEcuSign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyColonSign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyCruzeiroSign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyFFrancSign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyLiraSign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyMillSign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyNairaSign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyPesetaSign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyRupeeSign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyWonSign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyNewSheqelSign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyDongSign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="keyEuroSign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- resource string Visibility: default --> - <element name="SUnsupportedPixelFormat"> - <short /> - <descr /> - <seealso /> - </element> - <!-- resource string Visibility: default --> - <element name="SIncompatibleCanvasForBlitting"> - <short /> - <descr /> - <seealso /> - </element> - <!-- record type Visibility: default --> - <element name="TSize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TSize.cx"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TSize.cy"> - <short /> - <descr /> - <seealso /> - </element> - <!-- record type Visibility: default --> - <element name="TGfxMatrix"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TGfxMatrix._00"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TGfxMatrix._20"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TGfxMatrix._11"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TGfxMatrix._21"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="GfxIdentityMatrix"> - <short /> - <descr /> - <seealso /> - </element> - <!-- pointer type Visibility: default --> - <element name="PGfxColor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- record type Visibility: default --> - <element name="TGfxColor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TGfxColor.Red"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TGfxColor.Green"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TGfxColor.Blue"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TGfxColor.Alpha"> - <short /> - <descr /> - <seealso /> - </element> - <!-- pointer type Visibility: default --> - <element name="PGfxPixel"> - <short /> - <descr /> - <seealso /> - </element> - <!-- alias type Visibility: default --> - <element name="TGfxPixel"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration type Visibility: default --> - <element name="TGfxImageType"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxImageType.ftInvalid"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxImageType.ftMono"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxImageType.ftPal4"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxImageType.ftPal4A"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxImageType.ftPal8"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxImageType.ftPal8A"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxImageType.ftRGB16"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxImageType.ftRGBA16"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxImageType.ftRGB24"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxImageType.ftRGB32"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxImageType.ftRGBA32"> - <short /> - </element> - <!-- record type Visibility: default --> - <element name="TGfxPixelFormat"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TGfxPixelFormat.FormatType"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TGfxPixelFormat.RedMask"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TGfxPixelFormat.GreenMask"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TGfxPixelFormat.BlueMask"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TGfxPixelFormat.AlphaMask"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="FormatTypeBPPTable"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colTransparent"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colBlack"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colBlue"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colGreen"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colCyan"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colRed"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colMagenta"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colYellow"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colWhite"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colGray"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colLtGray"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colDkBlue"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colDkGreen"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colDkCyan"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colDkRed"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colDkMagenta"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="colDkYellow"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="webBlack"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="webMaroon"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="webGreen"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="webOlive"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="webNavy"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="webPurple"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="webTeal"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="webGray"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="webSilver"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="webRed"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="webLime"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="webYellow"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="webBlue"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="webFuchsia"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="webAqua"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="webWhite"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="PixelFormatMono"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="PixelFormatPal4"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="PixelFormatPal4A"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="PixelFormatPal8"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="PixelFormatPal8A"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="PixelFormatRGB16"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="PixelFormatRGB24"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="PixelFormatRGB32"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="PixelFormatRGBA32"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="EGfxError"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="EGfxUnsupportedPixelFormat"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- constructor Visibility: default --> - <element name="EGfxUnsupportedPixelFormat.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="EGfxUnsupportedPixelFormat.Create.APixelFormat"> - - <short /> - </element> - <!-- object Visibility: default --> - <element name="TFCustomBitmap"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TFCustomApplication"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TFCustomWindow"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- enumeration type Visibility: default --> - <element name="TFWindowOption"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFWindowOption.woWindow"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFWindowOption.woBorderless"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFWindowOption.woPopup"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFWindowOption.woToolWindow"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFWindowOption.woChildWindow"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFWindowOption.woX11SkipWMHints"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFWindowOption.woModal"> - <short /> - </element> - <!-- set type Visibility: default --> - <element name="TFWindowOptions"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration type Visibility: default --> - <element name="TFCursor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFCursor.crDefault"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFCursor.crNone"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFCursor.crArrow"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFCursor.crCross"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFCursor.crIBeam"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFCursor.crSize"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFCursor.crSizeNS"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFCursor.crSizeWE"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFCursor.cpUpArrow"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFCursor.crHourGlass"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFCursor.crNoDrop"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFCursor.crHelp"> - <short /> - </element> - <!-- enumeration type Visibility: default --> - <element name="TMouseButton"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TMouseButton.mbLeft"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TMouseButton.mbRight"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TMouseButton.mbMiddle"> - <short /> - </element> - <!-- enumeration type Visibility: default --> - <element name="TFEventType"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etCreate"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etCanClose"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etClose"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etFocusIn"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etFocusOut"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etHide"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etKeyPressed"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etKeyReleased"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etKeyChar"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etMouseEnter"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etMouseLeave"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etMousePressed"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etMouseReleased"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etMouseMove"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etMouseWheel"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etPaint"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etMove"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etResize"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TFEventType.etShow"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TFEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TFEvent.Msg"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TFEvent.wparam"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TFEvent.lparam"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TFEvent.Result"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TFEvent.MouseButton"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TFEvent.EventPointer"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TFEvent.State"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TFEvent.Button"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TFEvent.X"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TFEvent.Y"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TFEvent.Width"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TFEvent.Height"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TFEvent.EventType"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration type Visibility: default --> - <element name="TGfxFontClass"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxFontClass.fcSerif"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxFontClass.fcSansSerif"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxFontClass.fcTypewriter"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxFontClass.fcDingbats"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TFCustomFont"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomFont.FHandle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TFCustomFont.GetDefaultFontName"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomFont.GetDefaultFontName.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomFont.GetDefaultFontName.AFontClass"> - <short /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomFont.Handle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TGfxPalette"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TGfxPalette.FRefCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TGfxPalette.FEntryCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TGfxPalette.FEntries"> - <short /> - <descr /> - <seealso /> - </element> - <!-- function Visibility: private --> - <element name="TGfxPalette.GetEntry"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TGfxPalette.GetEntry.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxPalette.GetEntry.AIndex"> - <short /> - </element> - <!-- constructor Visibility: public --> - <element name="TGfxPalette.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxPalette.Create.AEntryCount"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxPalette.Create.AEntries"> - <short /> - </element> - <!-- destructor Visibility: public --> - <element name="TGfxPalette.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TGfxPalette.AddRef"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TGfxPalette.Release"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TGfxPalette.EntryCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TGfxPalette.Entries"> - <short /> - <descr /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxPalette.Entries.AIndex"> - <short /> - </element> - <!-- enumeration type Visibility: default --> - <element name="TGfxLineStyle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxLineStyle.lsSolid"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGfxLineStyle.lsDot"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TFCustomCanvas"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomCanvas.FMatrix"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomCanvas.FWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomCanvas.FHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomCanvas.FHandle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomCanvas.FPixelFormat"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomCanvas.FColor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- function Visibility: protected --> - <element name="TFCustomCanvas.DoExcludeClipRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomCanvas.DoExcludeClipRect.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoExcludeClipRect.ARect"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TFCustomCanvas.DoIntersectClipRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomCanvas.DoIntersectClipRect.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoIntersectClipRect.ARect"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TFCustomCanvas.DoUnionClipRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomCanvas.DoUnionClipRect.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoUnionClipRect.ARect"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TFCustomCanvas.DoGetClipRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomCanvas.DoGetClipRect.Result"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TFCustomCanvas.DoDrawArc"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoDrawArc.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoDrawArc.StartAngle"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoDrawArc.EndAngle"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TFCustomCanvas.DoDrawCircle"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoDrawCircle.ARect"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TFCustomCanvas.DoDrawLine"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoDrawLine.AFrom"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoDrawLine.ATo"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TFCustomCanvas.DoDrawRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoDrawRect.ARect"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TFCustomCanvas.DoDrawPoint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoDrawPoint.APoint"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TFCustomCanvas.DoFillRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoFillRect.ARect"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TFCustomCanvas.DoFillTriangle"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoFillTriangle.P1"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoFillTriangle.P2"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoFillTriangle.P3"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TFCustomCanvas.DoTextOut"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoTextOut.APosition"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoTextOut.AText"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TFCustomCanvas.DoCopyRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoCopyRect.ASource"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoCopyRect.ASourceRect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoCopyRect.ADestPos"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TFCustomCanvas.DoMaskedCopyRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoMaskedCopyRect.ASource"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoMaskedCopyRect.AMask"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoMaskedCopyRect.ASourceRect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoMaskedCopyRect.AMaskPos"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoMaskedCopyRect.ADestPos"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TFCustomCanvas.DoDrawImageRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoDrawImageRect.AImage"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoDrawImageRect.ASourceRect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DoDrawImageRect.ADestPos"> - <short /> - </element> - <!-- constructor Visibility: public --> - <element name="TFCustomCanvas.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TFCustomCanvas.Transform"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomCanvas.Transform.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.Transform.APoint"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.Transform.ARect"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TFCustomCanvas.ReverseTransform"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomCanvas.ReverseTransform.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.ReverseTransform.APoint"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.ReverseTransform.ARect"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.AppendTranslation"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.AppendTranslation.ADelta"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.SaveState"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.RestoreState"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.EmptyClipRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.SetColor_"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.SetColor_.AColor"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.SetColor"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.SetColor.AColor"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.SetFont"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.SetFont.AFont"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.SetLineStyle"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.SetLineStyle.ALineStyle"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TFCustomCanvas.ExcludeClipRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomCanvas.ExcludeClipRect.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.ExcludeClipRect.ARect"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TFCustomCanvas.IntersectClipRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomCanvas.IntersectClipRect.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.IntersectClipRect.ARect"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TFCustomCanvas.UnionClipRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomCanvas.UnionClipRect.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.UnionClipRect.ARect"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TFCustomCanvas.GetClipRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomCanvas.GetClipRect.Result"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TFCustomCanvas.MapColor"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomCanvas.MapColor.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.MapColor.AColor"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TFCustomCanvas.GetColor"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomCanvas.GetColor.Result"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.DrawArc"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DrawArc.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DrawArc.StartAngle"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DrawArc.EndAngle"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.DrawCircle"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DrawCircle.ARect"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.DrawLine"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DrawLine.AFrom"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DrawLine.ATo"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.DrawPolyLine"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DrawPolyLine.Coords"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.DrawRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DrawRect.ARect"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.DrawPoint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DrawPoint.APoint"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.FillRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.FillRect.ARect"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.FillTriangle"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.FillTriangle.P1"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.FillTriangle.P2"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.FillTriangle.P3"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TFCustomCanvas.FontCellHeight"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomCanvas.FontCellHeight.Result"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TFCustomCanvas.TextExtent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomCanvas.TextExtent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.TextExtent.AText"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TFCustomCanvas.TextWidth"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomCanvas.TextWidth.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.TextWidth.AText"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.TextOut"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.TextOut.APosition"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.TextOut.AText"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.Copy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.Copy.ASource"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.Copy.ADestPos"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.CopyRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.CopyRect.ASource"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.CopyRect.ASourceRect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.CopyRect.ADestPos"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.MaskedCopy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.MaskedCopy.ASource"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.MaskedCopy.AMask"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.MaskedCopy.ADestPos"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.MaskedCopyRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.MaskedCopyRect.ASource"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.MaskedCopyRect.AMask"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.MaskedCopyRect.ASourceRect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.MaskedCopyRect.AMaskPos"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.MaskedCopyRect.ADestPos"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.DrawImage"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DrawImage.AImage"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DrawImage.ADestPos"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomCanvas.DrawImageRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DrawImageRect.AImage"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DrawImageRect.ASourceRect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomCanvas.DrawImageRect.ADestPos"> - <short /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomCanvas.Width"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomCanvas.Height"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomCanvas.PixelFormat"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomCanvas.Matrix"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomCanvas.Handle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomBitmap.FWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomBitmap.FHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomBitmap.FPixelFormat"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomBitmap.FPalette"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TFCustomBitmap.SetPalette"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomBitmap.SetPalette.APalette"> - <short /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomBitmap.FHandle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomBitmap.FStride"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomBitmap.FData"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TFCustomBitmap.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomBitmap.Create.AWidth"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomBitmap.Create.AHeight"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomBitmap.Create.APixelFormat"> - <short /> - </element> - <!-- destructor Visibility: public --> - <element name="TFCustomBitmap.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomBitmap.Lock"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomBitmap.Lock.AData"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomBitmap.Lock.AStride"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomBitmap.Unlock"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomBitmap.SetPixelsFromData"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomBitmap.SetPixelsFromData.AData"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomBitmap.SetPixelsFromData.AStride"> - <short /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomBitmap.Width"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomBitmap.Height"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomBitmap.PixelFormat"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomBitmap.Palette"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomBitmap.Handle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomBitmap.Data"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomBitmap.Stride"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TFCustomScreen"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TFCustomScreen.SetMousePos"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomScreen.SetMousePos.NewPos"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TFCustomScreen.GetMousePos"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomScreen.GetMousePos.Result"> - <short /> - </element> - <!-- constructor Visibility: public --> - <element name="TFCustomScreen.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TFCustomScreen.CreateBitmapCanvas"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomScreen.CreateBitmapCanvas.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomScreen.CreateBitmapCanvas.AWidth"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomScreen.CreateBitmapCanvas.AHeight"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TFCustomScreen.CreateMonoBitmapCanvas"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomScreen.CreateMonoBitmapCanvas.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomScreen.CreateMonoBitmapCanvas.AWidth"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomScreen.CreateMonoBitmapCanvas.AHeight"> - - <short /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomScreen.MousePos"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomApplication.FOnIdle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomApplication.FQuitWhenLastWindowCloses"> - - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomApplication.FDisplayName"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomApplication.FTitle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TFCustomApplication.SetTitle"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomApplication.SetTitle.ATitle"> - <short /> - </element> - <!-- variable Visibility: public --> - <element name="TFCustomApplication.Forms"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TFCustomApplication.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- destructor Visibility: public --> - <element name="TFCustomApplication.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomApplication.AddWindow"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomApplication.AddWindow.AWindow"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomApplication.RemoveWindow"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomApplication.RemoveWindow.AWindow"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomApplication.Initialize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomApplication.Initialize.ADisplayName"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomApplication.Run"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomApplication.Quit"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomApplication.OnIdle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomApplication.QuitWhenLastWindowCloses"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomApplication.Title"> - <short /> - <descr /> - <seealso /> - </element> - <!-- function type Visibility: default --> - <element name="TGfxCanCloseEvent"> - <short /> - <descr /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TGfxCanCloseEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxCanCloseEvent.Sender"> - <short /> - </element> - <!-- procedure type Visibility: default --> - <element name="TGfxKeyEvent"> - <short /> - <descr /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxKeyEvent.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxKeyEvent.AKey"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxKeyEvent.AShift"> - <short /> - </element> - <!-- procedure type Visibility: default --> - <element name="TGfxKeyCharEvent"> - <short /> - <descr /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxKeyCharEvent.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxKeyCharEvent.AKeyChar"> - <short /> - </element> - <!-- procedure type Visibility: default --> - <element name="TGfxMouseButtonEvent"> - <short /> - <descr /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxMouseButtonEvent.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxMouseButtonEvent.AButton"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxMouseButtonEvent.AShift"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxMouseButtonEvent.AMousePos"> - <short /> - </element> - <!-- procedure type Visibility: default --> - <element name="TGfxMouseMoveEvent"> - <short /> - <descr /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxMouseMoveEvent.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxMouseMoveEvent.AShift"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxMouseMoveEvent.AMousePos"> - <short /> - </element> - <!-- procedure type Visibility: default --> - <element name="TGfxMouseWheelEvent"> - <short /> - <descr /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxMouseWheelEvent.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxMouseWheelEvent.AShift"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxMouseWheelEvent.AWheelDelta"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxMouseWheelEvent.AMousePos"> - <short /> - </element> - <!-- procedure type Visibility: default --> - <element name="TGfxPaintEvent"> - <short /> - <descr /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxPaintEvent.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TGfxPaintEvent.ARect"> - <short /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FCursor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnCreate"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnCanClose"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnClose"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnFocusIn"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnFocusOut"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnHide"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnKeyPressed"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnKeyReleased"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnKeyChar"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnMouseEnter"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnMouseLeave"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnMousePressed"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnMouseReleased"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnMouseMove"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnMouseWheel"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnPaint"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnMove"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnResize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TFCustomWindow.FOnShow"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TFCustomWindow.SetClientHeight"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.SetClientHeight.AValue"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TFCustomWindow.SetClientWidth"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.SetClientWidth.AValue"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TFCustomWindow.SetLeft"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.SetLeft.AValue"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TFCustomWindow.SetTop"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.SetTop.AValue"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TFCustomWindow.SetWidth"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.SetWidth.AWidth"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TFCustomWindow.SetHeight"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.SetHeight.AHeight"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TFCustomWindow.SetCursor"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.SetCursor.ACursor"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TFCustomWindow.SetWindowOptions"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.SetWindowOptions.AValue"> - <short /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomWindow.FHandle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomWindow.FParent"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomWindow.FCanvas"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomWindow.FLeft"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomWindow.FTop"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomWindow.FWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomWindow.FHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomWindow.FClientWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomWindow.FClientHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomWindow.FWindowOptions"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomWindow.FChildWindows"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomWindow.FMinSize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TFCustomWindow.FMaxSize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- function Visibility: protected --> - <element name="TFCustomWindow.GetTitle"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomWindow.GetTitle.Result"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TFCustomWindow.SetTitle"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.SetTitle.ATitle"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TFCustomWindow.DoSetCursor"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TFCustomWindow.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.Create.AParent"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.Create.AWindowOptions"> - <short /> - </element> - <!-- destructor Visibility: public --> - <element name="TFCustomWindow.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TFCustomWindow.CanClose"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TFCustomWindow.CanClose.Result"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomWindow.SetPosition"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.SetPosition.APosition"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomWindow.SetSize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.SetSize.ASize"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomWindow.SetMinMaxSize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.SetMinMaxSize.AMinSize"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.SetMinMaxSize.AMaxSize"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomWindow.SetClientSize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.SetClientSize.ASize"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomWindow.SetMinMaxClientSize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.SetMinMaxClientSize.AMinSize"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.SetMinMaxClientSize.AMaxSize"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomWindow.Show"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomWindow.Invalidate"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.Invalidate.ARect"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomWindow.PaintInvalidRegion"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomWindow.CaptureMouse"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomWindow.ReleaseMouse"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TFCustomWindow.ProcessEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFCustomWindow.ProcessEvent.AEvent"> - <short /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.WindowOptions"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.Canvas"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.Handle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.ChildWindows"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.Left"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.Top"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.Width"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.Height"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.ClientWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.ClientHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.Cursor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.Title"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.Parent"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnCreate"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnCanClose"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnClose"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnFocusIn"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnFocusOut"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnHide"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnKeyPressed"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnKeyReleased"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnKeyChar"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnMouseEnter"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnMouseLeave"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnMousePressed"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnMouseReleased"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnMouseMove"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnMouseWheel"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnPaint"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnMove"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnResize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TFCustomWindow.OnShow"> - <short /> - <descr /> - <seealso /> - </element> - <!-- function Visibility: default --> - <element name="Size"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="Size.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="Size.AWidth"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="Size.AHeight"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="Size.ARect"> - <short /> - </element> - <!-- function Visibility: default --> - <element name="PtInRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="PtInRect.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="PtInRect.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="PtInRect.APoint"> - <short /> - </element> - <!-- function Visibility: default --> - <element name="operator ="> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="operator =.__INVALID__"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="operator =.ASize1"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="operator =.ASize2"> - <short /> - </element> - <!-- function Visibility: default --> - <element name="operator +"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="operator +.__INVALID__"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="operator +.APoint1"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="operator +.APoint2"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="operator +.APoint"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="operator +.ASize"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="operator +.ASize1"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="operator +.ASize2"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="operator +.i"> - <short /> - </element> - <!-- function Visibility: default --> - <element name="operator -"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="operator -.__INVALID__"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="operator -.APoint1"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="operator -.APoint2"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="operator -.APoint"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="operator -.i"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="operator -.ASize"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="operator =.AColor1"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="operator =.AColor2"> - <short /> - </element> - <!-- function Visibility: default --> - <element name="GetAvgColor"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="GetAvgColor.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="GetAvgColor.AColor1"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="GetAvgColor.AColor2"> - <short /> - </element> - <!-- function Visibility: default --> - <element name="KeycodeToText"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="KeycodeToText.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="KeycodeToText.Key"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="KeycodeToText.ShiftState"> - <short /> - </element> - </module> - <!-- GfxBase --> - </package> -</fpdoc-descriptions> diff --git a/docs/xml/gfx/gfxinterface.xml b/docs/xml/gfx/gfxinterface.xml deleted file mode 100644 index 7a525c1a..00000000 --- a/docs/xml/gfx/gfxinterface.xml +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<fpdoc-descriptions> -<package name="fpGFX"> - -<!-- - ==================================================================== - gfxinterface - ==================================================================== ---> - -<module name="gfxinterface"> -<short></short> -<descr> -</descr> - -<!-- unresolved type reference Visibility: default --> -<element name="GFX_X11"> -<short></short> -<descr> -</descr> -<seealso> -</seealso> -</element> - -<!-- alias type Visibility: default --> -<element name="TDefCanvas"> -<short></short> -<descr> -</descr> -<seealso> -</seealso> -</element> - -<!-- alias type Visibility: default --> -<element name="TDefFont"> -<short></short> -<descr> -</descr> -<seealso> -</seealso> -</element> - -<!-- alias type Visibility: default --> -<element name="TDefScreen"> -<short></short> -<descr> -</descr> -<seealso> -</seealso> -</element> - -<!-- alias type Visibility: default --> -<element name="TDefApplication"> -<short></short> -<descr> -</descr> -<seealso> -</seealso> -</element> - -<!-- alias type Visibility: default --> -<element name="TDefWindow"> -<short></short> -<descr> -</descr> -<seealso> -</seealso> -</element> - -<!-- alias type Visibility: default --> -<element name="TDefBitmap"> -<short></short> -<descr> -</descr> -<seealso> -</seealso> -</element> - -</module> <!-- gfxinterface --> - -</package> -</fpdoc-descriptions> diff --git a/docs/xml/gfx/unitxft.xml b/docs/xml/gfx/unitxft.xml deleted file mode 100644 index ca8ab965..00000000 --- a/docs/xml/gfx/unitxft.xml +++ /dev/null @@ -1,635 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<fpdoc-descriptions> - <package name="fpGFX"> - <!-- - ==================================================================== - unitxft - ==================================================================== ---> - <module name="unitxft"> - <short></short> - <descr></descr> - <!-- unresolved type reference Visibility: default --> - <element name="Classes"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="SysUtils"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="X"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="XLib"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="Xutil"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- alias type Visibility: default --> - <element name="TPicture"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- record type Visibility: default --> - <element name="TXftDraw"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXftDraw.dummy"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- pointer type Visibility: default --> - <element name="PXftDraw"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- record type Visibility: default --> - <element name="TXftFont"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXftFont.ascent"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXftFont.descent"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXftFont.height"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXftFont.max_advance_width"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXftFont.ptr1"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXftFont.ptr2"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- pointer type Visibility: default --> - <element name="PXftFont"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- record type Visibility: default --> - <element name="TXRenderColor"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXRenderColor.red"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXRenderColor.green"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXRenderColor.blue"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXRenderColor.alpha"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- record type Visibility: default --> - <element name="TXftColor"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXftColor.pixel"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXftColor.color"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- record type Visibility: default --> - <element name="TXGlyphInfo"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXGlyphInfo.width"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXGlyphInfo.height"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXGlyphInfo.x"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXGlyphInfo.y"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXGlyphInfo.xOff"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TXGlyphInfo.yOff"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- record type Visibility: default --> - <element name="TFcPattern"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TFcPattern.dummy"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- pointer type Visibility: default --> - <element name="PFcPattern"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- pointer type Visibility: default --> - <element name="PPFcPattern"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- record type Visibility: default --> - <element name="TFcFontSet"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TFcFontSet.nfont"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TFcFontSet.sfont"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- variable Visibility: default --> - <element name="TFcFontSet.fonts"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- pointer type Visibility: default --> - <element name="PFcFontSet"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- constant Visibility: default --> - <element name="FC_FAMILY"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- constant Visibility: default --> - <element name="FC_SIZE"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- constant Visibility: default --> - <element name="FC_SCALABLE"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- constant Visibility: default --> - <element name="FcTypeVoid"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- constant Visibility: default --> - <element name="FcTypeInteger"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- constant Visibility: default --> - <element name="FcTypeDouble"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- constant Visibility: default --> - <element name="FcTypeString"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- constant Visibility: default --> - <element name="FcTypeBool"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- constant Visibility: default --> - <element name="FcTypeMatrix"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- constant Visibility: default --> - <element name="FcTypeCharSet"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- constant Visibility: default --> - <element name="FcTypeFTFace"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- constant Visibility: default --> - <element name="FcTypeLangSet"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- function Visibility: default --> - <element name="XftDrawCreate"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="XftDrawCreate.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawCreate.display"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawCreate.win"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawCreate.vis"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawCreate.colorm"> - <short></short> - </element> - <!-- procedure Visibility: default --> - <element name="XftDrawChange"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawChange.xftd"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawChange.win"> - <short></short> - </element> - <!-- procedure Visibility: default --> - <element name="XftDrawDestroy"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawDestroy.draw"> - <short></short> - </element> - <!-- function Visibility: default --> - <element name="XftDrawPicture"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="XftDrawPicture.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawPicture.draw"> - <short></short> - </element> - <!-- function Visibility: default --> - <element name="XftFontOpenName"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="XftFontOpenName.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftFontOpenName.display"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftFontOpenName.scr"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftFontOpenName.par3"> - <short></short> - </element> - <!-- procedure Visibility: default --> - <element name="XftFontClose"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="XftFontClose.display"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftFontClose.fnt"> - <short></short> - </element> - <!-- procedure Visibility: default --> - <element name="XftDrawString8"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawString8.draw"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawString8.col"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawString8.fnt"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawString8.x"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawString8.y"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawString8.txt"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawString8.len"> - <short></short> - </element> - <!-- procedure Visibility: default --> - <element name="XftDrawString16"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawString16.draw"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawString16.col"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawString16.fnt"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawString16.x"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawString16.y"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawString16.txt"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawString16.len"> - <short></short> - </element> - <!-- procedure Visibility: default --> - <element name="XftTextExtents16"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="XftTextExtents16.display"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftTextExtents16.fnt"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftTextExtents16.txt"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftTextExtents16.len"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftTextExtents16.extents"> - <short></short> - </element> - <!-- procedure Visibility: default --> - <element name="XftTextExtents8"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="XftTextExtents8.display"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftTextExtents8.fnt"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftTextExtents8.txt"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftTextExtents8.len"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftTextExtents8.extents"> - <short></short> - </element> - <!-- procedure Visibility: default --> - <element name="XftDrawSetClip"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawSetClip.draw"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftDrawSetClip.rg"> - <short></short> - </element> - <!-- function Visibility: default --> - <element name="XftListFonts"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="XftListFonts.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftListFonts.display"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftListFonts.screen"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftListFonts.params"> - <short></short> - </element> - <!-- function Visibility: default --> - <element name="XftNameUnparse"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="XftNameUnparse.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftNameUnparse.pat"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftNameUnparse.dest"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="XftNameUnparse.destlen"> - <short></short> - </element> - <!-- procedure Visibility: default --> - <element name="FcFontSetDestroy"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="FcFontSetDestroy.fsp"> - <short></short> - </element> - </module> - <!-- unitxft --> - </package> -</fpdoc-descriptions> diff --git a/docs/xml/gui/examples/TComboBox.ex1.pas b/docs/xml/gui/examples/TComboBox.ex1.pas deleted file mode 100644 index 8414a9d6..00000000 --- a/docs/xml/gui/examples/TComboBox.ex1.pas +++ /dev/null @@ -1,10 +0,0 @@ -{ This example shows how we can setup a static TComboBox } - cbStyle := TComboBox.Create(self); - cbStyle.CanExpandWidth := True; - cbStyle.Items.Add('Windows'); // insert items into the combobox - cbStyle.Items.Add('WindowsXP'); - cbStyle.Items.Add('Motif'); - cbStyle.Items.Add('ClearLooks'); - cbStyle.Items.Add('OpenSoft'); - cbStyle.OnChange := @cbStyleChanged; // setup an event handler - cbStyle.ItemIndex := 0; // select the first item diff --git a/docs/xml/gui/examples/TGroupBox.ex1.pas b/docs/xml/gui/examples/TGroupBox.ex1.pas deleted file mode 100644 index 86c2eeba..00000000 --- a/docs/xml/gui/examples/TGroupBox.ex1.pas +++ /dev/null @@ -1,20 +0,0 @@ -{ The following example shows how we can set up a TGroupBox with a layout } - grpOne := TGroupBox.Create('Group Box 1', self); - grpOne.CanExpandWidth := True; - - VBox1 := TFBoxLayout.Create(self); - VBox1.Orientation := Vertical; - grpOne.InsertChild(VBox1); - - Radio1 := TRadioButton.Create('Radio button 1', self); - Radio2 := TRadioButton.Create('Radio button 2', self); - Radio3 := TRadioButton.Create('Radio button 3', self); - - Radio1.Checked := True; - Radio1.CanExpandWidth := True; - Radio2.CanExpandWidth := True; - Radio3.CanExpandWidth := True; - - VBox1.InsertChild(Radio1); - VBox1.InsertChild(Radio2); - VBox1.InsertChild(Radio3); diff --git a/docs/xml/gui/examples/TStyleManager.RegisterClass.pas b/docs/xml/gui/examples/TStyleManager.RegisterClass.pas deleted file mode 100644 index 5518386f..00000000 --- a/docs/xml/gui/examples/TStyleManager.RegisterClass.pas +++ /dev/null @@ -1,6 +0,0 @@ -initialization - gStyleManager.RegisterClass(cDefaultStyle, TWindowsStyle); - gStyleManager.RegisterClass('Windows', TWindowsStyle); - gStyleManager.RegisterClass('OpenSoft', TOpenSoftStyle); - gStyleManager.RegisterClass('Motif', TMotifStyle); - diff --git a/docs/xml/gui/fpgui.xml b/docs/xml/gui/fpgui.xml deleted file mode 100644 index 5a1cd297..00000000 --- a/docs/xml/gui/fpgui.xml +++ /dev/null @@ -1,9063 +0,0 @@ -<?xml version="1.0"?> -<fpdoc-descriptions> - <package name="fpgui"> - <!-- - ==================================================================== - fpGUI - ==================================================================== ---> - <module name="fpGUI"> - <short>fpGUI is a GUI (graphical user interface) library for - Free Pascal</short> - <descr> - <printshort id="fpGUI" />. It is fully object-oriented; its - main goal is to provide its services independent of any - operating system or graphics environment. All painting is - done using fpGFX, while fpGUI provides a comfortable widget - set and other high-level classes.</descr> - <!-- unresolved type reference Visibility: default --> - <element name="SysUtils"> - <short /> - <descr /> - <seealso /> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="Classes"> - <short /> - <descr /> - <seealso /> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="DOM"> - <short /> - <descr /> - <seealso /> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="GFXBase"> - <short>Base unit from the fpGFX package.</short> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="GFXImpl"> - <short>Abstract unit interfacing to the correct widget set. - Part of fpGFX package.</short> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="Contnrs"> - <short /> - <descr /> - <seealso /> - </element> - <!-- "type" alias type Visibility: default --> - <element name="TColor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="InfiniteSize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clScrollBar"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clMenu"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clWindow"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clMenuText"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clWindowText"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clAppWorkSpace"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clHighlight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clHighlightText"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="cl3DFace"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="cl3DShadow"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clGrayText"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clBtnText"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="cl3DHighlight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="cl3DDkShadow"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="cl3DLight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clInfoText"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clInfoBk"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clBlack"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clMaroon"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clOlive"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clNavy"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clPurple"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clTeal"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clGray"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clSilver"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clLime"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clFuchsia"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clAqua"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clLtGray"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clDkGray"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clWhite"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clBtnFace"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clBtnShadow"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clBtnHighlight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clAliceBlue"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clAntiqueWhite"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clAquamarine"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clAzure"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clBeige"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clBisque"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clBlanchedAlmond"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clBlueViolet"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clBrown"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clBurlyWood"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clCadetBlue"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clChartreuse"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clChocolate"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clLightYellow"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clCornsilk"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clMidnightBlue"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clDarkWhite"> - <short /> - <descr /> - <seealso /> - </element> - <!-- resource string Visibility: default --> - <element name="mbText_Yes"> - <short /> - <descr /> - <seealso /> - </element> - <!-- resource string Visibility: default --> - <element name="mbText_No"> - <short /> - <descr /> - <seealso /> - </element> - <!-- resource string Visibility: default --> - <element name="mbText_Ok"> - <short /> - <descr /> - <seealso /> - </element> - <!-- resource string Visibility: default --> - <element name="mbText_Cancel"> - <short /> - <descr /> - <seealso /> - </element> - <!-- resource string Visibility: default --> - <element name="mbText_Apply"> - <short /> - <descr /> - <seealso /> - </element> - <!-- resource string Visibility: default --> - <element name="mbText_Abort"> - <short /> - <descr /> - <seealso /> - </element> - <!-- resource string Visibility: default --> - <element name="mbText_Retry"> - <short /> - <descr /> - <seealso /> - </element> - <!-- resource string Visibility: default --> - <element name="mbText_Ignore"> - <short /> - <descr /> - <seealso /> - </element> - <!-- resource string Visibility: default --> - <element name="mbText_All"> - <short /> - <descr /> - <seealso /> - </element> - <!-- resource string Visibility: default --> - <element name="mbText_NoToAll"> - <short /> - <descr /> - <seealso /> - </element> - <!-- resource string Visibility: default --> - <element name="mbText_YesToAll"> - <short /> - <descr /> - <seealso /> - </element> - <!-- resource string Visibility: default --> - <element name="mbText_Help"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TEventObj"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TCustomForm" /> - <!-- set type Visibility: default --> - <element name="TWidgetState"> - <short>The states a widget can be in.</short> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWidgetState.wsEnabled"> - <short>Is the widget currently enabled or disabled?</short> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWidgetState.wsIsVisible"> - <short>Widget and parents are visible</short> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWidgetState.wsSizeIsForced"> - <short>If the current size has been forced - no auto - resizes</short> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWidgetState.wsHasFocus"> - <short>Widget has the input focus</short> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWidgetState.wsMouseInside"> - <short>Mouse cursor is inside this widget</short> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWidgetState.wsClicked"> - <short>User currently clicked on this widget</short> - </element> - <!-- enumeration type Visibility: default --> - <element name="TOrientation"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TOrientation.Horizontal"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TOrientation.Vertical"> - <short /> - </element> - <!-- set type Visibility: default --> - <element name="TButtonFlags"> - <short>Internal Button flags or states</short> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TButtonFlags.btnIsEmbedded"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TButtonFlags.btnIsDefault"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TButtonFlags.btnIsPressed"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TButtonFlags.btnIsSelected"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TButtonFlags.btnHasFocus"> - <short /> - </element> - <!-- set type Visibility: default --> - <element name="TCheckboxFlags"> - <short>Internal CheckBox flags or states</short> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TCheckboxFlags.cbIsPressed"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TCheckboxFlags.cbHasFocus"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TCheckboxFlags.cbIsEnabled"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TCheckboxFlags.cbIsChecked"> - <short /> - </element> - <!-- enumeration type Visibility: default --> - <element name="TMsgDlgBtn"> - <short>Enumerated list of message dialog buttons</short> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TMsgDlgBtn.mbYes"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TMsgDlgBtn.mbNo"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TMsgDlgBtn.mbOK"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TMsgDlgBtn.mbCancel"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TMsgDlgBtn.mbApply"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TMsgDlgBtn.mbAbort"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TMsgDlgBtn.mbRetry"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TMsgDlgBtn.mbIgnore"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TMsgDlgBtn.mbAll"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TMsgDlgBtn.mbNoToAll"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TMsgDlgBtn.mbYesToAll"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TMsgDlgBtn.mbHelp"> - <short /> - </element> - <!-- set type Visibility: default --> - <element name="TMsgDlgButtons"> - <short /> - <descr /> - <seealso /> - </element> - <!-- set type Visibility: default --> - <element name="TItemFlags"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TItemFlags.ifFocused"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TItemFlags.ifSelected"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TItemFlags.ifDeactivated"> - <short /> - </element> - <!-- enumeration type Visibility: default --> - <element name="TArrowDirection"> - <short>Enumerated arrow directions.</short> - <descr>This gets used in drawing the arrow in ComboBox - butons or Scrollbar buttons.</descr> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TArrowDirection.arrowUp"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TArrowDirection.arrowDown"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TArrowDirection.arrowLeft"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TArrowDirection.arrowRight"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TStyleAbs"> - <short>The TStyleAbs class is an abstract base class that - encapsulates the look and feel of a GUI.</short> - <descr>fpGUI contains a set of TStyleAbs subclasses that - emulate the styles of the different platforms supported by - fpGUI (TWindowsStyle, TMotifStyle, etc.). By default, these - styles are built into the fpGUI library. Styles are - preferably applied application wide, but can also be - applied per widget. fpGUI's built-in widgets use TStyleAbs to - perform all of their drawing, ensuring that they look - exactly like the equivalent native widgets.</descr> - <seealso> - <link id="TBasicStyle" /> - </seealso> - </element> - <!-- variable Visibility: protected --> - <element name="TStyleAbs.UIColorCache"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TStyleAbs.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.Create.ADisplay"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.UpdateUIColorCache"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TStyleAbs.GetGUIColor"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TStyleAbs.GetGUIColor.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.GetGUIColor.Color"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TStyleAbs.GetUIColor"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TStyleAbs.GetUIColor.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.GetUIColor.AColor"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.SetUIColor"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.SetUIColor.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.SetUIColor.Color"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.DrawText"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawText.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawText.APosition"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawText.AText"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawText.State"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.DrawItemBefore"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawItemBefore.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawItemBefore.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawItemBefore.Flags"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.DrawItemAfter"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawItemAfter.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawItemAfter.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawItemAfter.Flags"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.DrawWindowBackground"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawWindowBackground.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawWindowBackground.ARect"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.DrawButtonFace"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawButtonFace.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawButtonFace.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawButtonFace.Flags"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TStyleAbs.GetButtonBorders"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TStyleAbs.GetButtonBorders.Result"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TStyleAbs.GetSeparatorSize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TStyleAbs.GetSeparatorSize.Result"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.DrawSeparator"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawSeparator.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawSeparator.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawSeparator.AOrientation"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.DrawGroupBox"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawGroupBox.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawGroupBox.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawGroupBox.ALabel"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawGroupBox.WidgetState"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TStyleAbs.GetGroupBoxBorders"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TStyleAbs.GetGroupBoxBorders.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.GetGroupBoxBorders.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.GetGroupBoxBorders.ALabel"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.GetGroupBoxBorders.LabelWidth"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.DrawEditBox"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawEditBox.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawEditBox.ARect"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TStyleAbs.GetEditBoxBorders"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TStyleAbs.GetEditBoxBorders.Result"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.DrawCheckBox"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawCheckBox.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawCheckBox.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawCheckBox.LabelRect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawCheckBox.Flags"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.GetCheckBoxLayout"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.GetCheckBoxLayout.LabelSize"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.GetCheckBoxLayout.TotalSize"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.GetCheckBoxLayout.LabelPos"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.DrawRadioButton"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawRadioButton.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawRadioButton.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawRadioButton.LabelRect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawRadioButton.Flags"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.GetRadioButtonLayout"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.GetRadioButtonLayout.LabelSize"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.GetRadioButtonLayout.TotalSize"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.GetRadioButtonLayout.LabelPos"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TStyleAbs.GetComboBoxArrowSize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TStyleAbs.GetComboBoxArrowSize.Result"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.DrawComboBoxArrow"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawComboBoxArrow.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawComboBoxArrow.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawComboBoxArrow.IsPressed"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawComboBoxArrow.IsEnabled"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TStyleAbs.GetScrollBarBorders"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TStyleAbs.GetScrollBarBorders.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.GetScrollBarBorders.Orientation"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TStyleAbs.GetScrollBarBtnSize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TStyleAbs.GetScrollBarBtnSize.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.GetScrollBarBtnSize.Orientation"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TStyleAbs.GetScrollBarBtnMinSize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TStyleAbs.GetScrollBarBtnMinSize.Result"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.DrawScrollBarBorder"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawScrollBarBorder.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawScrollBarBorder.ARect"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.DrawScrollBarButton"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawScrollBarButton.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawScrollBarButton.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawScrollBarButton.Direction"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawScrollBarButton.IsPressed"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawScrollBarButton.IsEnabled"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TStyleAbs.GetScrollBoxBorders"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TStyleAbs.GetScrollBoxBorders.Result"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.DrawScrollBoxBorder"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawScrollBoxBorder.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawScrollBoxBorder.ARect"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TDefaultStyle"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TDefaultStyle.ImageCanvas"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TDefaultStyle.MaskCanvas"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TDefaultStyle.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.Create.ADisplay"> - <short /> - </element> - <!-- destructor Visibility: public --> - <element name="TDefaultStyle.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.Draw3DFrame"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.Draw3DFrame.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.Draw3DFrame.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.Draw3DFrame.Color1"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.Draw3DFrame.Color2"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.Draw3DFrame.Color3"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.Draw3DFrame.Color4"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.DrawFocusRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawFocusRect.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawFocusRect.ARect"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.DrawSunkenOuterBorder"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawSunkenOuterBorder.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawSunkenOuterBorder.ARect"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TDefaultStyle.GetGUIColor"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TDefaultStyle.GetGUIColor.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.GetGUIColor.Color"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.DrawText"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawText.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawText.APosition"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawText.AText"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawText.State"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.DrawItemBefore"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawItemBefore.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawItemBefore.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawItemBefore.Flags"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.DrawItemAfter"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawItemAfter.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawItemAfter.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawItemAfter.Flags"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.DrawWindowBackground"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawWindowBackground.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawWindowBackground.ARect"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.DrawButtonFace"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawButtonFace.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawButtonFace.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawButtonFace.Flags"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TDefaultStyle.GetButtonBorders"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TDefaultStyle.GetButtonBorders.Result"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TDefaultStyle.GetSeparatorSize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TDefaultStyle.GetSeparatorSize.Result"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.DrawSeparator"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawSeparator.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawSeparator.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawSeparator.AOrientation"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.DrawGroupBox"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawGroupBox.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawGroupBox.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawGroupBox.ALabel"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawGroupBox.WidgetState"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TDefaultStyle.GetGroupBoxBorders"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TDefaultStyle.GetGroupBoxBorders.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.GetGroupBoxBorders.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.GetGroupBoxBorders.ALabel"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.GetGroupBoxBorders.LabelWidth"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.DrawEditBox"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawEditBox.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawEditBox.ARect"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TDefaultStyle.GetEditBoxBorders"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TDefaultStyle.GetEditBoxBorders.Result"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.DrawCheckBox"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawCheckBox.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawCheckBox.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawCheckBox.LabelRect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawCheckBox.Flags"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.GetCheckBoxLayout"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.GetCheckBoxLayout.LabelSize"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.GetCheckBoxLayout.TotalSize"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.GetCheckBoxLayout.LabelPos"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.DrawRadioButton"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawRadioButton.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawRadioButton.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawRadioButton.LabelRect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawRadioButton.Flags"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.GetRadioButtonLayout"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.GetRadioButtonLayout.LabelSize"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.GetRadioButtonLayout.TotalSize"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.GetRadioButtonLayout.LabelPos"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TDefaultStyle.GetComboBoxArrowSize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TDefaultStyle.GetComboBoxArrowSize.Result"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.DrawComboBoxArrow"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawComboBoxArrow.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawComboBoxArrow.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawComboBoxArrow.IsPressed"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawComboBoxArrow.IsEnabled"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TDefaultStyle.GetScrollBarBorders"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TDefaultStyle.GetScrollBarBorders.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.GetScrollBarBorders.Orientation"> - - <short /> - </element> - <!-- function Visibility: public --> - <element name="TDefaultStyle.GetScrollBarBtnSize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TDefaultStyle.GetScrollBarBtnSize.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.GetScrollBarBtnSize.Orientation"> - - <short /> - </element> - <!-- function Visibility: public --> - <element name="TDefaultStyle.GetScrollBarBtnMinSize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TDefaultStyle.GetScrollBarBtnMinSize.Result"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.DrawScrollBarBorder"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawScrollBarBorder.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawScrollBarBorder.ARect"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.DrawScrollBarButton"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawScrollBarButton.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawScrollBarButton.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawScrollBarButton.Direction"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawScrollBarButton.IsPressed"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawScrollBarButton.IsEnabled"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TDefaultStyle.GetScrollBoxBorders"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TDefaultStyle.GetScrollBoxBorders.Result"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDefaultStyle.DrawScrollBoxBorder"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawScrollBoxBorder.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.DrawScrollBoxBorder.ARect"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TEventObj"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TEventObj.RefCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TEventObj.FSender"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TEventObj.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TEventObj.Create.ASender"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TEventObj.AddRef"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TEventObj.Release"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TEventObj.SendToChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TEventObj.SendToChild.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TEventObj.SendToChild.AChild"> - <short /> - </element> - <!-- property Visibility: published --> - <element name="TEventObj.Sender"> - <short /> - <descr /> - <seealso /> - </element> - <!-- "class of" type Visibility: default --> - <element name="TEventClass"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TLayoutingEventObj"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TCalcSizesEventObj"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TResizedEventObj"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TResizedEventObj.FIsForced"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TResizedEventObj.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TResizedEventObj.Create.ASender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TResizedEventObj.Create.AIsForced"> - <short /> - </element> - <!-- property Visibility: published --> - <element name="TResizedEventObj.IsForced"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TDestroyEventObj"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TEnabledChangeEventObj"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TVisibilityChangeEventObj"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TPaintingEventObj"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TPaintingEventObj.FCanvas"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TPaintingEventObj.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TPaintingEventObj.Create.ASender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TPaintingEventObj.Create.ACanvas"> - <short /> - </element> - <!-- property Visibility: published --> - <element name="TPaintingEventObj.Canvas"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TPreparePaintEventObj"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TPreparePaintEventObj.SendToChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TPreparePaintEventObj.SendToChild.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TPreparePaintEventObj.SendToChild.AChild"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TPaintEventObj"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TPaintEventObj.SendToChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TPaintEventObj.SendToChild.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TPaintEventObj.SendToChild.AChild"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TMouseEventObj"> - <short>Mouse event</short> - <descr> - <printshort id="TMouseEventObj" />. This is a base event - being used by any mouse related events.</descr> - </element> - <!-- variable Visibility: private --> - <element name="TMouseEventObj.FShift"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TMouseEventObj.FPosition"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TMouseEventObj.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TMouseEventObj.Create.ASender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMouseEventObj.Create.AShift"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMouseEventObj.Create.APosition"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TMouseEventObj.SendToChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TMouseEventObj.SendToChild.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMouseEventObj.SendToChild.AChild"> - <short /> - </element> - <!-- property Visibility: public --> - <element name="TMouseEventObj.Position"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TMouseEventObj.Shift"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TMouseButtonEventObj"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TMouseButtonEventObj.FButton"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TMouseButtonEventObj.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TMouseButtonEventObj.Create.ASender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMouseButtonEventObj.Create.AButton"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMouseButtonEventObj.Create.AShift"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMouseButtonEventObj.Create.APosition"> - <short /> - </element> - <!-- property Visibility: published --> - <element name="TMouseButtonEventObj.Button"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TMousePressedEventObj"> - <short>Mouse button press event</short> - <descr> - <printshort id="TMousePressedEventObj" />. This occurs when - one of the mouse buttons are being depressed.</descr> - </element> - <!-- object Visibility: default --> - <element name="TMouseReleasedEventObj"> - <short>Mouse button release event</short> - <descr> - <printshort id="TMouseReleasedEventObj" />. This occurs - when the mouse button was pressed and is now being - released.</descr> - </element> - <!-- object Visibility: default --> - <element name="TMouseMoveEventObj"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TMouseMoveEventObj.SendToChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TMouseMoveEventObj.SendToChild.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMouseMoveEventObj.SendToChild.AChild"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TMouseEnterEventObj"> - <short>Mouse enter event</short> - <descr> - <printshort id="TMouseEnterEventObj" />. This occurs when - the mouse enters a Window or a Widget.</descr> - </element> - <!-- variable Visibility: public --> - <element name="TMouseEnterEventObj.NewCursor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TMouseLeaveEventObj"> - <short>Mouse leave event</short> - <descr> - <printshort id="TMouseLeaveEventObj" />. This occurs when - the mouse leaves the Window or Widget.</descr> - </element> - <!-- function Visibility: public --> - <element name="TMouseLeaveEventObj.SendToChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TMouseLeaveEventObj.SendToChild.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMouseLeaveEventObj.SendToChild.AChild"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TMouseLeaveCheckEventObj"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TMouseLeaveCheckEventObj.SendToChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TMouseLeaveCheckEventObj.SendToChild.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMouseLeaveCheckEventObj.SendToChild.AChild"> - <short /> - </element> - <!-- variable Visibility: public --> - <element name="TMouseLeaveCheckEventObj.NewCursor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TMouseWheelEventObj"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TMouseWheelEventObj.FWheelDelta"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TMouseWheelEventObj.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TMouseWheelEventObj.Create.ASender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMouseWheelEventObj.Create.AShift"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMouseWheelEventObj.Create.AWheelDelta"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMouseWheelEventObj.Create.APosition"> - <short /> - </element> - <!-- property Visibility: published --> - <element name="TMouseWheelEventObj.WheelDelta"> - <short /> - <descr /> - <seealso /> - </element> - <!-- set type Visibility: default --> - <element name="TWidgetStyle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWidgetStyle.wsCaptureMouse"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWidgetStyle.wsClickable"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWidgetStyle.wsOpaque"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TWidget"> - <short>The TWidget class is the base class of all user - interface objects.</short> - <descr> - <p>Widgets are components that are normally visual and - the user can see them and possibly interact with them at - runtime. All widgets have properties, methods and events - that describe aspects of their appearance, such as the - position of the widget, the cursor or hint associated - with the widget, methods to paint or move the widget and - events that respond to user actions.</p> - <p>TWidget has many protected properties and methods that - are used or published by its descendants.</p> - <p>If you want to use a TWidget to hold child widgets you - will probably want to add a layout to the parent - TWidget.</p> - </descr> - <seealso> - <link id="TLayout" /> - </seealso> - </element> - <!-- variable Visibility: private --> - <element name="TWidget.FParent"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TWidget.FOnClick"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TWidget.SetParent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.SetParent.AParent"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TWidget.GetBoundsRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.GetBoundsRect.Result"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TWidget.GetLeft"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.GetLeft.Result"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TWidget.GetTop"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.GetTop.Result"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TWidget.GetWidth"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.GetWidth.Result"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TWidget.GetHeight"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.GetHeight.Result"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TWidget.SetEnabled"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.SetEnabled.AEnabled"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TWidget.SetVisible"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.SetVisible.AVisible"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TWidget.EvCalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.EvCalcSizes.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.EvCalcSizes.Event"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TWidget.EvEnabledChange"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.EvEnabledChange.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.EvEnabledChange.Event"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TWidget.EvVisibilityChange"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.EvVisibilityChange.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.EvVisibilityChange.Event"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TWidget.EvMousePressed"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.EvMousePressed.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.EvMousePressed.Event"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TWidget.EvMouseReleased"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.EvMouseReleased.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.EvMouseReleased.Event"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TWidget.EvMouseEnter"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.EvMouseEnter.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.EvMouseEnter.Event"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TWidget.EvMouseLeave"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.EvMouseLeave.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.EvMouseLeave.Event"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TWidget.EvMouseLeaveCheck"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.EvMouseLeaveCheck.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.EvMouseLeaveCheck.Event"> - <short /> - </element> - <!-- variable Visibility: protected --> - <element name="TWidget.FCursor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TWidget.FText"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TWidget.FStyle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TWidget.FCanExpandHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TWidget.FCanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TWidget.FEnabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TWidget.FVisible"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TWidget.FOrigin"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TWidget.FBoundsSize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TWidget.FClientRect"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TWidget.FMinSize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TWidget.FMaxSize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TWidget.FDefSize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TWidget.WidgetStyle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TWidget.WidgetState"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TWidget.Loaded"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TWidget.Click"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TWidget.Paint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.Paint.Canvas"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TWidget.SetParentComponent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.SetParentComponent.AParent"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TWidget.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TWidget.Resized"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: protected --> - <element name="TWidget.ProcessEvent"> - <short>Processes all incoming event objects</short> - <descr> - <p> - <printshort id="TWidget.ProcessEvent" />. Inside this - event you normally verify the type of event object and - pass it to a private event handler method, to do further - processing.</p> - <p>This method gets called before the - <var>DistributeEvent</var>method.</p> - </descr> - <seealso> - <link id="TWidget.DistributeEvent" /> - </seealso> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.ProcessEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.ProcessEvent.Event"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TWidget.DistributeEvent"> - <short>Distributes event objects to it's children</short> - <descr> - <printshort id="TWidget.DistributeEvent" />. This event - occurs after the - <var>ProcessEvent</var>.</descr> - <seealso> - <link id="TWidget.ProcessEvent" /> - </seealso> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.DistributeEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.DistributeEvent.Event"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TWidget.EvFocusChanged"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TWidget.EvKeyPressed"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.EvKeyPressed.Key"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.EvKeyPressed.Shift"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TWidget.EvKeyReleased"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.EvKeyReleased.Key"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.EvKeyReleased.Shift"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TWidget.EvKeyChar"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.EvKeyChar.KeyChar"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TWidget.EvTextChanged"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: protected --> - <element name="TWidget.DoMouseEnter"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.DoMouseEnter.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.DoMouseEnter.AShift"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.DoMouseEnter.AMousePos"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TWidget.GetStyle"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.GetStyle.Result"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TWidget.SetCanExpandWidth"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.SetCanExpandWidth.allow"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TWidget.SetCanExpandHeight"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.SetCanExpandHeight.allow"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TWidget.SetText"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.SetText.AText"> - <short /> - </element> - <!-- property Visibility: protected --> - <element name="TWidget.CanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TWidget.CanExpandHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TWidget.Cursor"> - <short>Specifies the image used to represent the mouse - pointer when it passes into the region covered by the - widget.</short> - <descr>Change the value of Cursor to provide feedback to - the user when the mouse pointer enters the widget. The - value of Cursor is the enumerated type of the cursor in the - set of cursors maintained by fpGFX (fpGFXBase - unit).</descr> - </element> - <!-- property Visibility: protected --> - <element name="TWidget.Text"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TWidget.OnClick"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TWidget.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.Create.AOwner"> - <short /> - </element> - <!-- destructor Visibility: public --> - <element name="TWidget.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TWidget.SendEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.SendEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.SendEvent.Event"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TWidget.FindForm"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.FindForm.Result"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TWidget.SetEmbeddedParent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.SetEmbeddedParent.AParent"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TWidget.SetBounds"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.SetBounds.APosition"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.SetBounds.ASize"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.SetBounds.x"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.SetBounds.y"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.SetBounds.w"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.SetBounds.h"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TWidget.WidgetToClient"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.WidgetToClient.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.WidgetToClient.APoint"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TWidget.ClientToWidget"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.ClientToWidget.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.ClientToWidget.APoint"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TWidget.ClientToScreen"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TWidget.ClientToScreen.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.ClientToScreen.APoint"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TWidget.Show"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TWidget.Hide"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TWidget.Redraw"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TWidget.Redraw"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.Redraw.ARect"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TWidget.Scroll"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.Scroll.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.Scroll.DeltaX"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.Scroll.DeltaY"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TWidget.SetFocus"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TWidget.Update"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TWidget.Parent"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TWidget.Origin"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TWidget.BoundsSize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TWidget.BoundsRect"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TWidget.Left"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TWidget.Top"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TWidget.Width"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TWidget.Height"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TWidget.MinSize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TWidget.MaxSize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TWidget.DefSize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TWidget.ClientRect"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TWidget.Style"> - <short>Sets or Gets the widget's GUI style</short> - <descr> - <p>Sets or Gets the widget's GUI style. The ownership of - the style object is not transferred.</p> - <p>If no style is set, the widget uses the application's - style default style, return by the gStyleManager.</p> - <p> - <b>Warning:</b>This function is particularly useful for - demonstration purposes, where you want to show fpGUI's - styling capabilities. Real applications should avoid it - and use one consistent GUI style instead.</p> - </descr> - <seealso> - <link id="TStyleAbs" /> - </seealso> - </element> - <!-- property Visibility: public --> - <element name="TWidget.Enabled"> - <short>Controls whether the widget responds to mouse, - keyboard and timer events.</short> - <descr>Use Enabled to change the availability of the widget - to the user. To disable a control, set Enabled to false. - Disabled controls appear dimmed. If Enabled is false, the - control ignores mouse, keyboard and timer events.</descr> - </element> - <!-- property Visibility: public --> - <element name="TWidget.Visible"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TContainerWidget"> - <short>TContainerWidget is an abstract class that defines - the interface for containing other widgets</short> - <descr> - <printshort id="TContainerWidget" />. It also implements - the distribution of events to child widgets. You can't - create an instance of this class, as it contains abstract - methods, and doesn't actually define internally how to - store references to child widgets. It purely defines the - interface in doing so. This class is a decendant of - <link id="TWidget">TWidget</link>and must be used as a base - for container widgets. - <link id="TLayout">TLayout</link>is an example of a - container class that can hold multiple children. - <link id="TBinWidget">TBinWidget</link>is an example of a - container class that can hold only a single child widget - - normally a TLayout descendant.</descr> - <seealso> - <link id="TWidget" /> - <link id="TBinWidget" /> - <link id="TLayout" /> - </seealso> - </element> - <!-- function Visibility: protected --> - <element name="TContainerWidget.DistributeEvent"> - <short>Distributes - <link id="TEventObj">Event objects</link>to all children - widgets</short> - <descr> - <printshort id="TContainerWidget.DistributeEvent" />.</descr> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TContainerWidget.DistributeEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TContainerWidget.DistributeEvent.Event"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TContainerWidget.GetChildCount"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TContainerWidget.GetChildCount.Result"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TContainerWidget.GetChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TContainerWidget.GetChild.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TContainerWidget.GetChild.Index"> - <short /> - </element> - <!-- property Visibility: protected --> - <element name="TContainerWidget.ChildCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TContainerWidget.Children"> - <short /> - <descr /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TContainerWidget.Children.Index"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TContainerWidget.GetChildAt"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TContainerWidget.GetChildAt.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TContainerWidget.GetChildAt.APoint"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TContainerWidget.ContainsChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TContainerWidget.ContainsChild.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TContainerWidget.ContainsChild.AChild"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TContainerWidget.InsertChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TContainerWidget.InsertChild.AChild"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TContainerWidget.RemoveChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TContainerWidget.RemoveChild.AChild"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TBinWidget"> - <short>This is a concrete class that implements all the - TContainerWidget's abstract methods</short> - <descr> - <printshort id="TBinWidget" />. This class adds the ability - to contain a single child widget - normally a TLayout - descendant. Examples of such classes are the - <link id="TForm">TForm</link>and - <link id="TGroupBox">TGroupBox</link>. For examples of - container classes that can hold multiple children, look at - <link id="TLayout">TLayout</link>and it's - descendants.</descr> - <seealso> - <link id="TContainerWidget" /> - <link id="TLayout" /> - <link id="TGroupBox" /> - <link id="TForm" /> - </seealso> - </element> - <!-- variable Visibility: protected --> - <element name="TBinWidget.FChild"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TBinWidget.SetChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TBinWidget.SetChild.AChild"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TBinWidget.GetChildCount"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TBinWidget.GetChildCount.Result"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TBinWidget.GetChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TBinWidget.GetChild.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TBinWidget.GetChild.Index"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TBinWidget.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TBinWidget.Child"> - <short /> - <descr /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TBinWidget.ContainsChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TBinWidget.ContainsChild.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TBinWidget.ContainsChild.AChild"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TBinWidget.InsertChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TBinWidget.InsertChild.AChild"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TBinWidget.RemoveChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TBinWidget.RemoveChild.AChild"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="ELayoutError"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- enumeration type Visibility: default --> - <element name="THorzAlign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="THorzAlign.horzLeft"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="THorzAlign.horzCenter"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="THorzAlign.horzRight"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="THorzAlign.horzFill"> - <short /> - </element> - <!-- enumeration type Visibility: default --> - <element name="TVertAlign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TVertAlign.vertTop"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TVertAlign.vertCenter"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TVertAlign.vertBottom"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TVertAlign.vertFill"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TLayoutItem"> - <short>A data class used internall for TBoxLayout</short> - <descr> - <printshort id="TLayoutItem" />. It also serves as the base - class for other layout items.</descr> - <seealso> - <link id="TGridItem" /> - <link id="TFixedItem" /> - </seealso> - </element> - <!-- variable Visibility: private --> - <element name="TLayoutItem.FWidget"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TLayoutItem.Widget"> - <short /> - <descr /> - <seealso /> - </element> - <!-- record type Visibility: default --> - <element name="TWidgetArrayInfo"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TWidgetArrayInfo.min"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TWidgetArrayInfo.def"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TWidgetArrayInfo.max"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TWidgetArrayInfo.MinFlag"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="TWidgetArrayInfo.MaxFlag"> - <short /> - <descr /> - <seealso /> - </element> - <!-- array type Visibility: default --> - <element name="TWidgetArrayInfoArray"> - <short /> - <descr /> - <seealso /> - </element> - <!-- pointer type Visibility: default --> - <element name="PWidgetArrayInfoArray"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TLayout"> - <short>The fpGUI layout system provides a simple and - powerful way of specifying the layout of child - widgets</short> - <descr> - <p> - <printshort id="TLayout" />.</p> - <p>By specifying the logical layout once, you get the - following benefits:</p> - <ul> - <li>Positioning of child widgets.</li> - <li>Sensible default sizes for windows.</li> - <li>Sensible minimum sizes for windows.</li> - <li>Resize handling.</li> - <li> - <p>Automatic update when contents change:</p> - <ul> - <li>Font size, text or other contents of child - widgets.</li> - <li>Hiding or showing a child widget.</li> - <li>Removal of child widgets.</li> - </ul> - </li> - </ul> - </descr> - <seealso> - <link id="TBoxLayout" /> - <link id="TGridLayout" /> - <link id="TDockingLayout" /> - <link id="TFixedLayout" /> - </seealso> - </element> - <!-- variable Visibility: protected --> - <element name="TLayout.FWidgets"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TLayout.FBorderSpacing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TLayout.IsRecalcingLayout"> - <short /> - <descr /> - <seealso /> - </element> - <!-- function Visibility: protected --> - <element name="TLayout.GetChildCount"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TLayout.GetChildCount.Result"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TLayout.GetChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TLayout.GetChild.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TLayout.GetChild.Index"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TLayout.AddFixedChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TLayout.AddFixedChild.AChild"> - <short /> - </element> - <!-- property Visibility: protected --> - <element name="TLayout.BorderSpacing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TLayout.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TLayout.Create.AOwner"> - <short /> - </element> - <!-- destructor Visibility: public --> - <element name="TLayout.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TLayout.ContainsChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TLayout.ContainsChild.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TLayout.ContainsChild.AChild"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TFixedItem"> - <short>A data class used internally for - TFixedLayout</short> - <descr> - <printshort id="TFixedItem" />.</descr> - </element> - <!-- variable Visibility: public --> - <element name="TFixedItem.Left"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TFixedItem.Top"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TFixedLayout"> - <short>The TFixedLayout allows you to arrange widgets at - set x and y co-ordinates</short> - <descr> - <printshort id="TFixedLayout" />. This is like the current - Form Designers of Lazarus and Borland Delphi works.</descr> - <seealso> - <link id="TGridLayout" /> - <link id="TBoxLayout" /> - </seealso> - </element> - <!-- procedure Visibility: protected --> - <element name="TFixedLayout.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TFixedLayout.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFixedLayout.Create.AOwner"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFixedLayout.AddWidget"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFixedLayout.AddWidget.AWidget"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFixedLayout.AddWidget.ALeft"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFixedLayout.AddWidget.ATop"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TFixedLayout.MoveWidget"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TFixedLayout.MoveWidget.AWidget"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFixedLayout.MoveWidget.ALeft"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TFixedLayout.MoveWidget.ATop"> - <short /> - </element> - <!-- property Visibility: published --> - <element name="TFixedLayout.Enabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration type Visibility: default --> - <element name="TDockingMode"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TDockingMode.dmTop"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TDockingMode.dmBottom"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TDockingMode.dmLeft"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TDockingMode.dmRight"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TDockingMode.dmClient"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TDockingMode.dmUndocked"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TDockingItem"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TDockingItem.Left"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TDockingItem.Top"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: public --> - <element name="TDockingItem.DockingMode"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TDockingLayout"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TDockingLayout.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TDockingLayout.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDockingLayout.Create.AOwner"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDockingLayout.AddWidget"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDockingLayout.AddWidget.AWidget"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDockingLayout.AddWidget.ADockingMode"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TDockingLayout.AddWidget"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDockingLayout.AddWidget.AWidget"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDockingLayout.AddWidget.ALeft"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDockingLayout.AddWidget.ATop"> - <short /> - </element> - <!-- property Visibility: published --> - <element name="TDockingLayout.Enabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TCustomBoxLayout"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomBoxLayout.FHorzAlign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomBoxLayout.FVertAlign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomBoxLayout.FOrientation"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomBoxLayout.FSpacing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomBoxLayout.SetOrientation"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomBoxLayout.SetOrientation.AOrientation"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomBoxLayout.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomBoxLayout.Resized"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomBoxLayout.HorzAlign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomBoxLayout.VertAlign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomBoxLayout.Orientation"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomBoxLayout.Spacing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TCustomBoxLayout.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomBoxLayout.Create.AOwner"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TCustomBoxLayout.InsertChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomBoxLayout.InsertChild.AChild"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TCustomBoxLayout.RemoveChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomBoxLayout.RemoveChild.AChild"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TBoxLayout"> - <short>Lays out widgets in a horizontal or vertical - position.</short> - <descr>A TBoxLayout lays out widgets in a horizontal row, - from left to right, or in a vertical column, from top to - bottom. By default, the TBoxLayout uses the horizontal - layout. You can toggle between horizontal and vertical - layouts, by using the Orientation property.</descr> - <seealso> - <link id="TBoxLayout" /> - <link id="TGridLayout" /> - <link id="TDockingLayout" /> - <link id="TFixedLayout" /> - </seealso> - </element> - <!-- property Visibility: published --> - <element name="TBoxLayout.CanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TBoxLayout.CanExpandHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TBoxLayout.Enabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TBoxLayout.BorderSpacing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TBoxLayout.HorzAlign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TBoxLayout.Orientation"> - <short>Toggle the layout of the TBoxLayout class.</short> - <descr>Two possible orientations exist - Horizontal (the - default) or Vertical.</descr> - </element> - <!-- property Visibility: published --> - <element name="TBoxLayout.Spacing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TBoxLayout.VertAlign"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TGridItem"> - <short>A data class used internally for TGridLayout</short> - <descr> - <printshort id="TGridItem" />.</descr> - </element> - <!-- variable Visibility: private --> - <element name="TGridItem.FX"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TGridItem.FY"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TGridItem.FWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TGridItem.FHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TGridItem.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TGridItem.Create.ACollection"> - <short /> - </element> - <!-- property Visibility: published --> - <element name="TGridItem.x"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TGridItem.y"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TGridItem.Width"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TGridItem.Height"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TCustomGridLayout"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomGridLayout.FColCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomGridLayout.FRowCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomGridLayout.FColSpacing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomGridLayout.FRowSpacing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomGridLayout.SetColCount"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.SetColCount.AColCount"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomGridLayout.SetRowCount"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.SetRowCount.ARowCount"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomGridLayout.SetColSpacing"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.SetColSpacing.AColSpacing"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomGridLayout.SetRowSpacing"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.SetRowSpacing.ARowSpacing"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomGridLayout.InitSizeInfos"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.InitSizeInfos.ColInfos"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.InitSizeInfos.RowInfos"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomGridLayout.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomGridLayout.Resized"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGridLayout.GridPositions"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGridLayout.ColCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGridLayout.RowCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGridLayout.ColSpacing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGridLayout.RowSpacing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TCustomGridLayout.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.Create.AOwner"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TCustomGridLayout.InsertChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.InsertChild.AChild"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TCustomGridLayout.AddWidget"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.AddWidget.AWidget"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.AddWidget.x"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.AddWidget.y"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.AddWidget.w"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.AddWidget.h"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TCustomGridLayout.MoveWidget"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.MoveWidget.AWidget"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.MoveWidget.x"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.MoveWidget.y"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.MoveWidget.w"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.MoveWidget.h"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TGridLayout"> - <short>The TGridLayout class lays out widgets in a - grid.</short> - <descr> - <p>TGridLayout takes the space made available to it (by - its parent layout or by the Parent), divides it up into - rows and columns, and puts each widget it manages into - the correct cell.</p> - <p>Columns and rows behave identically. A TGridLayout - lays out widgets in a two-dimensional grid. Widgets can - also occupy multiple cells.</p> - <table width="300" border="1"> - <tr> - <td>0,0</td> - <td>0,1</td> - <td>0,2</td> - </tr> - <tr> - <td>1,0</td> - <td>1,1</td> - <td>1,2</td> - </tr> - <tr> - <td>2,0</td> - <td>2,1</td> - <td>2,2</td> - </tr> - </table> - </descr> - </element> - <!-- property Visibility: published --> - <element name="TGridLayout.Enabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TGridLayout.ColCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TGridLayout.RowCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TGridLayout.ColSpacing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TGridLayout.RowSpacing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TGridLayout.GridPositions"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TCustomLabel"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomLabel.SetAlignment"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomLabel.SetAlignment.AAlignment"> - <short /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomLabel.FAlignment"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomLabel.Paint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomLabel.Paint.Canvas"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomLabel.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomLabel.Alignment"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TLabel"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TLabel.CanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TLabel.Enabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TLabel.Text"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TLabel.Alignment"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TCustomEdit"> - <short>Base Edit component with no published - properties.</short> - <seealso> - <link id="TEdit" /> - </seealso> - </element> - <!-- variable Visibility: private --> - <element name="TCustomEdit.FOnChange"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomEdit.SetPasswordChar"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomEdit.SetPasswordChar.APasswordChar"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomEdit.SetCursorPos"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomEdit.SetCursorPos.ACursorPos"> - <short /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomEdit.FPasswordChar"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomEdit.FCursorPos"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomEdit.Paint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomEdit.Paint.Canvas"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomEdit.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomEdit.EvKeyPressed"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomEdit.EvKeyPressed.Key"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomEdit.EvKeyPressed.Shift"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomEdit.EvKeyChar"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomEdit.EvKeyChar.KeyChar"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomEdit.EvTextChanged"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomEdit.CanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomEdit.Cursor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomEdit.PasswordChar"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomEdit.CursorPos"> - <short>Position of cursor in the edit widget</short> - <descr> - <printshort id="TCustomEdit.CursorPos" />. If CursorPos = 0 - then the cursor in infront of the first character of text. - If CursorPos = 1 then the cursor is after the first - character of text, etc.</descr> - </element> - <!-- property Visibility: protected --> - <element name="TCustomEdit.OnChange"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TCustomEdit.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomEdit.Create.AOwner"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TEdit"> - <short>The TEdit widget is a one-line text editor</short> - <descr> - <p> - <printshort id="TEdit" />. A TEdit allows the user to - enter and edit a single line of plain text.</p> - <p>By changing the - <link id="TEdit.PasswordChar">PasswordChar</link>property - of a TEdit, it can also be used as a "write-only" field, - for inputs such as passwords.</p> - </descr> - <seealso> - <link id="TEdit.PassworChar" /> - </seealso> - </element> - <!-- property Visibility: published --> - <element name="TEdit.CanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TEdit.Enabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TEdit.PasswordChar"> - <short>Character to use when masking the text input</short> - <descr> - <printshort id="TEdit.PasswordChar" />. The default is - ascii char 0, which will then display the TEdit text as - normal. Changing it to any other character, will show the - TEdit text masked with this character. The most used - PasswordChar is the '*' character for password - fields.</descr> - </element> - <!-- property Visibility: published --> - <element name="TEdit.Text"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TEdit.OnChange"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TGenericButton"> - <short>Defines a button that could be embedded in another - component.</short> - <descr>This class defines a button that could be embedded - in another component. No default minimum size gets applied - either. This is the most basic button you can use. Example - of usage: The TScrollbar and TComboBox components use - TGenericButtons.</descr> - <errors /> - <seealso> - <link id="TCustomButton" /> - <link id="TButton" /> - </seealso> - </element> - <!-- variable Visibility: protected --> - <element name="TGenericButton.FEmbedded"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TGenericButton.Paint"> - <short>Draw the blank button face on the canvas.</short> - <descr>This method draws a blank button face on the canvas. - Nothing else gets drawn. This method also takes into - account if the button is Embedded on not, which will affect - the buttons look in some ways. eg: Must it have a Focus - Rectangle or not.</descr> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TGenericButton.Paint.Canvas"> - <short /> - </element> - <!-- constructor Visibility: public --> - <element name="TGenericButton.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TGenericButton.Create.AOwner"> - <short /> - </element> - <!-- property Visibility: public --> - <element name="TGenericButton.Embedded"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TCustomButton"> - <short>Used to create new custom type of button - components</short> - <descr>Used to create new custom type of buttons normally - used in dialogs and windows. There are also no properties - published in this component and in has a default minimum - width set to 75 pixels.</descr> - <seealso> - <link id="TGenericButton" /> - <link id="TButton" /> - </seealso> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomButton.Paint"> - <short>This draws the Text on the already draw button - face.</short> - <descr>This draws the Text on the already draw button - face.</descr> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomButton.Paint.Canvas"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomButton.CalcSizes"> - <short>Calculates the size of the button.</short> - <descr>This method calculates the size of the button and - also applies the default minimum size of 75 pixels - wide.</descr> - <errors /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TButton"> - <seealso> - <link id="TCustomButton" /> - </seealso> - </element> - <!-- property Visibility: published --> - <element name="TButton.CanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TButton.Enabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TButton.Text"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TButton.OnClick"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure type Visibility: default --> - <element name="TScrollEvent"> - <short /> - <descr /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TScrollEvent.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TScrollEvent.APosition"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TCustomScrollBar"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomScrollBar.FOrientation"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomScrollBar.FMin"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomScrollBar.FMax"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomScrollBar.FPageSize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomScrollBar.FPosition"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomScrollBar.FSmallChange"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomScrollBar.FLargeChange"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomScrollBar.FOnChange"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomScrollBar.FOnScroll"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomScrollBar.ButtonUp"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomScrollBar.ButtonDown"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomScrollBar.Slider"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomScrollBar.Embedded"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomScrollBar.ButtonUpClick"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomScrollBar.ButtonUpClick.Sender"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomScrollBar.ButtonDownClick"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomScrollBar.ButtonDownClick.Sender"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomScrollBar.SetOrientation"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomScrollBar.SetOrientation.AOrientation"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomScrollBar.SetMin"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomScrollBar.SetMin.AMin"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomScrollBar.SetMax"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomScrollBar.SetMax.AMax"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomScrollBar.SetPageSize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomScrollBar.SetPageSize.APageSize"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomScrollBar.SetPosition"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomScrollBar.SetPosition.APosition"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TCustomScrollBar.GetButtonSize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomScrollBar.GetButtonSize.Result"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TCustomScrollBar.ClipPosition"> - <short>Resets the Position to its maximum or minimum - size</short> - <descr> - <printshort id="TCustomScrollBar.ClipPosition" />. This is - a helper function used internally. The way it works is as - follows. Say the Max Size of the scrollbar is 10 and the - current Position is 10. Now if the user tries to scroll - even further, 11 gets passed to the method. The - ClipPosition sees that 11 is past the Max value, so clips - in back to 10. The oposite is true for the Min - value.</descr> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomScrollBar.ClipPosition.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomScrollBar.ClipPosition.APosition"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomScrollBar.UpdateBar"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: protected --> - <element name="TCustomScrollBar.DistributeEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomScrollBar.DistributeEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomScrollBar.DistributeEvent.Event"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomScrollBar.Paint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomScrollBar.Paint.Canvas"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomScrollBar.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomScrollBar.Resized"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomScrollBar.Orientation"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomScrollBar.Min"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomScrollBar.Max"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomScrollBar.PageSize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomScrollBar.Position"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomScrollBar.SmallChange"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomScrollBar.LargeChange"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomScrollBar.OnChange"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomScrollBar.OnScroll"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TCustomScrollBar.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomScrollBar.Create.AOwner"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TCustomScrollBar.LineUp"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TCustomScrollBar.LineDown"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TCustomScrollBar.PageUp"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TCustomScrollBar.PageDown"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TScrollBar"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TScrollBar.Enabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TScrollBar.Orientation"> - <short>The scrollbar orientation</short> - <descr>This can be either Vertical or Horizontal.</descr> - </element> - <!-- property Visibility: published --> - <element name="TScrollBar.Min"> - <short>Minimum position</short> - <descr>This is the minimum position the the scrollbar can - move to.</descr> - </element> - <!-- property Visibility: published --> - <element name="TScrollBar.Max"> - <short>Maximum position</short> - <descr>This is the maximum position the scrollbar can move - to.</descr> - </element> - <!-- property Visibility: published --> - <element name="TScrollBar.PageSize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TScrollBar.Position"> - <short>Current position of scrollbar</short> - <descr>This is the current position of the - scrollbar.</descr> - </element> - <!-- property Visibility: published --> - <element name="TScrollBar.SmallChange"> - <short>Determines how much - <link id="TScrollBar.Position">Position</link>changes when - the user clicks the arrow buttons on the scroll bar or - presses the arrow keys on the keyboard.</short> - <descr> - <p>Set SmallChange to specify how much to change the - value of Position when the user clicks on the arrow - buttons. The Max and Min properties define the total - range over which Position can vary.</p> - <p>For example, if Max is 100 and Min is 0, the scroll - box can assume 100 positions. If the SmallChange property - setting is 5 and the Position property is 0, the user can - click the down or right arrow button 20 times before the - thumb tab is moved all the way to the end of the scroll - bar.</p> - </descr> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TScrollBar.LargeChange"> - <short>Determines how much - <link id="TScrollBar.Position">Position</link>changes when - the user clicks the scroll bar on either side of the thumb - tab or presses PgUp or PgDn.</short> - <descr> - <p>Set LargeChange to specify how much to change the - value of - <link id="TScrollBar.Position">Position</link>when the - user clicks on the side of the thumb tab (that is, on the - thumb tab track, but not on the thumb tab itself). The - Max and Min properties define the total range over which - Position can vary.</p> - <p>For example, if Max is 100 and Min is 0, the scroll - box can assume 100 positions. If the LargeChange property - setting is 20 and the Position property is 0, the user - can click the scroll bar track five times after the thumb - tab before it moves all the way to the end of the scroll - bar (100 / 20 = 5).</p> - </descr> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TScrollBar.OnChange"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TScrollBar.OnScroll"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TScrollingSupport"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TScrollingSupport.Parent"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TScrollingSupport.FBorders"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TScrollingSupport.FClientRect"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TScrollingSupport.FVirtualSize"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TScrollingSupport.FHorzScrollBar"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TScrollingSupport.FVertScrollBar"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TScrollingSupport.FOnClientRectChange"> - <short /> - <descr /> - <seealso /> - </element> - <!-- function Visibility: private --> - <element name="TScrollingSupport.EvMouseWheel"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TScrollingSupport.EvMouseWheel.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TScrollingSupport.EvMouseWheel.Event"> - <short /> - </element> - <!-- constructor Visibility: public --> - <element name="TScrollingSupport.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TScrollingSupport.Create.AParent"> - <short /> - </element> - <!-- destructor Visibility: public --> - <element name="TScrollingSupport.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TScrollingSupport.ProcessEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TScrollingSupport.ProcessEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TScrollingSupport.ProcessEvent.Event"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TScrollingSupport.DistributeEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TScrollingSupport.DistributeEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TScrollingSupport.DistributeEvent.Event"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TScrollingSupport.SendToChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TScrollingSupport.SendToChild.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TScrollingSupport.SendToChild.AChild"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TScrollingSupport.SendToChild.Event"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TScrollingSupport.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TScrollingSupport.Resized"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TScrollingSupport.CalcClientSize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TScrollingSupport.CalcClientSize.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TScrollingSupport.CalcClientSize.AHorzBarVisible"> - - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TScrollingSupport.CalcClientSize.AVertBarVisible"> - - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TScrollingSupport.SetVirtualSize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TScrollingSupport.SetVirtualSize.ASize"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TScrollingSupport.ScrollPos"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TScrollingSupport.ScrollPos.Result"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TScrollingSupport.DefHorzScrollHandler"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TScrollingSupport.DefHorzScrollHandler.Sender"> - - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TScrollingSupport.DefHorzScrollHandler.APosition"> - - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TScrollingSupport.DefVertScrollHandler"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TScrollingSupport.DefVertScrollHandler.Sender"> - - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TScrollingSupport.DefVertScrollHandler.APosition"> - - <short /> - </element> - <!-- property Visibility: public --> - <element name="TScrollingSupport.Borders"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TScrollingSupport.ClientRect"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TScrollingSupport.HorzScrollBar"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TScrollingSupport.VertScrollBar"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TScrollingSupport.OnClientRectChange"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TCustomScrollBox"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomScrollBox.ScrollingSupport"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomScrollBox.Paint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomScrollBox.Paint.Canvas"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TCustomScrollBox.ProcessEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomScrollBox.ProcessEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomScrollBox.ProcessEvent.Event"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TCustomScrollBox.DistributeEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomScrollBox.DistributeEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomScrollBox.DistributeEvent.Event"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomScrollBox.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomScrollBox.Resized"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TCustomScrollBox.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomScrollBox.Create.AOwner"> - <short /> - </element> - <!-- destructor Visibility: public --> - <element name="TCustomScrollBox.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TScrollBox"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TCustomCheckbox"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomCheckbox.SetChecked"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomCheckbox.SetChecked.AChecked"> - <short /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomCheckbox.FChecked"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomCheckbox.FLabelPos"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomCheckbox.Click"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomCheckbox.Paint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomCheckbox.Paint.Canvas"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomCheckbox.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomCheckbox.Checked"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TCustomCheckbox.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomCheckbox.Create.AOwner"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TCheckbox"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TCheckbox.Enabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TCheckbox.Checked"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TCheckbox.Text"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TCheckbox.OnClick"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TCustomRadioButton"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomRadioButton.SetChecked"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomRadioButton.SetChecked.AChecked"> - <short /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomRadioButton.FChecked"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomRadioButton.FLabelPos"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomRadioButton.Click"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomRadioButton.Paint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomRadioButton.Paint.Canvas"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomRadioButton.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomRadioButton.Checked"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TCustomRadioButton.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomRadioButton.Create.AOwner"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TRadioButton"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TRadioButton.Enabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TRadioButton.Checked"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TRadioButton.Text"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TRadioButton.OnClick"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TCustomSeparator"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomSeparator.SetOrientation"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomSeparator.SetOrientation.AOrientation"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomSeparator.SetSpacing"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomSeparator.SetSpacing.ASpacing"> - <short /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomSeparator.FOrientation"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomSeparator.FSpacing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomSeparator.Paint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomSeparator.Paint.Canvas"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomSeparator.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomSeparator.Orientation"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomSeparator.Spacing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TCustomSeparator.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomSeparator.Create.AOwner"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TSeparator"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TSeparator.Enabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TSeparator.Orientation"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TSeparator.Spacing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TCustomGroupBox"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomGroupBox.Paint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGroupBox.Paint.Canvas"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomGroupBox.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomGroupBox.Resized"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TGroupBox"> - <short>The TGroupBox widget provides a group box frame with - a title</short> - <descr> - <printshort id="TGroupBox" />. TGroupBox doesn't - automatically lay out the child widgets (which are often - TCheckBoxes or TRadioButtons but can be any - widgets).</descr> - <seealso> - <link id="TCheckBox" /> - <link id="TRadioButton" /> - </seealso> - <example file="examples/TGroupBox.ex1.pas" /> - </element> - <!-- property Visibility: published --> - <element name="TGroupBox.Enabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TGroupBox.Text"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TCustomListBox"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomListBox.FHotTrack"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomListBox.FItems"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomListBox.FItemIndex"> - <short /> - <descr /> - <seealso /> - </element> - <!-- function Visibility: private --> - <element name="TCustomListBox.EvMousePressed"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomListBox.EvMousePressed.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomListBox.EvMousePressed.Event"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TCustomListBox.EvMouseReleased"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomListBox.EvMouseReleased.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomListBox.EvMouseReleased.Event"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TCustomListBox.EvMouseMoved"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomListBox.EvMouseMoved.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomListBox.EvMouseMoved.Event"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TCustomListBox.ProcessMouseEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomListBox.ProcessMouseEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomListBox.ProcessMouseEvent.Event"> - <short /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomListBox.ScrollingSupport"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomListBox.FMaxItemWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomListBox.ItemHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomListBox.Paint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomListBox.Paint.Canvas"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TCustomListBox.ProcessEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomListBox.ProcessEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomListBox.ProcessEvent.Event"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TCustomListBox.DistributeEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomListBox.DistributeEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomListBox.DistributeEvent.Event"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomListBox.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomListBox.Resized"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomListBox.RecalcWidth"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomListBox.UpdateScrollBars"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomListBox.RedrawItem"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomListBox.RedrawItem.AIndex"> - <short /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomListBox.CanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomListBox.CanExpandHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomListBox.HotTrack"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomListBox.ItemIndex"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TCustomListBox.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomListBox.Create.AOwner"> - <short /> - </element> - <!-- destructor Visibility: public --> - <element name="TCustomListBox.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TCustomListBox.Items"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TListBox"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TListBox.OnClick"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TListBox.Enabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TListBox.HotTrack"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TListBox.Items"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TCustomComboBox"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomComboBox.ButtonClick"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomComboBox.ButtonClick.Sender"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomComboBox.DropDownDeactivate"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomComboBox.DropDownDeactivate.Sender"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomComboBox.DropDownDestroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomComboBox.DropDownDestroy.Sender"> - <short /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomComboBox.FButton"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomComboBox.FDropDown"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomComboBox.Paint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomComboBox.Paint.Canvas"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomComboBox.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomComboBox.Resized"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: protected --> - <element name="TCustomComboBox.DistributeEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomComboBox.DistributeEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomComboBox.DistributeEvent.Event"> - <short /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomComboBox.CanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TCustomComboBox.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomComboBox.Create.AOwner"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TComboBox"> - <short>The TComboBox widget is a combined button and popup - list.</short> - <descr> - <p>A TComboBox provides a means of presenting a list of - options to the user in a way that takes up the minimum - amount of screen space.</p> - <p>A combobox is a selection widget that displays the - current item, and can pop up a list of selectable items. - A combobox may be editable, allowing the user to modify - each item in the list.</p> - </descr> - <seealso> - <link id="TRadioButton" /> - <link id="TEdit" /> - </seealso> - <example file="examples/TComboBox.ex1.pas" /> - </element> - <!-- property Visibility: published --> - <element name="TComboBox.CanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TComboBox.Enabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TComboBox.Text"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="EInvalidGridOperation"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- set type Visibility: default --> - <element name="TGridDrawState"> - <short /> - <descr /> - <seealso /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGridDrawState.gdSelected"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGridDrawState.gdFocused"> - <short /> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGridDrawState.gdFixed"> - <short /> - </element> - <!-- pointer type Visibility: default --> - <element name="PIntegerArray"> - <short /> - <descr /> - <seealso /> - </element> - <!-- array type Visibility: default --> - <element name="TIntegerArray"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TCustomGrid"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomGrid.FColCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomGrid.FRowCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomGrid.FFixedCols"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomGrid.FFixedRows"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomGrid.FDefaultColWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomGrid.FDefaultRowHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomGrid.FGridWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomGrid.FGridHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomGrid.FFixedWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomGrid.FFixedHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomGrid.FColWidths"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomGrid.FRowHeights"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomGrid.SetColCount"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.SetColCount.AColCount"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomGrid.SetRowCount"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.SetRowCount.ARowCount"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomGrid.SetFixedCols"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.SetFixedCols.AFixedCols"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomGrid.SetFixedRows"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.SetFixedRows.AFixedRows"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomGrid.SetDefaultColWidth"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.SetDefaultColWidth.AWidth"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomGrid.SetDefaultRowHeight"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.SetDefaultRowHeight.AHeight"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TCustomGrid.GetColWidths"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomGrid.GetColWidths.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.GetColWidths.ACol"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomGrid.SetColWidths"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.SetColWidths.ACol"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.SetColWidths.AWidth"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TCustomGrid.GetRowHeights"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomGrid.GetRowHeights.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.GetRowHeights.ARow"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomGrid.SetRowHeights"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.SetRowHeights.ARow"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.SetRowHeights.AHeight"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomGrid.HorzScrollBarScroll"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.HorzScrollBarScroll.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.HorzScrollBarScroll.APosition"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomGrid.VertScrollBarScroll"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.VertScrollBarScroll.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.VertScrollBarScroll.APosition"> - <short /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomGrid.ScrollingSupport"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomGrid.Paint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.Paint.Canvas"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TCustomGrid.ProcessEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomGrid.ProcessEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.ProcessEvent.Event"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TCustomGrid.DistributeEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomGrid.DistributeEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.DistributeEvent.Event"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomGrid.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomGrid.Resized"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomGrid.ColWidthsChanged"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomGrid.DrawCell"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.DrawCell.ACanvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.DrawCell.ACol"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.DrawCell.ARow"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.DrawCell.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.DrawCell.AState"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomGrid.RowHeightsChanged"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomGrid.SizeChanged"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.SizeChanged.OldColCount"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.SizeChanged.OldRowCount"> - <short /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGrid.CanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGrid.CanExpandHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGrid.ColCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGrid.RowCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGrid.FixedCols"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGrid.FixedRows"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGrid.GridWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGrid.GridHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGrid.FixedWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGrid.FixedHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGrid.DefaultColWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGrid.DefaultRowHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGrid.ColWidths"> - <short /> - <descr /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.ColWidths.ACol"> - <short /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomGrid.RowHeights"> - <short /> - <descr /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.RowHeights.ARow"> - <short /> - </element> - <!-- constructor Visibility: public --> - <element name="TCustomGrid.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGrid.Create.AOwner"> - <short /> - </element> - <!-- destructor Visibility: public --> - <element name="TCustomGrid.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure type Visibility: default --> - <element name="TDrawCellEvent"> - <short /> - <descr /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDrawCellEvent.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDrawCellEvent.ACanvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDrawCellEvent.ACol"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDrawCellEvent.ARow"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDrawCellEvent.Rect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDrawCellEvent.State"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TDrawGrid"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TDrawGrid.FOnDrawCell"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TDrawGrid.DrawCell"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TDrawGrid.DrawCell.ACanvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDrawGrid.DrawCell.ACol"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDrawGrid.DrawCell.ARow"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDrawGrid.DrawCell.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDrawGrid.DrawCell.AState"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TDrawGrid.CellRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TDrawGrid.CellRect.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDrawGrid.CellRect.ACol"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDrawGrid.CellRect.ARow"> - <short /> - </element> - <!-- property Visibility: public --> - <element name="TDrawGrid.ColWidths"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TDrawGrid.RowHeights"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TDrawGrid.ColCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TDrawGrid.RowCount"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TDrawGrid.FixedCols"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TDrawGrid.FixedRows"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TDrawGrid.DefaultColWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TDrawGrid.DefaultRowHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TDrawGrid.OnDrawCell"> - <short /> - <descr /> - <seealso /> - </element> - <!-- pointer type Visibility: default --> - <element name="PCells"> - <short /> - <descr /> - <seealso /> - </element> - <!-- array type Visibility: default --> - <element name="TCells"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TStringGrid"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TStringGrid.CellStrings"> - <short /> - <descr /> - <seealso /> - </element> - <!-- function Visibility: private --> - <element name="TStringGrid.GetCells"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TStringGrid.GetCells.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.GetCells.ACol"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.GetCells.ARow"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TStringGrid.SetCells"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.SetCells.ACol"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.SetCells.ARow"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.SetCells.AValue"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TStringGrid.SizeChanged"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.SizeChanged.OldColCount"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.SizeChanged.OldRowCount"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TStringGrid.DrawCell"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.DrawCell.ACanvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.DrawCell.ACol"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.DrawCell.ARow"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.DrawCell.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.DrawCell.AState"> - <short /> - </element> - <!-- constructor Visibility: public --> - <element name="TStringGrid.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.Create.AOwner"> - <short /> - </element> - <!-- destructor Visibility: public --> - <element name="TStringGrid.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TStringGrid.Cells"> - <short /> - <descr /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.Cells.ACol"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.Cells.ARow"> - <short /> - </element> - <!-- property Visibility: public --> - <element name="TStringGrid.Cols"> - <short /> - <descr /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.Cols.Index"> - <short /> - </element> - <!-- property Visibility: public --> - <element name="TStringGrid.Objects"> - <short /> - <descr /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.Objects.ACol"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.Objects.ARow"> - <short /> - </element> - <!-- property Visibility: public --> - <element name="TStringGrid.Rows"> - <short /> - <descr /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStringGrid.Rows.Index"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TCustomForm"> - <short>TCustomForm is a base class from which to derive a - window such as a form or dialog.</short> - <descr>Derive from TCustomForm to create a custom window. - The TCustomForm descendant can contain other objects, such - as TButton, TCheckBox and TComboBox objects, but they have - to be placed into a Layout Manager class.</descr> - <seealso> - <link id="TBoxLayout" /> - <link id="TFixedLayout" /> - <link id="TGridLayout" /> - </seealso> - </element> - <!-- variable Visibility: private --> - <element name="TCustomForm.FFocusedWidget"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomForm.FMouseCaptureWidget"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomForm.FLastSetCursor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomForm.FWnd"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomForm.FWindowType"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomForm.FOnCreate"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomForm.FOnDestroy"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomForm.FOnActivate"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomForm.FOnDeactivate"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.SetFocusedWidget"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.SetFocusedWidget.AWidget"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.SetMouseCaptureWidget"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.SetMouseCaptureWidget.AWidget"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndClose"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndClose.Sender"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndFocusIn"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndFocusIn.Sender"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndFocusOut"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndFocusOut.Sender"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndHide"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndHide.Sender"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndKeyPressed"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndKeyPressed.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndKeyPressed.AKey"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndKeyPressed.AShift"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndKeyReleased"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndKeyReleased.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndKeyReleased.AKey"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndKeyReleased.AShift"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndKeyChar"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndKeyChar.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndKeyChar.AKeyChar"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndMouseEnter"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMouseEnter.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMouseEnter.AShift"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMouseEnter.AMousePos"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndMouseLeave"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMouseLeave.Sender"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndMouseMoved"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMouseMoved.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMouseMoved.AShift"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMouseMoved.AMousePos"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndMousePressed"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMousePressed.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMousePressed.AButton"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMousePressed.AShift"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMousePressed.AMousePos"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndMouseReleased"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMouseReleased.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMouseReleased.AButton"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMouseReleased.AShift"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMouseReleased.AMousePos"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndMouseWheel"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMouseWheel.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMouseWheel.AShift"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMouseWheel.AWheelDelta"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMouseWheel.AMousePos"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndPaint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndPaint.Sender"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndPaint.ARect"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndMove"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndMove.Sender"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndResize"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndResize.Sender"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomForm.WndShow"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WndShow.Sender"> - <short /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomForm.FBorderWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomForm.FIsActive"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomForm.FResizedByUser"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomForm.FPositionSpecified"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomForm.Loaded"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomForm.Paint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.Paint.Canvas"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomForm.Resized"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: protected --> - <element name="TCustomForm.WidgetCoords"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomForm.WidgetCoords.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.WidgetCoords.AWidget"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TCustomForm.ProcessEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomForm.ProcessEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.ProcessEvent.Event"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomForm.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomForm.EvTextChanged"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomForm.CreateWnd"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomForm.CanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomForm.CanExpandHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomForm.Cursor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomForm.BorderWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomForm.WindowType"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomForm.OnCreate"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomForm.OnDestroy"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomForm.OnActivate"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomForm.OnDeactivate"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TCustomForm.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.Create.AOwner"> - <short /> - </element> - <!-- destructor Visibility: public --> - <element name="TCustomForm.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TCustomForm.Show"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TCustomForm.Close"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TCustomForm.SetPosition"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomForm.SetPosition.APosition"> - <short /> - </element> - <!-- property Visibility: public --> - <element name="TCustomForm.FocusedWidget"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TCustomForm.IsActive"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TCustomForm.MouseCaptureWidget"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TCustomForm.Wnd"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TForm"> - <short>A descendant of TCustomForm with published - properties</short> - <descr> - <printshort id="TForm" />.</descr> - <seealso> - <link id="TCustomForm" /> - </seealso> - </element> - <!-- property Visibility: published --> - <element name="TForm.Enabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TForm.BorderWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TForm.WindowType"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TForm.Text"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TForm.OnCreate"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TCustomStandardDialog"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomStandardDialog.StdBtnClicked"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomStandardDialog.StdBtnClicked.Sender"> - <short /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomStandardDialog.FButtons"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomStandardDialog.MainLayout"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomStandardDialog.BtnLayout"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomStandardDialog.Separator"> - <short /> - <descr /> - <seealso /> - </element> - <!-- function Visibility: protected --> - <element name="TCustomStandardDialog.ProcessEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomStandardDialog.ProcessEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomStandardDialog.ProcessEvent.Event"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TCustomStandardDialog.DistributeEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomStandardDialog.DistributeEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomStandardDialog.DistributeEvent.Event"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomStandardDialog.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomStandardDialog.Resized"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomStandardDialog.SetButtons"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomStandardDialog.SetButtons.AButtons"> - <short /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomStandardDialog.Buttons"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TCustomStandardDialog.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomStandardDialog.Create.AOwner"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TStandardDialog"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TStandardDialog.Text"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TStandardDialog.OnCreate"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TStandardDialog.Buttons"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TApplication"> - <short>The TApplication class manages the GUI application's - control flow and main settings</short> - <descr> - <printshort id="TApplication" />. For any GUI application - that uses fpGUI, there is precisely one TApplication - object, no matter whether the application has 0, 1, 2 or - more windows at any time.</descr> - </element> - <!-- variable Visibility: private --> - <element name="TApplication.FDisplay"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TApplication.FForms"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TApplication.FDefaultStyle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TApplication.FTitle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: protected --> - <element name="TApplication.XMLDoc"> - <short /> - <descr /> - <seealso /> - </element> - <!-- function Visibility: protected --> - <element name="TApplication.GetDefaultStyle"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TApplication.GetDefaultStyle.Result"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TApplication.SetTitle"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TApplication.SetTitle.ATitle"> - <short /> - </element> - <!-- constructor Visibility: public --> - <element name="TApplication.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- destructor Visibility: public --> - <element name="TApplication.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TApplication.SetupXMLStreaming"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TApplication.SetupXMLStreaming.AXMLFilename"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TApplication.CreateForm"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TApplication.CreateForm.InstanceClass"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TApplication.CreateForm.Reference"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TApplication.AddForm"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TApplication.AddForm.AForm"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TApplication.Run"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TApplication.Display"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TApplication.DefaultStyle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TApplication.Title"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: default --> - <element name="Application"> - <short>Global TApplication instance</short> - <descr> - <printshort id="Application" />is a object that holds all - the different parts together. It stores the instance - variables for the TStyle, TScreen, etc.</descr> - </element> - <!-- function Visibility: default --> - <element name="Min"> - <short>Returns the smallest value of the two</short> - </element> - <!-- function result Visibility: default --> - <element name="Min.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="Min.a"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="Min.b"> - <short /> - </element> - <!-- function Visibility: default --> - <element name="Max"> - <short>Returns the greater of two values.</short> - </element> - <!-- function result Visibility: default --> - <element name="Max.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="Max.a"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="Max.b"> - <short /> - </element> - <!-- function Visibility: default --> - <element name="ClipMinMax"> - <short>Clip the value until it is between min and - max</short> - <descr> - <printshort id="ClipMinMax" />. It is currently used - internally in the TScrollBarSlider.EvMouseMove to limit the - amount the user can scroll the scrollbar thumb - button.</descr> - </element> - <!-- function result Visibility: default --> - <element name="ClipMinMax.Result"> - <short>the clipped result value</short> - </element> - <!-- argument Visibility: default --> - <element name="ClipMinMax.val"> - <short>value to be tested</short> - </element> - <!-- argument Visibility: default --> - <element name="ClipMinMax.min"> - <short>minimum allowed value</short> - </element> - <!-- argument Visibility: default --> - <element name="ClipMinMax.max"> - <short>maximum allowed value</short> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.Draw3DFrame"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.Draw3DFrame.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.Draw3DFrame.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.Draw3DFrame.Color1"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.Draw3DFrame.Color2"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.Draw3DFrame.Color3"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.Draw3DFrame.Color4"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.DrawFocusRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawFocusRect.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawFocusRect.ARect"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleAbs.DrawSunkenOuterBorder"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawSunkenOuterBorder.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.DrawSunkenOuterBorder.ARect"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TMotifStyle"> - <short>The TMotifStyle class provides Motif look and - feel.</short> - <descr>This class implements the Motif look and feel. It - closely resembles the original Motif look as defined by the - Open Group, but with some minor improvements. The Motif - style is fpGUI's default GUI style on Unix - platforms.</descr> - <seealso> - <link id="TDefaultStyle" /> - <link id="TStyle" /> - </seealso> - </element> - <!-- procedure Visibility: public --> - <element name="TMotifStyle.DrawFocusRect"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawFocusRect.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawFocusRect.ARect"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TMotifStyle.DrawButtonFace"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawButtonFace.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawButtonFace.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawButtonFace.Flags"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TMotifStyle.DrawCheckBox"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawCheckBox.Canvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawCheckBox.ARect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawCheckBox.LabelRect"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawCheckBox.Flags"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TWidget.SetStyle"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TWidget.SetStyle.AValue"> - <short /> - </element> - <!-- constructor Visibility: public --> - <element name="TCustomLabel.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomLabel.Create.pText"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomLabel.Create.pOwner"> - <short /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomEdit.FSelStart"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomEdit.FSelOffset"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomEdit.SetText"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomEdit.SetText.AText"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomEdit.Create.pText"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomEdit.Create.pOwner"> - <short /> - </element> - <!-- constructor Visibility: public --> - <element name="TCustomButton.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomButton.Create.pText"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomButton.Create.pOwner"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomCheckbox.Create.pText"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomCheckbox.Create.pOwner"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomRadioButton.Create.pText"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomRadioButton.Create.pOwner"> - <short /> - </element> - <!-- property Visibility: published --> - <element name="TRadioButton.CanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TRadioButton.CanExpandHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TCustomGroupBox.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGroupBox.Create.pText"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGroupBox.Create.pOwner"> - <short /> - </element> - <!-- property Visibility: published --> - <element name="TGroupBox.CanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TGroupBox.CanExpandHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TListBox.ItemIndex"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomComboBox.FItemIndex"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomComboBox.FItems"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomComboBox.FOnChange"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomComboBox.SetItemIndex"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomComboBox.SetItemIndex.AValue"> - <short /> - </element> - <!-- variable Visibility: protected --> - <element name="TCustomComboBox.lbl"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomComboBox.ItemIndex"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomComboBox.OnChange"> - <short /> - <descr /> - <seealso /> - </element> - <!-- destructor Visibility: public --> - <element name="TCustomComboBox.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: public --> - <element name="TCustomComboBox.Items"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TComboBox.CanExpandHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TComboBox.ItemIndex"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TComboBox.OnChange"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TDrawGrid.CanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TDrawGrid.CanExpandHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TApplication.SetStyle"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TApplication.SetStyle.pNewStyle"> - <short /> - </element> - <!-- object Visibility: default --> - <element name="TMenuItem"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TMenuBar"> - <short>A container for TMenuItem objects</short> - </element> - <!-- constructor Visibility: public --> - <element name="TMenuBar.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuBar.Create.AOwner"> - <short /> - </element> - <!-- destructor Visibility: public --> - <element name="TMenuBar.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TMenuBar.AddMenu"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TMenuBar.AddMenu.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuBar.AddMenu.pTitle"> - <short /> - </element> - <!-- constructor Visibility: public --> - <element name="TMenuItem.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuItem.Create.pTitle"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuItem.Create.pOwner"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuItem.Create.AOwner"> - <short /> - </element> - <!-- constant Visibility: default --> - <element name="clRed"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clGreen"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clBlue"> - <short /> - <descr /> - <seealso /> - </element> - <!-- function Visibility: public --> - <element name="TStyleAbs.GetMenuBorders"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TStyleAbs.GetMenuBorders.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.GetMenuBorders.pCanvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.GetMenuBorders.pText"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TStyleAbs.GetMenuBorders.pTextWidth"> - <short /> - </element> - <!-- function Visibility: public --> - <element name="TDefaultStyle.GetMenuBorders"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TDefaultStyle.GetMenuBorders.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.GetMenuBorders.pCanvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.GetMenuBorders.pText"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TDefaultStyle.GetMenuBorders.pTextWidth"> - <short /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomLabel.FFontColor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomLabel.SetFontColor"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomLabel.SetFontColor.AValue"> - <short /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomLabel.FontColor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TLabel.FontColor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TCustomEdit.FFontColor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomEdit.SetFontColor"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomEdit.SetFontColor.AValue"> - <short /> - </element> - <!-- property Visibility: protected --> - <element name="TCustomEdit.FontColor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TEdit.FontColor"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TMenuItem.FHandler"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TMenuItem.FHotKeyDef"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TMenuItem.FItems"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TMenuItem.FSeparator"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TMenuItem.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- destructor Visibility: public --> - <element name="TMenuItem.Destroy"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TMenuItem.OnClick"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TMenuItem.Separator"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TMenuItem.HotKeyDef"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TMenuItem.Text"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TMenuItem.Visible"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TMenuItem.Enabled"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TMenuBar.FItems"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TMenuBar.FFocusItem"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TMenuBar.FHorzSpacing"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TMenuBar.CalcSizes"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TMenuBar.Paint"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuBar.Paint.Canvas"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TMenuBar.VisibleCount"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TMenuBar.VisibleCount.Result"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TMenuBar.VisibleItem"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TMenuBar.VisibleItem.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuBar.VisibleItem.idx"> - <short /> - </element> - <!-- procedure Visibility: protected --> - <element name="TMenuBar.DrawColumn"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuBar.DrawColumn.pCanvas"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuBar.DrawColumn.col"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuBar.DrawColumn.focus"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TMenuBar.DistributeEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TMenuBar.DistributeEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuBar.DistributeEvent.Event"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuBar.AddMenu.pHotKeyDef"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuBar.AddMenu.pHandlerProc"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TCustomGridLayout.RemoveChild"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomGridLayout.RemoveChild.AChild"> - <short /> - </element> - <!-- property Visibility: published --> - <element name="TForm.OnDestroy"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TForm.OnActivate"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TForm.OnDeactivate"> - <short /> - <descr /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TPopupWindow"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- constructor Visibility: public --> - <element name="TPopupWindow.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TPopupWindow.Create.AOwner"> - <short /> - </element> - <!-- procedure Visibility: public --> - <element name="TPopupWindow.Show"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- procedure Visibility: public --> - <element name="TPopupWindow.Close"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- object Visibility: default --> - <element name="TComboBoxPopup"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TComboBoxPopup.FListBox"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TComboBoxPopup.ItemSelected"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TComboBoxPopup.ItemSelected.Sender"> - <short /> - </element> - <!-- constructor Visibility: public --> - <element name="TComboBoxPopup.Create"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TComboBoxPopup.Create.AOwner"> - <short /> - </element> - <!-- property Visibility: public --> - <element name="TComboBoxPopup.ListBox"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: protected --> - <element name="TCustomComboBox.Click"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clCyan"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clYellow"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clMoneyGreen"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clSkyBlue"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clCream"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clMedGray"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clForestGreen"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clRoyalBlue"> - <short /> - <descr /> - <seealso /> - </element> - <!-- constant Visibility: default --> - <element name="clMagenta"> - <short /> - <descr /> - <seealso /> - </element> - <!-- procedure Visibility: private --> - <element name="TCustomEdit.DoMousePressed"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomEdit.DoMousePressed.pEvent"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TCustomEdit.ProcessEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TCustomEdit.ProcessEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TCustomEdit.ProcessEvent.Event"> - <short /> - </element> - <!-- property Visibility: published --> - <element name="TCheckbox.CanExpandHeight"> - <short /> - <descr /> - <seealso /> - </element> - <!-- property Visibility: published --> - <element name="TCheckbox.CanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - <!-- variable Visibility: private --> - <element name="TApplication.FUserStyle"> - <short /> - <descr /> - <seealso /> - </element> - <!-- function Visibility: protected --> - <element name="TMenuItem.ProcessEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TMenuItem.ProcessEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuItem.ProcessEvent.pEvent"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TMenuBar.DoMouseEnter"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuBar.DoMouseEnter.pEvent"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TMenuBar.DoMouseLeave"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuBar.DoMouseLeave.pEvent"> - <short /> - </element> - <!-- procedure Visibility: private --> - <element name="TMenuBar.DoMouseMove"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuBar.DoMouseMove.pEvent"> - <short /> - </element> - <!-- function Visibility: private --> - <element name="TMenuBar.CalcMouseCol"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TMenuBar.CalcMouseCol.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuBar.CalcMouseCol.x"> - <short /> - </element> - <!-- function Visibility: protected --> - <element name="TMenuBar.ProcessEvent"> - <short /> - <descr /> - <errors /> - <seealso /> - </element> - <!-- function result Visibility: default --> - <element name="TMenuBar.ProcessEvent.Result"> - <short /> - </element> - <!-- argument Visibility: default --> - <element name="TMenuBar.ProcessEvent.pEvent"> - <short /> - </element> - <!-- property Visibility: published --> - <element name="TMenuBar.CanExpandWidth"> - <short /> - <descr /> - <seealso /> - </element> - </module> - <!-- fpGUI --> - </package> -</fpdoc-descriptions> diff --git a/docs/xml/gui/motifstyle.xml b/docs/xml/gui/motifstyle.xml deleted file mode 100644 index 0374d286..00000000 --- a/docs/xml/gui/motifstyle.xml +++ /dev/null @@ -1,103 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<fpdoc-descriptions> - <package name="fpGUI"> - <!-- - ==================================================================== - MotifStyle - ==================================================================== ---> - <module name="MotifStyle"> - <short>Defines a Motif GUI Style.</short> - <descr><printshort id="MotifStyle" />. The traditional Unix GUI style.</descr> - <!-- unresolved type reference Visibility: default --> - <element name="Classes"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="SysUtils"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="fpGUI"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="fpGFX"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- object Visibility: default --> - <element name="TMotifStyle"> - <short>Defines a Motif GUI Style.</short> - <descr><printshort id="TMotifStyle" />. The traditional Unix GUI style.</descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- procedure Visibility: public --> - <element name="TMotifStyle.DrawFocusRect"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawFocusRect.Canvas"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawFocusRect.ARect"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TMotifStyle.DrawButtonFace"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawButtonFace.Canvas"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawButtonFace.ARect"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawButtonFace.Flags"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TMotifStyle.DrawCheckBox"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawCheckBox.Canvas"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawCheckBox.ARect"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawCheckBox.LabelRect"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TMotifStyle.DrawCheckBox.Flags"> - <short></short> - </element> - </module> - <!-- MotifStyle --> - </package> -</fpdoc-descriptions> diff --git a/docs/xml/gui/opensoftstyle.xml b/docs/xml/gui/opensoftstyle.xml deleted file mode 100644 index 3dc27776..00000000 --- a/docs/xml/gui/opensoftstyle.xml +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<fpdoc-descriptions> - <package name="fpGUI"> - <!-- - ==================================================================== - OpenSoftStyle - ==================================================================== ---> - <module name="OpenSoftStyle"> - <short>Defines a custom GUI Style called OpenSoft.</short> - <descr><printshort id="OpenSoftStyle" />. This started as a proof-of-concept - on how a custom style can be created. In the future this will be used - as the default style in my company products.</descr> - <!-- unresolved type reference Visibility: default --> - <element name="Classes"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="fpGUI"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="gfxBase"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="fpGFX"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- enumeration type Visibility: default --> - <element name="TGradientDirection"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGradientDirection.gdTopToBottom"> - <short></short> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGradientDirection.gdBottomToTop"> - <short></short> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGradientDirection.gdLeftToRight"> - <short></short> - </element> - <!-- enumeration value Visibility: default --> - <element name="TGradientDirection.gdRightToLeft"> - <short></short> - </element> - <!-- function type Visibility: default --> - <element name="TCalcGradientEndX"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TCalcGradientEndX.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TCalcGradientEndX.Y"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TCalcGradientEndX.H"> - <short></short> - </element> - <!-- object Visibility: default --> - <element name="TOpenSoftStyle"> - <short>Defines a custom GUI Style called OpenSoft.</short> - <descr><printshort id="OpenSoftStyle" />. This started as a proof-of-concept - on how a custom style can be created. In the future this will be used - as the default style in my company products.</descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- procedure Visibility: private --> - <element name="TOpenSoftStyle.PaintGradient"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TOpenSoftStyle.PaintGradient.pCanvas"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TOpenSoftStyle.PaintGradient.R"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TOpenSoftStyle.PaintGradient.StartColor"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TOpenSoftStyle.PaintGradient.EndColor"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TOpenSoftStyle.PaintGradient.Direction"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TOpenSoftStyle.PaintGradient.GradLines"> - <short></short> - </element> - <!-- function Visibility: public --> - <element name="TOpenSoftStyle.GetGUIColor"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- function result Visibility: default --> - <element name="TOpenSoftStyle.GetGUIColor.Result"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TOpenSoftStyle.GetGUIColor.Color"> - <short></short> - </element> - <!-- procedure Visibility: public --> - <element name="TOpenSoftStyle.DrawGroupBox"> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <!-- argument Visibility: default --> - <element name="TOpenSoftStyle.DrawGroupBox.Canvas"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TOpenSoftStyle.DrawGroupBox.ARect"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TOpenSoftStyle.DrawGroupBox.ALabel"> - <short></short> - </element> - <!-- argument Visibility: default --> - <element name="TOpenSoftStyle.DrawGroupBox.WidgetState"> - <short></short> - </element> - </module> - <!-- OpenSoftStyle --> - </package> -</fpdoc-descriptions> diff --git a/docs/xml/gui/stylemanager.xml b/docs/xml/gui/stylemanager.xml deleted file mode 100644 index f3f6bc60..00000000 --- a/docs/xml/gui/stylemanager.xml +++ /dev/null @@ -1,198 +0,0 @@ -<?xml version="1.0"?> -<fpdoc-descriptions> - <package name="fpGUI"> - <!-- - ==================================================================== - stylemanager - ==================================================================== ---> - <module name="StyleManager"> - <short>Defines a class that manages all the GUI Styles.</short> - <descr><printshort id="StyleManager" />. All the different styles - must register with the Style Manager to be used at runtime.</descr> - <!-- unresolved type reference Visibility: default --> - <element name="Classes"> - <short/> - <descr/> - <seealso/> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="Contnrs"> - <short/> - <descr/> - <seealso/> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="fpGUI"> - <short/> - <descr/> - <seealso/> - </element> - <!-- constant Visibility: default --> - <element name="cDefaultStyle"> <short>Defines the default style the system will use.</short> - <descr><printshort id="cDefaultStyle"/></descr> - </element> - <!-- "class of" type Visibility: default --> - <element name="TStyleClass"> - <short/> - <descr/> - <seealso/> - </element> - <!-- object Visibility: default --> - <element name="TStyleManager"> <short>Class that manages the different styles</short> - <descr><printshort id="TStyleManager"/>. It's function is to register new style classes, create instances of the style classes and many more functions.</descr> - </element> - <!-- variable Visibility: private --> - <element name="TStyleManager.FDefaultStyle"> - <short/> - <descr/> - <seealso/> - </element> - <!-- variable Visibility: private --> - <element name="TStyleManager.FUserStyle"> - <short/> - <descr/> - <seealso/> - </element> - <!-- function Visibility: private --> - <element name="TStyleManager.GetDefaultStyle"> <short>Returns a instance of the default style</short> - <descr><printshort id="TStyleManager.GetDefaultStyle"/>. At the moment the default style is hard-coded to the Windows Style, but in the future it will be auto-detected based on the OS and Desktop Manager used.</descr> - </element> - <!-- function result Visibility: default --> - <element name="TStyleManager.GetDefaultStyle.Result"> - <short/> - </element> - <!-- constructor Visibility: public --> - <element name="TStyleManager.Create"> - <short/> - <descr/> - <errors/> - <seealso/> - </element> - <!-- destructor Visibility: public --> - <element name="TStyleManager.Destroy"> - <short/> - <descr/> - <errors/> - <seealso/> - </element> - <!-- property Visibility: public --> - <element name="TStyleManager.DefaultStyle"> - <short/> - <descr/> - <seealso/> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleManager.SetStyle"> - <short/> - <descr/> - <errors/> - <seealso/> - </element> - <!-- argument Visibility: default --> - <element name="TStyleManager.SetStyle.pNewStyle"> - <short/> - </element> - <!-- function Visibility: default --> - <element name="gStyleManager"> <short>Singleton function to access the Style Manager</short> - <descr><printshort id="gStyleManager"/>. Never create a instance of TStyleManager, always access in through the singleton function.</descr> - </element> - <!-- function result Visibility: default --> - <element name="gStyleManager.Result"> - <short/> - </element> - <!-- object Visibility: default --> - <element name="TStyleClassMapping"> <short>Class to map a string name to a style class</short> - <descr><printshort id="TStyleClassMapping"/>. Used internally as a data class to map a user friendly style name to a style class.</descr> - </element> - <!-- variable Visibility: private --> - <element name="TStyleClassMapping.FsMappingName"> - <short/> - <descr/> - <seealso/> - </element> - <!-- variable Visibility: private --> - <element name="TStyleClassMapping.FStyleClass"> - <short/> - <descr/> - <seealso/> - </element> - <!-- constructor Visibility: public --> - <element name="TStyleClassMapping.Create"> - <short/> - <descr/> - <errors/> - <seealso/> - </element> - <!-- argument Visibility: default --> - <element name="TStyleClassMapping.Create.AMappingName"> - <short/> - </element> - <!-- argument Visibility: default --> - <element name="TStyleClassMapping.Create.AStyleClass"> - <short/> - </element> - <!-- property Visibility: public --> - <element name="TStyleClassMapping.MappingName"> <short>User friendly style name</short> - <descr><printshort id="TStyleClassMapping.MappingName"/>.</descr> - </element> - <!-- property Visibility: public --> - <element name="TStyleClassMapping.StyleClass"> <short>Class reference to the Style Class</short> - <descr><printshort id="TStyleClassMapping.StyleClass"/>.</descr> - </element> - <!-- variable Visibility: private --> - <element name="TStyleManager.FList"> - <short/> - <descr/> - <seealso/> - </element> - <!-- variable Visibility: private --> - <element name="TStyleManager.FDefaultStyleType"> - <short/> - <descr/> - <seealso/> - </element> - <!-- argument Visibility: default --> - <element name="TStyleManager.SetStyle.AStyleName"> - <short/> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleManager.RegisterClass"> <short>Method used to register a new style with the Style Manager</short> - <descr><printshort id="TStyleManager.RegisterClass"/></descr> - <example file="examples/TStyleManager.RegisterClass.pas"/> - </element> - <!-- argument Visibility: default --> - <element name="TStyleManager.RegisterClass.AStyleName"> - <short/> - </element> - <!-- argument Visibility: default --> - <element name="TStyleManager.RegisterClass.AStyleClass"> - <short/> - </element> - <!-- function Visibility: public --> - <element name="TStyleManager.CreateInstance"> <short>Creates an instance of the named style</short> - <descr><printshort id="TStyleManager.CreateInstance"/>.</descr> - </element> - <!-- function result Visibility: default --> - <element name="TStyleManager.CreateInstance.Result"> <short>An instance of the named style</short> - <descr><printshort id="TStyleManager.CreateInstance.Result"/>.</descr> - </element> - <!-- argument Visibility: default --> - <element name="TStyleManager.CreateInstance.AStyleName"> <short>The style name</short> - <descr><printshort id="TStyleManager.CreateInstance.AStyleName"/>. This name will be used and looked up internally in the style manager and if found, a instance of that style will be returned.</descr> - </element> - <!-- procedure Visibility: public --> - <element name="TStyleManager.AssignStyleTypes"> - <short/> - <descr/> - <errors/> - <seealso/> - </element> - <!-- argument Visibility: default --> - <element name="TStyleManager.AssignStyleTypes.AStrings"> - <short/> - </element> - </module> - <!-- StyleManager --> - </package> -</fpdoc-descriptions> diff --git a/docs/xml/gui/windowsstyle.xml b/docs/xml/gui/windowsstyle.xml deleted file mode 100644 index 96fd9690..00000000 --- a/docs/xml/gui/windowsstyle.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<fpdoc-descriptions> - <package name="fpGUI"> - <!-- - ==================================================================== - WindowsStyle - ==================================================================== ---> - <module name="WindowsStyle"> - <short>Defines the Windows 9x/2000 GUI Style</short> - <descr><printshort id="WindowsStyle" />. Currently this is the default - style under all platforms. In the future the Style Manager will be - able to detect the OS and Desktop Manager and then pick a more - appropriate style.</descr> - <!-- unresolved type reference Visibility: default --> - <element name="Classes"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="SysUtils"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- unresolved type reference Visibility: default --> - <element name="fpGUI"> - <short></short> - <descr></descr> - <seealso></seealso> - </element> - <!-- object Visibility: default --> - <element name="TWindowsStyle"> - <short>Defines the Windows 9x/2000 GUI Style.</short> - <descr><printshort id="TWindowsStyle" />. Currently this is the default - style under all platforms. In the future the Style Manager will be - able to detect the OS and Desktop Manager and then pick a more - appropriate style.</descr> - <errors></errors> - <seealso></seealso> - </element> - </module> - <!-- WindowsStyle --> - </package> -</fpdoc-descriptions> diff --git a/docs/xml/img/imageio_de.xml b/docs/xml/img/imageio_de.xml deleted file mode 100644 index 6b4eeebc..00000000 --- a/docs/xml/img/imageio_de.xml +++ /dev/null @@ -1,730 +0,0 @@ -<?xml version="1.0" encoding="iso8859-1"?> -<fpdoc-descriptions> - <!-- - ==================================================================== - ImageIO - ==================================================================== ---> - <module name="ImageIO"> - <short>Bilddateien Lesen und Schreiben</short> - <descr> - <p>Die Unit - <var>ImageIO</var>definiert einige Basisklassen für das - allgemeine Lesen und Schreiben von Bilddateien. Um ein - spezielles Dateiformat zu unterstützen, ist die - entsprechende Basisklasse abzuleiten.</p> - <p>Derzeit wird nur das Lesen von Bildern unterstützt. - Die entsprechende Basisklasse heißt - <link id="TImageReader" />. Unterstützung für das - Schreiben von vorhandenen Bilddaten in eine Datei oder einen - Stream wird in einer zukünftigen Version - hinzugefügt.</p> - <p>Diese Unit ist weitesgehendst unabhängig von anderen - Paketen. Auch von fpGFX werden nur Deklarationen - übernommen, es wird aber kein Code verwendet. Dies - ermöglicht eine sehr flexible und effiziente Nutzung von - - <var>ImageIO</var>für allerlei spezielle Anwendungen. - Komfortfunktionen für die Nutzung mit fpGFX sind in der - Unit - <link id="fpImg" />zu finden.</p> - <p>fpImg ist (c) 2000 Areca Systems GmbH / Sebastian - Günther (sg@freepascal.org). Alle Rechte - vorbehalten.</p> - </descr> - <element name="SysUtils"> - <!-- Unit-Verweis --> - <short>Unterstützung für - <link id="SysUtils.Exception">Exceptions</link></short> - </element> - <element name="Classes"> - <!-- Unit-Verweis --> - <short>Unterstützung für - <link id="Classes.TStream">Streams</link></short> - </element> - <element name="GFXBase"> - <!-- Unit-Verweis --> - <short>Deklarationen für - <link id="GFXBase.TGfxPixelFormat">Pixelformate</link>und - <link id="GFXBase.TGfxPalette">Farbpaletten</link></short> - </element> - <!-- - ******************************************************************** - EImgError - ******************************************************************** ---> - <element name="EImgError"> - <!-- Klasse --> - <short>Allgemeine Fehler-Exception für - <var>ImageIO</var></short> - <descr>Alle speziellen Exceptions, die in - <var>ImageIO</var>oder seinen Lese- und Schreibroutinen - auftreten können, sind von - <var>EImgError</var>abgeleitet. Diese Klasse betrifft - allerdings nur spezifische Fehlersituationen; allgemeine - Fehlerbedingungen, wie Schutzverletzungen etc., werden - über die gewohnten Standard-Exceptions gemeldet.</descr> - </element> - <!-- - ******************************************************************** - EImgOutOfData - ******************************************************************** ---> - <element name="EImgOutOfData"> - <!-- Klasse --> - <short>Zuwenig Daten für Bild verfügbar</short> - <descr> - <p>Ein Bild-Lese-Objekt ( - <link id="TImageReader" />) kann diesen Fehler melden, wenn - es Daten lesen soll, aber keine weiteren Daten zur - Verfügung stehen.</p> - <p>Auf die Anforderung hin, Daten zu lesen, erwartet der - Leser auch entsprechende Daten. Es ist erforderlich, - daß mindestens ein Byte an Daten zu lesen ist. Ist - dies nicht der Fall, wird diese Exception - ausgelöst.</p> - </descr> - <seealso> - <link id="TImageReader" /> - </seealso> - </element> - <element name="EImgOutOfData.Create"> - <!-- Konstruktur --> - <short>Initialisierung mit passendem Fehlertext</short> - <descr>Dieser Konstruktur dient nur zur bequemeren - Programmierung: Er initialisiert die Exception automatisch - mit dem passenden Fehlertext.</descr> - </element> - <!-- - ******************************************************************** - EImgUnsupportedPixelFormat - ******************************************************************** ---> - <element name="EImgUnsupportedPixelFormat"> - <!-- Klasse --> - <short>Pixelformat wird nicht unterstützt</short> - <descr>Diese Exception wird von Bildlese- oder Schreibklassen - ausgelöst, wenn sie mit einem Pixelformat konfrontiert - werden, welches sie nicht unterstützen (Lesen) oder - nicht unterstützen können (zugrunde liegendes - Dateiformat kennt das geforderte Pixelformat nicht).</descr> - </element> - <element name="EImgUnsupportedPixelFormat.Create"> - <!-- Konstruktur --> - <short>Initialisierung mit passendem Fehlertext</short> - <descr>Dieser Konstruktur dient nur zur bequemeren - Programmierung: Er initialisiert die Exception automatisch - mit dem passenden Fehlertext.</descr> - </element> - <element name="TImageReaderClass"> - <!-- "class of" Typ --> - <short>Klassentyp für - <link id="TImageReader" /></short> - <descr>Diese Typdeklaration definiert einen Namen für - alle Klassen vom Typ - <link id="TImageReader" />. Um beispielsweise in einer - Variable den Typ einer Bildlese-Klasse zu speichern, muß - diese Variable einfach als vom Typ - <var>TImageReaderClass</var>deklariert werden.</descr> - <seealso> - <link id="TImageReader" />.</seealso> - </element> - <element name="TImageReaderState"> - <!-- Aufzählungstyp --> - <short>Zustandswerte für - <link id="TImageReader">Bildleser</link></short> - <descr>Dieser Typ zählt die verschiedenen möglichen - Zustände für einen - <link id="TImageReader">Bildleser</link>auf. Während ein - Bild eingelesen wird, wird der Zustand an bestimmten Punkten - um eine Stufe erhöht.</descr> - <seealso> - <link id="TImageReader" /> - </seealso> - </element> - <element name="TImageReaderState.irsStart"> - <!-- Aufzählungswert --> - <short>Leser hat noch nichts getan</short> - </element> - <element name="TImageReaderState.irsInHeader"> - <!-- Aufzählungswert --> - <short>Leser verarbeitet gerade den Header</short> - </element> - <element name="TImageReaderState.irsHeaderRead"> - <!-- Aufzählungswert --> - <short>Leser hat den Header fertig eingelesen</short> - </element> - <element name="TImageReaderState.irsInImage"> - <!-- Aufzählungswert --> - <short>Leser liest gerade die Bilddaten ein</short> - </element> - <element name="TImageReaderState.irsFinished"> - <!-- Aufzählungswert --> - <short>Leser hat seine Arbeit beendet; Header und Bild sind - komplett eingelesen.</short> - </element> - <element name="TSegmentEvent"> - <!-- Prozedur-Typ --> - <short>'Segment gelesen' Ereignistyp</short> - <descr>Dieser Typ definiert ein Ereignis, welches besagt, - daß der Sender ein Bildsegment erfolgreich fertig - eingelesen hat. Die Argumente - <var>StartY</var>und - <var>Height</var>geben Auskunft darüber, welchen Teil - des gesamten Bildes das gelesene Segment darstellt.</descr> - <seealso> - <link id="TImageReader.OnSegment" /> - </seealso> - </element> - <element name="TSegmentEvent.Sender"> - <!-- Argument --> - <short>Auslöser des Ereignisses</short> - </element> - <element name="TSegmentEvent.StartY"> - <!-- Argument --> - <short>Y-Start-Koordinate des Segmentes</short> - </element> - <element name="TSegmentEvent.Height"> - <!-- Argument --> - <short>Höhe des Segmentes in Pixel</short> - </element> - <!-- - ******************************************************************** - TImageReader - ******************************************************************** ---> - <element name="TImageReader"> - <!-- Klasse --> - <short>Basisklasse für Bildleser</short> - <descr> - <p>Diese Klasse stellt die Basisklasse für alle - Bildleser dar. Wie der Name sagt, ist ein Bildleser eine - Klasse, welche Bilder (Images) einlesen kann.</p> - <p>Durch die gemeinsame Basisklasse gibt es eine gemeinsame - Schnittstelle, so daß verschiedene Leser in - Anwendungen sehr leicht ausgetauscht werden können. - Für speziellere Anwendungen kann jeder Bildleser - problemlos weitere Fähigkeiten anbieten; hierbei - entfällt dann aber der Vorteil der - Austauschbarkeit.</p> - <p>Alle Daten werden aus einem - <link id="Classes.TStream">Stream-Objekt</link>geladen. - Eine weitere Besonderheit ist die Anforderung an alle - Leser, daß sie asynchrones Lesen unterstützen - müssen: Der Lesevorgang muß sich nach einer - beliebigen Zahl von gelesenen Bytes unterbrechen und zu - einem späteren Zeitpunkt wieder fortführen - lassen.</p> - <section> - <title>Der Einlese-Vorgang aus der Sicht von - außen</title> - <p>Die äußere Anwendung, welche den Leser - verwenden will, sollte folgende Dinge beachten:</p> - <ul> - <li> - <p>Zunächst wird der Header eingelesen. Dazu - wird solange die Methode - <link id="TImageReader.ProcessHeaderData" />aufgerufen, - bis der Header vollständig eingelesen wurde. Die - Fertigstellung läßt sich über den - aktuellen Zustand ( - <link id="TImageReader.State" />) oder über ein - entsprechendes Ereignis ( - <link id="TImageReader.OnHeader" />) prüfen.</p> - </li> - <li> - <p>Die Anwendung kann nun entscheiden, ob sie die - eigentlichen Bilddaten lesen will oder nicht. Ein - Abbrechen an dieser Stelle ist problemlos - möglich. Desweiteren können ab diesem - Zeitpunkt die Eigenschaften des Bildes über die - entsprechenden Eigenschaften des Objekts abgefragt - werden.</p> - </li> - <li> - <p>Das Bild selbst kann auf Wunsch in mehreren - Schritten, sogenannten - <em>Segmenten</em>eingelesen werden. Ein Segment ist - einfach ein vertikaler Abschnitt des Bildes. - <br />Ein Segment muß initialisiert werden, und - zwar zu Beginn des Einlese-Vorgangs und, auf Wunsch, - nachdem ein einzelnes Segment fertig gelesen wurde. - Hierzu dient die Methode - <link id="TImageReader.SetImageSegmentBuffer" />. - Bemerkenswert hierbei ist, daß der Aufrufer den - Speicher für das Bild verwaltet.</p> - </li> - <li> - <p>Um herauszufinden, an welcher Stelle das - nächste zu lesende Segment liegen wird, sollte - die Methode - <link id="TImageReader.GetImageSegmentStartY" />befragt - werden. Dies ist nur dann nicht notwendig, falls das - Bild in nur einem Segment gelesen werden soll - hier - würde immer der Wert "0" zurückgeliefert - werden.</p> - </li> - <li> - <p>Wenn der Leser Bilddaten lesen soll, ist dazu - einfach die Methode - <link id="TImageReader.ProcessImageData" />aufzurufen. - Diese Methode liest solange Daten, solange welche - verfügbar sind oder das Bild fertig eingelesen - wurde.</p> - </li> - <li> - <p>Sobald ein Segment fertig gelesen wurde, wird das - Ereignis - <link id="TImageReader.OnSegment" />ausgelöst.</p> - </li> - <li> - <p>Wurde das gesamte Bild fertig eingelesen, wird das - Ereignis - <link id="TImageReader.OnImage" />ausgelöst.</p> - </li> - </ul> - </section> - <section> - <title>Der Einlese-Vorgang aus der Sicht des - Lesers</title> - <p>Für die Implementierung von abgeleitete Klassen, - welche ein konkretes Bildformat lesen können, sind - folgende Punkte zu beachten:</p> - <ul> - <li> - <p>Üblicherweise wird kein neuer - <link id="TImageReader.Create"> - Konstruktur</link>benötigt. Es spricht zwar auch - nichts dagegen; aber die Präsenz eines - virtuellen Konstruktors in dieser Basisklasse mag - für manchen so erscheinen, als sei dies - notwendig. Dies ist nicht der Fall.</p> - </li> - <li> - <p>Die Verwaltung des aktuellen Zustandes ( - <link id="TImageReader.State" />) wird bereits - komplett von der Basisklasse übernommen</p> - </li> - <li> - <p>Die Methode - <link id="TImageReader.DoProcessHeaderData" />muß - auf jeden Fall überschrieben werden; sie dient - zum Lesen und zur Auswertung des Bild-Headers. Sobald - der Header fertig eingelesen wurde und die - entsprechenden Informations-Eigenschaften gesetzt - wurden, muß die neue Methode die Methode - <link id="TImageReader.HeaderFinished" />aufrufen.</p> - </li> - <li> - <p>Die Methode - <link id="TImageReader.DoGetImageSegmentStartY" />muß - überschrieben werden; sie kann vor dem Lesen - eines Segmentes aufgerufen werden, solange es noch - Segmente zu lesen gibt.</p> - </li> - <li> - <p>Die Methode - <link id="TImageReader.InitImageReading" />kann - überschrieben werden, wenn der Bildleser vor - Beginn des Einlesens der eigentlichen Bilddaten noch - spezielle Vorbereitungen zu treffen hat.</p> - </li> - <li> - <p>Die Methode - <link id="TImageReader.DoProcessHeaderData" />wird in - abgeleiteten Klassen überschrieben, um Bilddaten - einlesen zu können. Immer dann, wenn ein Segment - eingelesen wurde, muß die neue Methode die - Methode - <link id="TImageReader.SegmentFinished" />aufrufen; - entsprechend muß - <link id="TImageReader.ImageFinished" />aufgerufen - werden, sobald das Bild vollständig eingelesen - wurde.</p> - </li> - </ul> - </section> - </descr> - <errors>Trifft der Leser im Header auf ein Pixelformat, - welches er nicht verarbeiten kann, so löst er eine - <link id="EImgUnsupportedPixelFormat" />Exception aus. - <br />Wird - <link id="TImageReader.ProcessHeaderData" />oder - <link id="TImageReader.ProcessImageData" />aufgerufen und es - können vom Eingabe-Datenstrom keine Daten gelesen - werden, so wird die Exception - <link id="EImgOutOfData" />ausgelöst.</errors> - </element> - <element name="TImageReader.FWidth"> - <!-- Variable --> - <short>Breite des Bildes</short> - <descr>Dieses Feld gibt die Breite des Bildes in Pixeln an. - Es darf nur innerhalb von - <link id="TImageReader.DoProcessHeaderData" />gesetzt - werden.</descr> - <seealso> - <link id="TImageReader.Width" /> - </seealso> - </element> - <element name="TImageReader.FHeight"> - <!-- Variable --> - <short>Höhe des Bildes</short> - <descr>Dieses Feld gibt die Höhe des Bildes in Pixeln - an. Es darf nur innerhalb von - <link id="TImageReader.DoProcessHeaderData" />gesetzt - werden.</descr> - <seealso> - <link id="TImageReader.Height" /> - </seealso> - </element> - <element name="TImageReader.FPixelFormat"> - <!-- Variable --> - <short>Pixelformat des Bildes</short> - <descr>Dieses Feld beschreibt das Pixelformat, in welchem die - Pixeldaten vorliegen. Es darf nur innerhalb von - <link id="TImageReader.DoProcessHeaderData" />gesetzt - werden.</descr> - <seealso> - <link id="TImageReader.PixelFormat" /> - </seealso> - </element> - <element name="TImageReader.HeaderFinished"> - <!-- Prozedur --> - <short>Signalisierung: Header fertig eingelesen</short> - <descr> - <p>Diese Methode wird von abgeleiteten Klassen aufgerufen, - sobald diese den Header des Bildes fertig eingelesen und - verarbeitet haben. Der Zustand des Lesers wird auf - <link id="TImageReaderState.irsHeaderFinished" />gesetzt, - und die Behandlungsroutine des Ereignisses - <link id="TImageReader.OnHeader" />wird aufgerufen, falls - vorhanden.</p> - <p> - <var>HeaderFinished</var>darf nur von überschriebenen - Methoden von - <link id="TImageReader.DoProcessHeaderData" />aufgerufen - werden; der Leser befindet sich zu diesem Zeitpunkt noch im - Zustand - <link id="TImageReaderState.irsInHeader" />.</p> - </descr> - <errors>Nur Debug-Version: Prüft per Zusicherung auf - korrekten Zustand des Lesers.</errors> - <seealso> - <link id="TImageReader.ProcessHeaderData" /> - <link id="TImageReader.DoProcessHeaderData" /> - </seealso> - </element> - <element name="TImageReader.SegmentFinished"> - <!-- Prozedur --> - <short>Signalisierung: Bildsegment eingelesen</short> - <descr> - <p>Abgeleitete Klassen rufen diese Methode auf, um zu - signalisieren, daß ein Segment des Bildes fertig - eingelesen wurde. Falls vorhanden, wird die - Behandlungsroutine des Ereignisses - <link id="TImageReader.OnSegment" />aufgerufen.</p> - <p> - <var>SegmentFinished</var>darf nur von überschriebenen - Methoden von - <link id="TImageReader.DoProcessImageData" />aufgerufen - werden; der Leser befindet sich zu diesem Zeitpunkt immer - im Zustand - <link id="TImageReaderState.irsInImage" />.</p> - </descr> - <errors>Nur Debug-Version: Prüft per Zusicherung auf - korrekten Zustand des Lesers.</errors> - </element> - <element name="TImageReader.SegmentFinished.AStartY"> - <!-- Argument --> - <short>Y-Start-Koordinate des Segmentes</short> - </element> - <element name="TImageReader.SegmentFinished.AHeight"> - <!-- Argument --> - <short>Höhe des Segments in Pixel</short> - </element> - <element name="TImageReader.ImageFinished"> - <!-- Prozedur --> - <short>Signalisierung: Bild fertig eingelesen</short> - <descr> - <p>Eine abgeleitete Klasse ruft diese Methode auf, um - anzuzeigen, daß das gesamte Bild nun eingelesen wurde. - Der Zustand des Lesers wird auf - <link id="TImageReaderState.irsFinished" />gesetzt, und die - Behandlungsroutine für das Ereignis - <link id="TImageReader.OnImage" />wird aufgerufen, falls - diese gesetzt ist.</p> - <p> - <var>ImageFinished</var>darf nur von überschriebenen - Methoden von - <link id="TImageReader.DoProcessImageData" />aufgerufen - werden; der Leser befindet sich zu diesem Zeitpunkt noch im - Zustand - <link id="TImageReaderState.irsInImage" />.</p> - </descr> - <errors>Nur Debug-Version: Prüft per Zusicherung auf - korrekten Zustand des Lesers.</errors> - </element> - <element name="TImageReader.DoProcessHeaderData"> - <!-- Prozedur --> - <short>Implementierung: Header-Daten verarbeiten</short> - <descr> - <p>Diese virtuelle Methode muß von abgeleiteten - Klassen überschrieben werden, um Header-Daten einlesen - zu können.</p> - <p>Wenn diese Methode aufgerufen wird, steht mindestens ein - Byte zum Lesen vom angegebenen Stream-Objekt bereit - - anderenfalls liegt ein Lesefehler vor. Implementierungen - dieser Methode sollten versuchen, soviel Bytes wie - möglich auf einmal zu verarbeiten; sie müssen - aber nach einer beliebigen Anzahl von gelesen Bytes ihre - Arbeit unterbrechen können. Solange der aktuelle - Zustand - <link id="TImageReaderState.irsInHeader" />ist, wird der - Aufrufer diese Methode immer wieder aufrufen, wenn seiner - Meinung nach neue Daten zur Verfügung stehen. Achtung, - diese Methode sollte nicht bereits in den Datenbereich - hineinlesen, da alle Bildleser nach Möglichkeit den - Datenstrom rein von vorne nach hinten verarbeiten - können sollen, ohne zurückzuspringen.</p> - <p>Sobald der Header fertig eingelesen wurde und die - Bildeigenschaften dieses Objekts gesetzt wurden, muß - <link id="TImageReader.HeaderFinished" />aufgerufen werden, - und diese Methode verlassen werden.</p> - </descr> - <errors>Kann nicht mindestens ein Byte vom Stream-Objekt - gelesen werden, so muß eine - <link id="EImgOutOfData" />Exception ausgelöst - werden.</errors> - <seealso> - <link id="TImageReader.ProcessHeaderData" /> - </seealso> - </element> - <element name="TImageReader.DoProcessHeaderData.AStream"> - <!-- Argument --> - <short>Quelle für die Header-Daten</short> - </element> - <element name="TImageReader.DoGetImageSegmentStartY"> - <!-- Funktion --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.DoGetImageSegmentStartY.Result"> - <!-- Funktionsergebnis --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.DoGetImageSegmentStartY.ASegmentHeight"> - - <!-- Argument --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.InitImageReading"> - <!-- Prozedur --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.DoProcessImageData"> - <!-- Prozedur --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.DoProcessImageData.AStream"> - <!-- Argument --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.Create"> - <!-- Konstruktur --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.ProcessHeaderData"> - <!-- Prozedur --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.ProcessHeaderData.AStream"> - <!-- Argument --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.GetImageSegmentStartY"> - <!-- Funktion --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.GetImageSegmentStartY.Result"> - <!-- Funktionsergebnis --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.GetImageSegmentStartY.ASegmentHeight"> - - <!-- Argument --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.SetImageSegmentBuffer"> - <!-- Prozedur --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.SetImageSegmentBuffer.AData"> - <!-- Argument --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.SetImageSegmentBuffer.AStride"> - <!-- Argument --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.SetImageSegmentBuffer.ASegmentHeight"> - - <!-- Argument --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.ProcessImageData"> - <!-- Prozedur --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.ProcessImageData.AStream"> - <!-- Argument --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.State"> - <!-- Eigenschaft --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.Width"> - <!-- Eigenschaft --> - <short>Breite des Bildes</short> - <descr>Diese Eigenschaft gibt die Breite des Bildes in Pixeln - an. Sie wird im Rahmen des Header-Einlesens gesetzt und - besitzt ab dem Zustand - <link id="TImageReaderState.irsHeaderFinished" />einen - gültigen (und endgültigen) Wert.</descr> - <seealso> - <link id="TImageReader.FWidth" /> - </seealso> - </element> - <element name="TImageReader.Height"> - <!-- Eigenschaft --> - <short>Höhe des Bildes</short> - <descr>Diese Eigenschaft gibt die Höhe des Bildes in - Pixeln an. Sie wird im Rahmen des Header-Einlesens gesetzt - und besitzt ab dem Zustand - <link id="TImageReaderState.irsHeaderFinished" />einen - gültigen (und endgültigen) Wert.</descr> - <seealso> - <link id="TImageReader.FHeight" /> - </seealso> - </element> - <element name="TImageReader.PixelFormat"> - <!-- Eigenschaft --> - <short>Pixelformat des Bildes</short> - <descr>Diese Eigenschaft beschreibt das Pixelformat, in - welchem die Pixeldaten vorliegen. Sie wird im Rahmen des - Header-Einlesens gesetzt und besitzt ab dem Zustand - <link id="TImageReaderState.irsHeaderFinished" />einen - gültigen (und endgültigen) Wert.</descr> - <seealso> - <link id="GFXBase.TGfxPixelFormat" /> - <link id="TImageReader.FPixelFormat" /> - </seealso> - </element> - <element name="TImageReader.SegmentData"> - <!-- Eigenschaft --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.SegmentStride"> - <!-- Eigenschaft --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.SegmentHeight"> - <!-- Eigenschaft --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.SegmentSize"> - <!-- Eigenschaft --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.OnHeader"> - <!-- Eigenschaft --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.OnSegment"> - <!-- Eigenschaft --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - <element name="TImageReader.OnImage"> - <!-- Eigenschaft --> - <short></short> - <descr></descr> - <errors></errors> - <seealso></seealso> - </element> - </module> - <!-- ImageIO --> -</fpdoc-descriptions> diff --git a/gfx/Makefile b/gfx/Makefile deleted file mode 100644 index 9d7a373b..00000000 --- a/gfx/Makefile +++ /dev/null @@ -1,2041 +0,0 @@ -# -# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/08/28] -# -default: all -MAKEFILETARGETS=i386-linux -BSDs = freebsd netbsd openbsd darwin -UNIXs = linux $(BSDs) solaris qnx -LIMIT83fs = go32v2 os2 emx watcom -FORCE: -.PHONY: FORCE -override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH))) -ifneq ($(findstring darwin,$(OSTYPE)),) -inUnix=1 #darwin -SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH))) -else -ifeq ($(findstring ;,$(PATH)),) -inUnix=1 -SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH))) -else -SEARCHPATH:=$(subst ;, ,$(PATH)) -endif -endif -SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE)))) -PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH)))) -ifeq ($(PWD),) -PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH)))) -ifeq ($(PWD),) -$(error You need the GNU utils package to use this Makefile) -else -PWD:=$(firstword $(PWD)) -SRCEXEEXT= -endif -else -PWD:=$(firstword $(PWD)) -SRCEXEEXT=.exe -endif -ifndef inUnix -ifeq ($(OS),Windows_NT) -inWinNT=1 -else -ifdef OS2_SHELL -inOS2=1 -endif -endif -else -ifneq ($(findstring cygdrive,$(PATH)),) -inCygWin=1 -endif -endif -ifdef inUnix -SRCBATCHEXT=.sh -else -ifdef inOS2 -SRCBATCHEXT=.cmd -else -SRCBATCHEXT=.bat -endif -endif -ifdef inUnix -PATHSEP=/ -else -PATHSEP:=$(subst /,\,/) -ifdef inCygWin -PATHSEP=/ -endif -endif -ifdef PWD -BASEDIR:=$(subst \,/,$(shell $(PWD))) -ifdef inCygWin -ifneq ($(findstring /cygdrive/,$(BASEDIR)),) -BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR)) -BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR))) -BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR)) -endif -endif -else -BASEDIR=. -endif -ifdef inOS2 -ifndef ECHO -ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO=echo -else -ECHO:=$(firstword $(ECHO)) -endif -else -ECHO:=$(firstword $(ECHO)) -endif -endif -export ECHO -endif -override DEFAULT_FPCDIR=/opt/fpc/src -ifndef FPC -ifdef PP -FPC=$(PP) -endif -endif -ifndef FPC -FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH)))) -ifneq ($(FPCPROG),) -FPCPROG:=$(firstword $(FPCPROG)) -FPC:=$(shell $(FPCPROG) -PB) -ifneq ($(findstring Error,$(FPC)),) -override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH))))) -endif -else -override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH))))) -endif -endif -override FPC:=$(subst $(SRCEXEEXT),,$(FPC)) -override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT) -FOUNDFPC:=$(strip $(wildcard $(FPC))) -ifeq ($(FOUNDFPC),) -FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH)))) -ifeq ($(FOUNDFPC),) -$(error Compiler $(FPC) not found) -endif -endif -ifndef FPC_COMPILERINFO -FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO) -endif -ifndef FPC_VERSION -FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO)) -endif -export FPC FPC_VERSION FPC_COMPILERINFO -unexport CHECKDEPEND ALLDEPENDENCIES -ifndef CPU_TARGET -ifdef CPU_TARGET_DEFAULT -CPU_TARGET=$(CPU_TARGET_DEFAULT) -endif -endif -ifndef OS_TARGET -ifdef OS_TARGET_DEFAULT -OS_TARGET=$(OS_TARGET_DEFAULT) -endif -endif -ifneq ($(words $(FPC_COMPILERINFO)),5) -FPC_COMPILERINFO+=$(shell $(FPC) -iSP) -FPC_COMPILERINFO+=$(shell $(FPC) -iTP) -FPC_COMPILERINFO+=$(shell $(FPC) -iSO) -FPC_COMPILERINFO+=$(shell $(FPC) -iTO) -endif -ifndef CPU_SOURCE -CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO)) -endif -ifndef CPU_TARGET -CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO)) -endif -ifndef OS_SOURCE -OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO)) -endif -ifndef OS_TARGET -OS_TARGET:=$(word 5,$(FPC_COMPILERINFO)) -endif -FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET) -FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE) -ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) -TARGETSUFFIX=$(OS_TARGET) -SOURCESUFFIX=$(OS_SOURCE) -else -TARGETSUFFIX=$(FULL_TARGET) -SOURCESUFFIX=$(FULL_SOURCE) -endif -ifneq ($(FULL_TARGET),$(FULL_SOURCE)) -CROSSCOMPILE=1 -endif -ifeq ($(findstring makefile,$(MAKECMDGOALS)),) -ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),) -$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first) -endif -endif -ifneq ($(findstring $(OS_TARGET),$(BSDs)),) -BSDhier=1 -endif -ifeq ($(OS_TARGET),linux) -linuxHier=1 -endif -export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE -ifdef FPCDIR -override FPCDIR:=$(subst \,/,$(FPCDIR)) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=wrong -endif -else -override FPCDIR=wrong -endif -ifdef DEFAULT_FPCDIR -ifeq ($(FPCDIR),wrong) -override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR)) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=wrong -endif -endif -endif -ifeq ($(FPCDIR),wrong) -ifdef inUnix -override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=/usr/lib/fpc/$(FPC_VERSION) -endif -else -override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH)))))) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR:=$(BASEDIR) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=c:/pp -endif -endif -endif -endif -endif -ifndef CROSSBINDIR -CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX)) -endif -ifndef BINUTILSPREFIX -ifndef CROSSBINDIR -ifdef CROSSCOMPILE -BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)- -endif -endif -endif -UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX)) -ifeq ($(UNITSDIR),) -UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET)) -endif -PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra) -override PACKAGE_NAME=fpgfx -override PACKAGE_VERSION=0.2 -ifeq ($(FULL_TARGET),i386-linux) -override TARGET_DIRS+=linux -endif -ifeq ($(FULL_TARGET),i386-linux) -override TARGET_UNITS+=gfxbase geldirty gelimage -endif -ifeq ($(FULL_TARGET),i386-linux) -override TARGET_RSTS+=gfxbase -endif -override INSTALL_BUILDUNIT=gfxbase -override INSTALL_FPCPACKAGE=y -ifeq ($(FULL_TARGET),i386-linux) -override COMPILER_OPTIONS+=-S2h -endif -ifeq ($(FULL_TARGET),i386-linux) -override COMPILER_SOURCEDIR+=emulayer -endif -ifeq ($(FULL_TARGET),i386-linux) -override COMPILER_UNITTARGETDIR+=units -endif -ifdef REQUIRE_UNITSDIR -override UNITSDIR+=$(REQUIRE_UNITSDIR) -endif -ifdef REQUIRE_PACKAGESDIR -override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR) -endif -ifdef ZIPINSTALL -ifneq ($(findstring $(OS_TARGET),$(UNIXs)),) -UNIXHier=1 -endif -else -ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),) -UNIXHier=1 -endif -endif -ifndef INSTALL_PREFIX -ifdef PREFIX -INSTALL_PREFIX=$(PREFIX) -endif -endif -ifndef INSTALL_PREFIX -ifdef UNIXHier -INSTALL_PREFIX=/usr/local -else -ifdef INSTALL_FPCPACKAGE -INSTALL_BASEDIR:=/pp -else -INSTALL_BASEDIR:=/$(PACKAGE_NAME) -endif -endif -endif -export INSTALL_PREFIX -ifdef INSTALL_FPCSUBDIR -export INSTALL_FPCSUBDIR -endif -ifndef DIST_DESTDIR -DIST_DESTDIR:=$(BASEDIR) -endif -export DIST_DESTDIR -ifndef COMPILER_UNITTARGETDIR -ifdef PACKAGEDIR_MAIN -COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX) -else -COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX) -endif -endif -ifndef COMPILER_TARGETDIR -COMPILER_TARGETDIR=. -endif -ifndef INSTALL_BASEDIR -ifdef UNIXHier -ifdef INSTALL_FPCPACKAGE -INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION) -else -INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME) -endif -else -INSTALL_BASEDIR:=$(INSTALL_PREFIX) -endif -endif -ifndef INSTALL_BINDIR -ifdef UNIXHier -INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin -else -INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin -ifdef INSTALL_FPCPACKAGE -ifdef CROSSCOMPILE -ifdef CROSSINSTALL -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX) -else -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX) -endif -else -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX) -endif -endif -endif -endif -ifndef INSTALL_UNITDIR -INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX) -ifdef INSTALL_FPCPACKAGE -ifdef PACKAGE_NAME -INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME) -endif -endif -endif -ifndef INSTALL_LIBDIR -ifdef UNIXHier -INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib -else -INSTALL_LIBDIR:=$(INSTALL_UNITDIR) -endif -endif -ifndef INSTALL_SOURCEDIR -ifdef UNIXHier -ifdef BSDhier -SRCPREFIXDIR=share/src -else -ifdef linuxHier -SRCPREFIXDIR=share/src -else -SRCPREFIXDIR=src -endif -endif -ifdef INSTALL_FPCPACKAGE -ifdef INSTALL_FPCSUBDIR -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME) -else -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -endif -else -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -else -ifdef INSTALL_FPCPACKAGE -ifdef INSTALL_FPCSUBDIR -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME) -else -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME) -endif -else -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source -endif -endif -endif -ifndef INSTALL_DOCDIR -ifdef UNIXHier -ifdef BSDhier -DOCPREFIXDIR=share/doc -else -ifdef linuxHier -DOCPREFIXDIR=share/doc -else -DOCPREFIXDIR=doc -endif -endif -ifdef INSTALL_FPCPACKAGE -INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -else -INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -else -ifdef INSTALL_FPCPACKAGE -INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME) -else -INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc -endif -endif -endif -ifndef INSTALL_EXAMPLEDIR -ifdef UNIXHier -ifdef INSTALL_FPCPACKAGE -ifdef BSDhier -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -else -ifdef linuxHier -INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples -else -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME) -endif -endif -else -ifdef BSDhier -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -else -ifdef linuxHier -INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -else -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -endif -endif -else -ifdef INSTALL_FPCPACKAGE -INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME) -else -INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples -endif -endif -endif -ifndef INSTALL_DATADIR -INSTALL_DATADIR=$(INSTALL_BASEDIR) -endif -ifndef INSTALL_SHAREDDIR -INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib -endif -ifdef CROSSCOMPILE -ifndef CROSSBINDIR -CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX)) -ifeq ($(CROSSBINDIR),) -CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE)) -endif -endif -else -CROSSBINDIR= -endif -ifeq ($(OS_SOURCE),linux) -ifndef GCCLIBDIR -ifeq ($(CPU_TARGET),i386) -ifneq ($(findstring x86_64,$(shell uname -a)),) -ifeq ($(BINUTILSPREFIX),) -GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`) -endif -endif -endif -ifeq ($(CPU_TARGET),powerpc64) -ifeq ($(BINUTILSPREFIX),) -GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`) -endif -endif -endif -ifndef GCCLIBDIR -CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH)))) -ifneq ($(CROSSGCC),) -GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`) -endif -endif -ifndef OTHERLIBDIR -OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }') -endif -endif -ifdef inUnix -ifeq ($(OS_SOURCE),netbsd) -OTHERLIBDIR+=/usr/pkg/lib -endif -export GCCLIBDIR OTHERLIB -endif -BATCHEXT=.bat -LOADEREXT=.as -EXEEXT=.exe -PPLEXT=.ppl -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.so -SHAREDLIBPREFIX=libfp -STATICLIBPREFIX=libp -IMPORTLIBPREFIX=libimp -RSTEXT=.rst -ifeq ($(findstring 1.0.,$(FPC_VERSION)),) -ifeq ($(OS_TARGET),go32v1) -STATICLIBPREFIX= -SHORTSUFFIX=v1 -endif -ifeq ($(OS_TARGET),go32v2) -STATICLIBPREFIX= -SHORTSUFFIX=dos -endif -ifeq ($(OS_TARGET),watcom) -STATICLIBPREFIX= -OEXT=.obj -ASMEXT=.asm -SHAREDLIBEXT=.dll -SHORTSUFFIX=wat -endif -ifeq ($(OS_TARGET),linux) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=lnx -endif -ifeq ($(OS_TARGET),freebsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=fbs -endif -ifeq ($(OS_TARGET),netbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=nbs -endif -ifeq ($(OS_TARGET),openbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=obs -endif -ifeq ($(OS_TARGET),win32) -SHAREDLIBEXT=.dll -SHORTSUFFIX=w32 -endif -ifeq ($(OS_TARGET),os2) -BATCHEXT=.cmd -AOUTEXT=.out -STATICLIBPREFIX= -SHAREDLIBEXT=.dll -SHORTSUFFIX=os2 -ECHO=echo -endif -ifeq ($(OS_TARGET),emx) -BATCHEXT=.cmd -AOUTEXT=.out -STATICLIBPREFIX= -SHAREDLIBEXT=.dll -SHORTSUFFIX=emx -ECHO=echo -endif -ifeq ($(OS_TARGET),amiga) -EXEEXT= -SHAREDLIBEXT=.library -SHORTSUFFIX=amg -endif -ifeq ($(OS_TARGET),morphos) -EXEEXT= -SHAREDLIBEXT=.library -SHORTSUFFIX=mos -endif -ifeq ($(OS_TARGET),atari) -EXEEXT=.ttp -SHORTSUFFIX=ata -endif -ifeq ($(OS_TARGET),beos) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=be -endif -ifeq ($(OS_TARGET),solaris) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=sun -endif -ifeq ($(OS_TARGET),qnx) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=qnx -endif -ifeq ($(OS_TARGET),netware) -EXEEXT=.nlm -STATICLIBPREFIX= -SHORTSUFFIX=nw -endif -ifeq ($(OS_TARGET),netwlibc) -EXEEXT=.nlm -STATICLIBPREFIX= -SHORTSUFFIX=nwl -endif -ifeq ($(OS_TARGET),macos) -BATCHEXT= -EXEEXT= -DEBUGSYMEXT=.xcoff -SHORTSUFFIX=mac -endif -ifeq ($(OS_TARGET),darwin) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=dwn -endif -ifeq ($(OS_TARGET),gba) -EXEEXT=.gba -SHAREDLIBEXT=.so -SHORTSUFFIX=gba -endif -else -ifeq ($(OS_TARGET),go32v1) -PPUEXT=.pp1 -OEXT=.o1 -ASMEXT=.s1 -SMARTEXT=.sl1 -STATICLIBEXT=.a1 -SHAREDLIBEXT=.so1 -STATICLIBPREFIX= -SHORTSUFFIX=v1 -endif -ifeq ($(OS_TARGET),go32v2) -STATICLIBPREFIX= -SHORTSUFFIX=dos -endif -ifeq ($(OS_TARGET),watcom) -STATICLIBPREFIX= -SHORTSUFFIX=wat -endif -ifeq ($(OS_TARGET),linux) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=lnx -endif -ifeq ($(OS_TARGET),freebsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=fbs -endif -ifeq ($(OS_TARGET),netbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=nbs -endif -ifeq ($(OS_TARGET),openbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=obs -endif -ifeq ($(OS_TARGET),win32) -PPUEXT=.ppw -OEXT=.ow -ASMEXT=.sw -SMARTEXT=.slw -STATICLIBEXT=.aw -SHAREDLIBEXT=.dll -SHORTSUFFIX=w32 -endif -ifeq ($(OS_TARGET),os2) -BATCHEXT=.cmd -PPUEXT=.ppo -ASMEXT=.so2 -OEXT=.oo2 -AOUTEXT=.out -SMARTEXT=.sl2 -STATICLIBPREFIX= -STATICLIBEXT=.ao2 -SHAREDLIBEXT=.dll -SHORTSUFFIX=os2 -ECHO=echo -endif -ifeq ($(OS_TARGET),amiga) -EXEEXT= -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.library -SHORTSUFFIX=amg -endif -ifeq ($(OS_TARGET),atari) -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT=.ttp -SHORTSUFFIX=ata -endif -ifeq ($(OS_TARGET),beos) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=be -endif -ifeq ($(OS_TARGET),solaris) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=sun -endif -ifeq ($(OS_TARGET),qnx) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=qnx -endif -ifeq ($(OS_TARGET),netware) -STATICLIBPREFIX= -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.nlm -EXEEXT=.nlm -SHORTSUFFIX=nw -endif -ifeq ($(OS_TARGET),netwlibc) -STATICLIBPREFIX= -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.nlm -EXEEXT=.nlm -SHORTSUFFIX=nwl -endif -ifeq ($(OS_TARGET),macos) -BATCHEXT= -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -DEBUGSYMEXT=.xcoff -SHORTSUFFIX=mac -endif -endif -ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) -FPCMADE=fpcmade.$(SHORTSUFFIX) -ZIPSUFFIX=$(SHORTSUFFIX) -ZIPCROSSPREFIX= -ZIPSOURCESUFFIX=src -ZIPEXAMPLESUFFIX=exm -else -FPCMADE=fpcmade.$(TARGETSUFFIX) -ZIPSOURCESUFFIX=.source -ZIPEXAMPLESUFFIX=.examples -ifdef CROSSCOMPILE -ZIPSUFFIX=.$(SOURCESUFFIX) -ZIPCROSSPREFIX=$(TARGETSUFFIX)- -else -ZIPSUFFIX=.$(TARGETSUFFIX) -ZIPCROSSPREFIX= -endif -endif -ifndef ECHO -ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO= __missing_command_ECHO -else -ECHO:=$(firstword $(ECHO)) -endif -else -ECHO:=$(firstword $(ECHO)) -endif -endif -export ECHO -ifndef DATE -DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(DATE),) -DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(DATE),) -DATE= __missing_command_DATE -else -DATE:=$(firstword $(DATE)) -endif -else -DATE:=$(firstword $(DATE)) -endif -endif -export DATE -ifndef GINSTALL -GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(GINSTALL),) -GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(GINSTALL),) -GINSTALL= __missing_command_GINSTALL -else -GINSTALL:=$(firstword $(GINSTALL)) -endif -else -GINSTALL:=$(firstword $(GINSTALL)) -endif -endif -export GINSTALL -ifndef CPPROG -CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(CPPROG),) -CPPROG= __missing_command_CPPROG -else -CPPROG:=$(firstword $(CPPROG)) -endif -endif -export CPPROG -ifndef RMPROG -RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(RMPROG),) -RMPROG= __missing_command_RMPROG -else -RMPROG:=$(firstword $(RMPROG)) -endif -endif -export RMPROG -ifndef MVPROG -MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MVPROG),) -MVPROG= __missing_command_MVPROG -else -MVPROG:=$(firstword $(MVPROG)) -endif -endif -export MVPROG -ifndef MKDIRPROG -MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MKDIRPROG),) -MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MKDIRPROG),) -MKDIRPROG= __missing_command_MKDIRPROG -else -MKDIRPROG:=$(firstword $(MKDIRPROG)) -endif -else -MKDIRPROG:=$(firstword $(MKDIRPROG)) -endif -endif -export MKDIRPROG -ifndef ECHOREDIR -ifndef inUnix -ECHOREDIR=echo -else -ECHOREDIR=$(ECHO) -endif -endif -ifndef COPY -COPY:=$(CPPROG) -fp -endif -ifndef COPYTREE -COPYTREE:=$(CPPROG) -Rfp -endif -ifndef MKDIRTREE -MKDIRTREE:=$(MKDIRPROG) -p -endif -ifndef MOVE -MOVE:=$(MVPROG) -f -endif -ifndef DEL -DEL:=$(RMPROG) -f -endif -ifndef DELTREE -DELTREE:=$(RMPROG) -rf -endif -ifndef INSTALL -ifdef inUnix -INSTALL:=$(GINSTALL) -c -m 644 -else -INSTALL:=$(COPY) -endif -endif -ifndef INSTALLEXE -ifdef inUnix -INSTALLEXE:=$(GINSTALL) -c -m 755 -else -INSTALLEXE:=$(COPY) -endif -endif -ifndef MKDIR -MKDIR:=$(GINSTALL) -m 755 -d -endif -export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR -ifndef PPUMOVE -PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(PPUMOVE),) -PPUMOVE= __missing_command_PPUMOVE -else -PPUMOVE:=$(firstword $(PPUMOVE)) -endif -endif -export PPUMOVE -ifndef FPCMAKE -FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(FPCMAKE),) -FPCMAKE= __missing_command_FPCMAKE -else -FPCMAKE:=$(firstword $(FPCMAKE)) -endif -endif -export FPCMAKE -ifndef ZIPPROG -ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ZIPPROG),) -ZIPPROG= __missing_command_ZIPPROG -else -ZIPPROG:=$(firstword $(ZIPPROG)) -endif -endif -export ZIPPROG -ifndef TARPROG -TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(TARPROG),) -TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(TARPROG),) -TARPROG= __missing_command_TARPROG -else -TARPROG:=$(firstword $(TARPROG)) -endif -else -TARPROG:=$(firstword $(TARPROG)) -endif -endif -export TARPROG -ASNAME=$(BINUTILSPREFIX)as -LDNAME=$(BINUTILSPREFIX)ld -ARNAME=$(BINUTILSPREFIX)ar -RCNAME=$(BINUTILSPREFIX)rc -ifneq ($(findstring 1.0.,$(FPC_VERSION)),) -ifeq ($(OS_TARGET),win32) -ifeq ($(CROSSBINDIR),) -ASNAME=asw -LDNAME=ldw -ARNAME=arw -endif -endif -endif -ifndef ASPROG -ifdef CROSSBINDIR -ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT) -else -ASPROG=$(ASNAME) -endif -endif -ifndef LDPROG -ifdef CROSSBINDIR -LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT) -else -LDPROG=$(LDNAME) -endif -endif -ifndef RCPROG -ifdef CROSSBINDIR -RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT) -else -RCPROG=$(RCNAME) -endif -endif -ifndef ARPROG -ifdef CROSSBINDIR -ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT) -else -ARPROG=$(ARNAME) -endif -endif -AS=$(ASPROG) -LD=$(LDPROG) -RC=$(RCPROG) -AR=$(ARPROG) -PPAS=ppas$(SRCBATCHEXT) -ifdef inUnix -LDCONFIG=ldconfig -else -LDCONFIG= -endif -ifdef DATE -DATESTR:=$(shell $(DATE) +%Y%m%d) -else -DATESTR= -endif -ifndef UPXPROG -ifeq ($(OS_TARGET),go32v2) -UPXPROG:=1 -endif -ifeq ($(OS_TARGET),win32) -UPXPROG:=1 -endif -ifdef UPXPROG -UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(UPXPROG),) -UPXPROG= -else -UPXPROG:=$(firstword $(UPXPROG)) -endif -else -UPXPROG= -endif -endif -export UPXPROG -ZIPOPT=-9 -ZIPEXT=.zip -ifeq ($(USETAR),bz2) -TAROPT=vj -TAREXT=.tar.bz2 -else -TAROPT=vz -TAREXT=.tar.gz -endif -override REQUIRE_PACKAGES=rtl fcl -ifeq ($(FULL_TARGET),i386-linux) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_HASH=1 -REQUIRE_PACKAGES_PASZLIB=1 -REQUIRE_PACKAGES_NETDB=1 -REQUIRE_PACKAGES_LIBASYNC=1 -REQUIRE_PACKAGES_PTHREADS=1 -REQUIRE_PACKAGES_FCL=1 -REQUIRE_PACKAGES_PASJPEG=1 -REQUIRE_PACKAGES_IBASE=1 -REQUIRE_PACKAGES_POSTGRES=1 -REQUIRE_PACKAGES_MYSQL=1 -REQUIRE_PACKAGES_ODBC=1 -REQUIRE_PACKAGES_ORACLE=1 -REQUIRE_PACKAGES_SQLITE=1 -endif -ifdef REQUIRE_PACKAGES_RTL -PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_RTL),) -ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),) -UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX) -else -UNITDIR_RTL=$(PACKAGEDIR_RTL) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_RTL)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE) -endif -else -PACKAGEDIR_RTL= -UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_RTL),) -UNITDIR_RTL:=$(firstword $(UNITDIR_RTL)) -else -UNITDIR_RTL= -endif -endif -ifdef UNITDIR_RTL -override COMPILER_UNITDIR+=$(UNITDIR_RTL) -endif -endif -ifdef REQUIRE_PACKAGES_HASH -PACKAGEDIR_HASH:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /hash/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_HASH),) -ifneq ($(wildcard $(PACKAGEDIR_HASH)/units/$(TARGETSUFFIX)),) -UNITDIR_HASH=$(PACKAGEDIR_HASH)/units/$(TARGETSUFFIX) -else -UNITDIR_HASH=$(PACKAGEDIR_HASH) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_HASH)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_HASH) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_HASH)/$(FPCMADE) -endif -else -PACKAGEDIR_HASH= -UNITDIR_HASH:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /hash/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_HASH),) -UNITDIR_HASH:=$(firstword $(UNITDIR_HASH)) -else -UNITDIR_HASH= -endif -endif -ifdef UNITDIR_HASH -override COMPILER_UNITDIR+=$(UNITDIR_HASH) -endif -endif -ifdef REQUIRE_PACKAGES_PASZLIB -PACKAGEDIR_PASZLIB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_PASZLIB),) -ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)/units/$(TARGETSUFFIX)),) -UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)/units/$(TARGETSUFFIX) -else -UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_PASZLIB)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_PASZLIB) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_PASZLIB)/$(FPCMADE) -endif -else -PACKAGEDIR_PASZLIB= -UNITDIR_PASZLIB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_PASZLIB),) -UNITDIR_PASZLIB:=$(firstword $(UNITDIR_PASZLIB)) -else -UNITDIR_PASZLIB= -endif -endif -ifdef UNITDIR_PASZLIB -override COMPILER_UNITDIR+=$(UNITDIR_PASZLIB) -endif -endif -ifdef REQUIRE_PACKAGES_NETDB -PACKAGEDIR_NETDB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /netdb/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_NETDB),) -ifneq ($(wildcard $(PACKAGEDIR_NETDB)/units/$(TARGETSUFFIX)),) -UNITDIR_NETDB=$(PACKAGEDIR_NETDB)/units/$(TARGETSUFFIX) -else -UNITDIR_NETDB=$(PACKAGEDIR_NETDB) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_NETDB)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_NETDB) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_NETDB)/$(FPCMADE) -endif -else -PACKAGEDIR_NETDB= -UNITDIR_NETDB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /netdb/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_NETDB),) -UNITDIR_NETDB:=$(firstword $(UNITDIR_NETDB)) -else -UNITDIR_NETDB= -endif -endif -ifdef UNITDIR_NETDB -override COMPILER_UNITDIR+=$(UNITDIR_NETDB) -endif -endif -ifdef REQUIRE_PACKAGES_LIBASYNC -PACKAGEDIR_LIBASYNC:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /libasync/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_LIBASYNC),) -ifneq ($(wildcard $(PACKAGEDIR_LIBASYNC)/units/$(TARGETSUFFIX)),) -UNITDIR_LIBASYNC=$(PACKAGEDIR_LIBASYNC)/units/$(TARGETSUFFIX) -else -UNITDIR_LIBASYNC=$(PACKAGEDIR_LIBASYNC) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_LIBASYNC)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_LIBASYNC) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_LIBASYNC)/$(FPCMADE) -endif -else -PACKAGEDIR_LIBASYNC= -UNITDIR_LIBASYNC:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /libasync/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_LIBASYNC),) -UNITDIR_LIBASYNC:=$(firstword $(UNITDIR_LIBASYNC)) -else -UNITDIR_LIBASYNC= -endif -endif -ifdef UNITDIR_LIBASYNC -override COMPILER_UNITDIR+=$(UNITDIR_LIBASYNC) -endif -endif -ifdef REQUIRE_PACKAGES_PTHREADS -PACKAGEDIR_PTHREADS:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /pthreads/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_PTHREADS),) -ifneq ($(wildcard $(PACKAGEDIR_PTHREADS)/units/$(TARGETSUFFIX)),) -UNITDIR_PTHREADS=$(PACKAGEDIR_PTHREADS)/units/$(TARGETSUFFIX) -else -UNITDIR_PTHREADS=$(PACKAGEDIR_PTHREADS) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_PTHREADS)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_PTHREADS) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_PTHREADS)/$(FPCMADE) -endif -else -PACKAGEDIR_PTHREADS= -UNITDIR_PTHREADS:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /pthreads/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_PTHREADS),) -UNITDIR_PTHREADS:=$(firstword $(UNITDIR_PTHREADS)) -else -UNITDIR_PTHREADS= -endif -endif -ifdef UNITDIR_PTHREADS -override COMPILER_UNITDIR+=$(UNITDIR_PTHREADS) -endif -endif -ifdef REQUIRE_PACKAGES_FCL -PACKAGEDIR_FCL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_FCL),) -ifneq ($(wildcard $(PACKAGEDIR_FCL)/units/$(TARGETSUFFIX)),) -UNITDIR_FCL=$(PACKAGEDIR_FCL)/units/$(TARGETSUFFIX) -else -UNITDIR_FCL=$(PACKAGEDIR_FCL) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_FCL)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_FCL) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL)/$(FPCMADE) -endif -else -PACKAGEDIR_FCL= -UNITDIR_FCL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_FCL),) -UNITDIR_FCL:=$(firstword $(UNITDIR_FCL)) -else -UNITDIR_FCL= -endif -endif -ifdef UNITDIR_FCL -override COMPILER_UNITDIR+=$(UNITDIR_FCL) -endif -endif -ifdef REQUIRE_PACKAGES_PASJPEG -PACKAGEDIR_PASJPEG:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /pasjpeg/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_PASJPEG),) -ifneq ($(wildcard $(PACKAGEDIR_PASJPEG)/units/$(TARGETSUFFIX)),) -UNITDIR_PASJPEG=$(PACKAGEDIR_PASJPEG)/units/$(TARGETSUFFIX) -else -UNITDIR_PASJPEG=$(PACKAGEDIR_PASJPEG) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_PASJPEG)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_PASJPEG) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_PASJPEG)/$(FPCMADE) -endif -else -PACKAGEDIR_PASJPEG= -UNITDIR_PASJPEG:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /pasjpeg/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_PASJPEG),) -UNITDIR_PASJPEG:=$(firstword $(UNITDIR_PASJPEG)) -else -UNITDIR_PASJPEG= -endif -endif -ifdef UNITDIR_PASJPEG -override COMPILER_UNITDIR+=$(UNITDIR_PASJPEG) -endif -endif -ifdef REQUIRE_PACKAGES_IBASE -PACKAGEDIR_IBASE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /ibase/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_IBASE),) -ifneq ($(wildcard $(PACKAGEDIR_IBASE)/units/$(TARGETSUFFIX)),) -UNITDIR_IBASE=$(PACKAGEDIR_IBASE)/units/$(TARGETSUFFIX) -else -UNITDIR_IBASE=$(PACKAGEDIR_IBASE) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_IBASE)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_IBASE) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_IBASE)/$(FPCMADE) -endif -else -PACKAGEDIR_IBASE= -UNITDIR_IBASE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /ibase/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_IBASE),) -UNITDIR_IBASE:=$(firstword $(UNITDIR_IBASE)) -else -UNITDIR_IBASE= -endif -endif -ifdef UNITDIR_IBASE -override COMPILER_UNITDIR+=$(UNITDIR_IBASE) -endif -endif -ifdef REQUIRE_PACKAGES_POSTGRES -PACKAGEDIR_POSTGRES:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /postgres/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_POSTGRES),) -ifneq ($(wildcard $(PACKAGEDIR_POSTGRES)/units/$(TARGETSUFFIX)),) -UNITDIR_POSTGRES=$(PACKAGEDIR_POSTGRES)/units/$(TARGETSUFFIX) -else -UNITDIR_POSTGRES=$(PACKAGEDIR_POSTGRES) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_POSTGRES)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_POSTGRES) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_POSTGRES)/$(FPCMADE) -endif -else -PACKAGEDIR_POSTGRES= -UNITDIR_POSTGRES:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /postgres/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_POSTGRES),) -UNITDIR_POSTGRES:=$(firstword $(UNITDIR_POSTGRES)) -else -UNITDIR_POSTGRES= -endif -endif -ifdef UNITDIR_POSTGRES -override COMPILER_UNITDIR+=$(UNITDIR_POSTGRES) -endif -endif -ifdef REQUIRE_PACKAGES_MYSQL -PACKAGEDIR_MYSQL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /mysql/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_MYSQL),) -ifneq ($(wildcard $(PACKAGEDIR_MYSQL)/units/$(TARGETSUFFIX)),) -UNITDIR_MYSQL=$(PACKAGEDIR_MYSQL)/units/$(TARGETSUFFIX) -else -UNITDIR_MYSQL=$(PACKAGEDIR_MYSQL) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_MYSQL)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_MYSQL) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_MYSQL)/$(FPCMADE) -endif -else -PACKAGEDIR_MYSQL= -UNITDIR_MYSQL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /mysql/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_MYSQL),) -UNITDIR_MYSQL:=$(firstword $(UNITDIR_MYSQL)) -else -UNITDIR_MYSQL= -endif -endif -ifdef UNITDIR_MYSQL -override COMPILER_UNITDIR+=$(UNITDIR_MYSQL) -endif -endif -ifdef REQUIRE_PACKAGES_ODBC -PACKAGEDIR_ODBC:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /odbc/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_ODBC),) -ifneq ($(wildcard $(PACKAGEDIR_ODBC)/units/$(TARGETSUFFIX)),) -UNITDIR_ODBC=$(PACKAGEDIR_ODBC)/units/$(TARGETSUFFIX) -else -UNITDIR_ODBC=$(PACKAGEDIR_ODBC) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_ODBC)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_ODBC) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_ODBC)/$(FPCMADE) -endif -else -PACKAGEDIR_ODBC= -UNITDIR_ODBC:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /odbc/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_ODBC),) -UNITDIR_ODBC:=$(firstword $(UNITDIR_ODBC)) -else -UNITDIR_ODBC= -endif -endif -ifdef UNITDIR_ODBC -override COMPILER_UNITDIR+=$(UNITDIR_ODBC) -endif -endif -ifdef REQUIRE_PACKAGES_ORACLE -PACKAGEDIR_ORACLE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /oracle/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_ORACLE),) -ifneq ($(wildcard $(PACKAGEDIR_ORACLE)/units/$(TARGETSUFFIX)),) -UNITDIR_ORACLE=$(PACKAGEDIR_ORACLE)/units/$(TARGETSUFFIX) -else -UNITDIR_ORACLE=$(PACKAGEDIR_ORACLE) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_ORACLE)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_ORACLE) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_ORACLE)/$(FPCMADE) -endif -else -PACKAGEDIR_ORACLE= -UNITDIR_ORACLE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /oracle/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_ORACLE),) -UNITDIR_ORACLE:=$(firstword $(UNITDIR_ORACLE)) -else -UNITDIR_ORACLE= -endif -endif -ifdef UNITDIR_ORACLE -override COMPILER_UNITDIR+=$(UNITDIR_ORACLE) -endif -endif -ifdef REQUIRE_PACKAGES_SQLITE -PACKAGEDIR_SQLITE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /sqlite/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_SQLITE),) -ifneq ($(wildcard $(PACKAGEDIR_SQLITE)/units/$(TARGETSUFFIX)),) -UNITDIR_SQLITE=$(PACKAGEDIR_SQLITE)/units/$(TARGETSUFFIX) -else -UNITDIR_SQLITE=$(PACKAGEDIR_SQLITE) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_SQLITE)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_SQLITE) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_SQLITE)/$(FPCMADE) -endif -else -PACKAGEDIR_SQLITE= -UNITDIR_SQLITE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /sqlite/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_SQLITE),) -UNITDIR_SQLITE:=$(firstword $(UNITDIR_SQLITE)) -else -UNITDIR_SQLITE= -endif -endif -ifdef UNITDIR_SQLITE -override COMPILER_UNITDIR+=$(UNITDIR_SQLITE) -endif -endif -ifndef NOCPUDEF -override FPCOPTDEF=$(CPU_TARGET) -endif -ifneq ($(OS_TARGET),$(OS_SOURCE)) -override FPCOPT+=-T$(OS_TARGET) -endif -ifneq ($(CPU_TARGET),$(CPU_SOURCE)) -override FPCOPT+=-P$(CPU_TARGET) -endif -ifeq ($(OS_SOURCE),openbsd) -override FPCOPT+=-FD$(NEW_BINUTILS_PATH) -endif -ifndef CROSSBOOTSTRAP -ifneq ($(BINUTILSPREFIX),) -override FPCOPT+=-XP$(BINUTILSPREFIX) -Xc -endif -ifneq ($(BINUTILSPREFIX),) -override FPCOPT+=-Xr$(RLINKPATH) -endif -endif -ifdef UNITDIR -override FPCOPT+=$(addprefix -Fu,$(UNITDIR)) -endif -ifdef LIBDIR -override FPCOPT+=$(addprefix -Fl,$(LIBDIR)) -endif -ifdef OBJDIR -override FPCOPT+=$(addprefix -Fo,$(OBJDIR)) -endif -ifdef INCDIR -override FPCOPT+=$(addprefix -Fi,$(INCDIR)) -endif -ifdef LINKSMART -override FPCOPT+=-XX -endif -ifdef CREATESMART -override FPCOPT+=-CX -endif -ifdef DEBUG -override FPCOPT+=-gl -override FPCOPTDEF+=DEBUG -endif -ifdef RELEASE -ifneq ($(findstring 2.0.,$(FPC_VERSION)),) -ifeq ($(CPU_TARGET),i386) -FPCCPUOPT:=-OG2p3 -endif -ifeq ($(CPU_TARGET),powerpc) -FPCCPUOPT:=-O1r -endif -else -FPCCPUOPT:=-O1r -endif -override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n -override FPCOPTDEF+=RELEASE -endif -ifdef STRIP -override FPCOPT+=-Xs -endif -ifdef OPTIMIZE -override FPCOPT+=-O2 -endif -ifdef VERBOSE -override FPCOPT+=-vwni -endif -ifdef COMPILER_OPTIONS -override FPCOPT+=$(COMPILER_OPTIONS) -endif -ifdef COMPILER_UNITDIR -override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR)) -endif -ifdef COMPILER_LIBRARYDIR -override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR)) -endif -ifdef COMPILER_OBJECTDIR -override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR)) -endif -ifdef COMPILER_INCLUDEDIR -override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR)) -endif -ifdef CROSSBINDIR -override FPCOPT+=-FD$(CROSSBINDIR) -endif -ifdef COMPILER_TARGETDIR -override FPCOPT+=-FE$(COMPILER_TARGETDIR) -ifeq ($(COMPILER_TARGETDIR),.) -override TARGETDIRPREFIX= -else -override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/ -endif -endif -ifdef COMPILER_UNITTARGETDIR -override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR) -ifeq ($(COMPILER_UNITTARGETDIR),.) -override UNITTARGETDIRPREFIX= -else -override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/ -endif -else -ifdef COMPILER_TARGETDIR -override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR) -override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX) -endif -endif -ifdef CREATESHARED -override FPCOPT+=-Cg -ifeq ($(CPU_TARGET),i386) -override FPCOPT+=-Aas -endif -endif -ifdef LINKSHARED -endif -ifdef GCCLIBDIR -override FPCOPT+=-Fl$(GCCLIBDIR) -endif -ifdef OTHERLIBDIR -override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR)) -endif -ifdef OPT -override FPCOPT+=$(OPT) -endif -ifdef FPCOPTDEF -override FPCOPT+=$(addprefix -d,$(FPCOPTDEF)) -endif -ifdef CFGFILE -override FPCOPT+=@$(CFGFILE) -endif -ifdef USEENV -override FPCEXTCMD:=$(FPCOPT) -override FPCOPT:=!FPCEXTCMD -export FPCEXTCMD -endif -override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET) -override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE) -ifneq ($(AFULL_TARGET),$(AFULL_SOURCE)) -override ACROSSCOMPILE=1 -endif -ifdef ACROSSCOMPILE -override FPCOPT+=$(CROSSOPT) -endif -override COMPILER:=$(FPC) $(FPCOPT) -ifeq (,$(findstring -s ,$(COMPILER))) -EXECPPAS= -else -ifeq ($(FULL_SOURCE),$(FULL_TARGET)) -EXECPPAS:=@$(PPAS) -endif -endif -.PHONY: fpc_units -ifneq ($(TARGET_UNITS),) -override ALLTARGET+=fpc_units -override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS)) -override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS)) -override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES) -override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES) -endif -fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES) -ifdef TARGET_RSTS -override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS)) -override CLEANRSTFILES+=$(RSTFILES) -endif -.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared -$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET) - @$(ECHOREDIR) Compiled > $(FPCMADE) -fpc_all: $(FPCMADE) -fpc_smart: - $(MAKE) all LINKSMART=1 CREATESMART=1 -fpc_debug: - $(MAKE) all DEBUG=1 -fpc_release: - $(MAKE) all RELEASE=1 -.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res -$(COMPILER_UNITTARGETDIR): - $(MKDIRTREE) $(COMPILER_UNITTARGETDIR) -$(COMPILER_TARGETDIR): - $(MKDIRTREE) $(COMPILER_TARGETDIR) -%$(PPUEXT): %.pp - $(COMPILER) $< - $(EXECPPAS) -%$(PPUEXT): %.pas - $(COMPILER) $< - $(EXECPPAS) -%$(EXEEXT): %.pp - $(COMPILER) $< - $(EXECPPAS) -%$(EXEEXT): %.pas - $(COMPILER) $< - $(EXECPPAS) -%$(EXEEXT): %.lpr - $(COMPILER) $< - $(EXECPPAS) -%$(EXEEXT): %.dpr - $(COMPILER) $< - $(EXECPPAS) -%.res: %.rc - windres -i $< -o $@ -vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR) -vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR) -vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR) -vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR) -vpath %$(OEXT) $(COMPILER_UNITTARGETDIR) -vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR) -.PHONY: fpc_shared -override INSTALLTARGET+=fpc_shared_install -ifndef SHARED_LIBVERSION -SHARED_LIBVERSION=$(FPC_VERSION) -endif -ifndef SHARED_LIBNAME -SHARED_LIBNAME=$(PACKAGE_NAME) -endif -ifndef SHARED_FULLNAME -SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT) -endif -ifndef SHARED_LIBUNITS -SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS) -override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS)) -endif -fpc_shared: -ifdef HASSHAREDLIB - $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1 -ifneq ($(SHARED_BUILD),n) - $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR) -endif -else - @$(ECHO) Shared Libraries not supported -endif -fpc_shared_install: -ifneq ($(SHARED_BUILD),n) -ifneq ($(SHARED_LIBUNITS),) -ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),) - $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR) -endif -endif -endif -.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall -ifdef INSTALL_UNITS -override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS)) -endif -ifdef INSTALL_BUILDUNIT -override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES)) -endif -ifdef INSTALLPPUFILES -override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) -ifneq ($(UNITTARGETDIRPREFIX),) -override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES))) -override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES)))) -endif -override INSTALL_CREATEPACKAGEFPC=1 -endif -ifdef INSTALLEXEFILES -ifneq ($(TARGETDIRPREFIX),) -override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES))) -endif -endif -fpc_install: all $(INSTALLTARGET) -ifdef INSTALLEXEFILES - $(MKDIR) $(INSTALL_BINDIR) -ifdef UPXPROG - -$(UPXPROG) $(INSTALLEXEFILES) -endif - $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR) -endif -ifdef INSTALL_CREATEPACKAGEFPC -ifdef FPCMAKE -ifdef PACKAGE_VERSION -ifneq ($(wildcard Makefile.fpc),) - $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc - $(MKDIR) $(INSTALL_UNITDIR) - $(INSTALL) Package.fpc $(INSTALL_UNITDIR) -endif -endif -endif -endif -ifdef INSTALLPPUFILES - $(MKDIR) $(INSTALL_UNITDIR) - $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR) -ifneq ($(INSTALLPPULINKFILES),) - $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR) -endif -ifneq ($(wildcard $(LIB_FULLNAME)),) - $(MKDIR) $(INSTALL_LIBDIR) - $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR) -ifdef inUnix - ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME) -endif -endif -endif -ifdef INSTALL_FILES - $(MKDIR) $(INSTALL_DATADIR) - $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR) -endif -fpc_sourceinstall: distclean - $(MKDIR) $(INSTALL_SOURCEDIR) - $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR) -fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS)) -ifdef HASEXAMPLES - $(MKDIR) $(INSTALL_EXAMPLEDIR) -endif -ifdef EXAMPLESOURCEFILES - $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR) -endif -ifdef TARGET_EXAMPLEDIRS - $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR) -endif -.PHONY: fpc_distinstall -fpc_distinstall: install exampleinstall -.PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall -ifndef PACKDIR -ifndef inUnix -PACKDIR=$(BASEDIR)/../fpc-pack -else -PACKDIR=/tmp/fpc-pack -endif -endif -ifndef ZIPNAME -ifdef DIST_ZIPNAME -ZIPNAME=$(DIST_ZIPNAME) -else -ZIPNAME=$(PACKAGE_NAME) -endif -endif -ifndef FULLZIPNAME -FULLZIPNAME=$(ZIPCROSSPREFIX)$(ZIPPREFIX)$(ZIPNAME)$(ZIPSUFFIX) -endif -ifndef ZIPTARGET -ifdef DIST_ZIPTARGET -ZIPTARGET=DIST_ZIPTARGET -else -ZIPTARGET=install -endif -endif -ifndef USEZIP -ifdef inUnix -USETAR=1 -endif -endif -ifndef inUnix -USEZIPWRAPPER=1 -endif -ifdef USEZIPWRAPPER -ZIPPATHSEP=$(PATHSEP) -ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(SRCBATCHEXT)) -else -ZIPPATHSEP=/ -endif -ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR)) -ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR)) -ifdef USETAR -ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(TAREXT) -ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) * -else -ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(ZIPEXT) -ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) * -endif -fpc_zipinstall: - $(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1 - $(MKDIR) $(DIST_DESTDIR) - $(DEL) $(ZIPDESTFILE) -ifdef USEZIPWRAPPER -ifneq ($(ECHOREDIR),echo) - $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPER) - $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER) - $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRAPPER) -else - echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER) - echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER) - echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER) -endif -ifdef inUnix - /bin/sh $(ZIPWRAPPER) -else - $(ZIPWRAPPER) -endif - $(DEL) $(ZIPWRAPPER) -else - $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE) -endif - $(DELTREE) $(PACKDIR) -fpc_zipsourceinstall: - $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=$(ZIPSOURCESUFFIX) -fpc_zipexampleinstall: -ifdef HASEXAMPLES - $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=$(ZIPEXAMPLESUFFIX) -endif -fpc_zipdistinstall: - $(MAKE) fpc_zipinstall ZIPTARGET=distinstall -.PHONY: fpc_clean fpc_cleanall fpc_distclean -ifdef EXEFILES -override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES)) -endif -ifdef CLEAN_UNITS -override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS)) -endif -ifdef CLEANPPUFILES -override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) -ifdef DEBUGSYMEXT -override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES)) -endif -override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES)) -override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))) -endif -fpc_clean: $(CLEANTARGET) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif -ifdef CLEANPPUFILES - -$(DEL) $(CLEANPPUFILES) -endif -ifneq ($(CLEANPPULINKFILES),) - -$(DEL) $(CLEANPPULINKFILES) -endif -ifdef CLEANRSTFILES - -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES)) -endif -ifdef CLEAN_FILES - -$(DEL) $(CLEAN_FILES) -endif -ifdef LIB_NAME - -$(DEL) $(LIB_NAME) $(LIB_FULLNAME) -endif - -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE) - -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT) -fpc_cleanall: $(CLEANTARGET) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif -ifdef COMPILER_UNITTARGETDIR -ifdef CLEANPPUFILES - -$(DEL) $(CLEANPPUFILES) -endif -ifneq ($(CLEANPPULINKFILES),) - -$(DEL) $(CLEANPPULINKFILES) -endif -ifdef CLEANRSTFILES - -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES)) -endif -endif - -$(DELTREE) units - -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT) -ifneq ($(PPUEXT),.ppu) - -$(DEL) *.o *.ppu *.a -endif - -$(DELTREE) *$(SMARTEXT) - -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE) - -$(DEL) *_ppas$(BATCHEXT) -ifdef AOUTEXT - -$(DEL) *$(AOUTEXT) -endif -ifdef DEBUGSYMEXT - -$(DEL) *$(DEBUGSYMEXT) -endif -fpc_distclean: cleanall -.PHONY: fpc_baseinfo -override INFORULES+=fpc_baseinfo -fpc_baseinfo: - @$(ECHO) - @$(ECHO) == Package info == - @$(ECHO) Package Name..... $(PACKAGE_NAME) - @$(ECHO) Package Version.. $(PACKAGE_VERSION) - @$(ECHO) - @$(ECHO) == Configuration info == - @$(ECHO) - @$(ECHO) FPC.......... $(FPC) - @$(ECHO) FPC Version.. $(FPC_VERSION) - @$(ECHO) Source CPU... $(CPU_SOURCE) - @$(ECHO) Target CPU... $(CPU_TARGET) - @$(ECHO) Source OS.... $(OS_SOURCE) - @$(ECHO) Target OS.... $(OS_TARGET) - @$(ECHO) Full Source.. $(FULL_SOURCE) - @$(ECHO) Full Target.. $(FULL_TARGET) - @$(ECHO) SourceSuffix. $(SOURCESUFFIX) - @$(ECHO) TargetSuffix. $(TARGETSUFFIX) - @$(ECHO) - @$(ECHO) == Directory info == - @$(ECHO) - @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES) - @$(ECHO) - @$(ECHO) Basedir......... $(BASEDIR) - @$(ECHO) FPCDir.......... $(FPCDIR) - @$(ECHO) CrossBinDir..... $(CROSSBINDIR) - @$(ECHO) UnitsDir........ $(UNITSDIR) - @$(ECHO) PackagesDir..... $(PACKAGESDIR) - @$(ECHO) - @$(ECHO) GCC library..... $(GCCLIBDIR) - @$(ECHO) Other library... $(OTHERLIBDIR) - @$(ECHO) - @$(ECHO) == Tools info == - @$(ECHO) - @$(ECHO) As........ $(AS) - @$(ECHO) Ld........ $(LD) - @$(ECHO) Ar........ $(AR) - @$(ECHO) Rc........ $(RC) - @$(ECHO) - @$(ECHO) Mv........ $(MVPROG) - @$(ECHO) Cp........ $(CPPROG) - @$(ECHO) Rm........ $(RMPROG) - @$(ECHO) GInstall.. $(GINSTALL) - @$(ECHO) Echo...... $(ECHO) - @$(ECHO) Shell..... $(SHELL) - @$(ECHO) Date...... $(DATE) - @$(ECHO) FPCMake... $(FPCMAKE) - @$(ECHO) PPUMove... $(PPUMOVE) - @$(ECHO) Upx....... $(UPXPROG) - @$(ECHO) Zip....... $(ZIPPROG) - @$(ECHO) - @$(ECHO) == Object info == - @$(ECHO) - @$(ECHO) Target Loaders........ $(TARGET_LOADERS) - @$(ECHO) Target Units.......... $(TARGET_UNITS) - @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS) - @$(ECHO) Target Programs....... $(TARGET_PROGRAMS) - @$(ECHO) Target Dirs........... $(TARGET_DIRS) - @$(ECHO) Target Examples....... $(TARGET_EXAMPLES) - @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS) - @$(ECHO) - @$(ECHO) Clean Units......... $(CLEAN_UNITS) - @$(ECHO) Clean Files......... $(CLEAN_FILES) - @$(ECHO) - @$(ECHO) Install Units....... $(INSTALL_UNITS) - @$(ECHO) Install Files....... $(INSTALL_FILES) - @$(ECHO) - @$(ECHO) == Install info == - @$(ECHO) - @$(ECHO) DateStr.............. $(DATESTR) - @$(ECHO) ZipName.............. $(ZIPNAME) - @$(ECHO) ZipPrefix............ $(ZIPPREFIX) - @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX) - @$(ECHO) ZipSuffix............ $(ZIPSUFFIX) - @$(ECHO) FullZipName.......... $(FULLZIPNAME) - @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE) - @$(ECHO) - @$(ECHO) Install base dir..... $(INSTALL_BASEDIR) - @$(ECHO) Install binary dir... $(INSTALL_BINDIR) - @$(ECHO) Install library dir.. $(INSTALL_LIBDIR) - @$(ECHO) Install units dir.... $(INSTALL_UNITDIR) - @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR) - @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR) - @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR) - @$(ECHO) Install data dir..... $(INSTALL_DATADIR) - @$(ECHO) - @$(ECHO) Dist destination dir. $(DIST_DESTDIR) - @$(ECHO) Dist zip name........ $(DIST_ZIPNAME) - @$(ECHO) -.PHONY: fpc_info -fpc_info: $(INFORULES) -.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \ - fpc_makefile_dirs -fpc_makefile: - $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc -fpc_makefile_sub1: -ifdef TARGET_DIRS - $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS)) -endif -ifdef TARGET_EXAMPLEDIRS - $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS)) -endif -fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS)) -fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2 -fpc_makefiles: fpc_makefile fpc_makefile_dirs -ifeq ($(FULL_TARGET),i386-linux) -TARGET_DIRS_LINUX=1 -endif -ifdef TARGET_DIRS_LINUX -linux_all: - $(MAKE) -C linux all -linux_debug: - $(MAKE) -C linux debug -linux_smart: - $(MAKE) -C linux smart -linux_release: - $(MAKE) -C linux release -linux_units: - $(MAKE) -C linux units -linux_examples: - $(MAKE) -C linux examples -linux_shared: - $(MAKE) -C linux shared -linux_install: - $(MAKE) -C linux install -linux_sourceinstall: - $(MAKE) -C linux sourceinstall -linux_exampleinstall: - $(MAKE) -C linux exampleinstall -linux_distinstall: - $(MAKE) -C linux distinstall -linux_zipinstall: - $(MAKE) -C linux zipinstall -linux_zipsourceinstall: - $(MAKE) -C linux zipsourceinstall -linux_zipexampleinstall: - $(MAKE) -C linux zipexampleinstall -linux_zipdistinstall: - $(MAKE) -C linux zipdistinstall -linux_clean: - $(MAKE) -C linux clean -linux_distclean: - $(MAKE) -C linux distclean -linux_cleanall: - $(MAKE) -C linux cleanall -linux_info: - $(MAKE) -C linux info -linux_makefiles: - $(MAKE) -C linux makefiles -linux: - $(MAKE) -C linux all -.PHONY: linux_all linux_debug linux_smart linux_release linux_units linux_examples linux_shared linux_install linux_sourceinstall linux_exampleinstall linux_distinstall linux_zipinstall linux_zipsourceinstall linux_zipexampleinstall linux_zipdistinstall linux_clean linux_distclean linux_cleanall linux_info linux_makefiles linux -endif -all: fpc_all $(addsuffix _all,$(TARGET_DIRS)) -debug: fpc_debug -smart: fpc_smart -release: fpc_release -units: fpc_units $(addsuffix _units,$(TARGET_DIRS)) -examples: $(addsuffix _examples,$(TARGET_DIRS)) -shared: fpc_shared -install: fpc_install $(addsuffix _install,$(TARGET_DIRS)) -sourceinstall: fpc_sourceinstall -exampleinstall: fpc_exampleinstall $(addsuffix _exampleinstall,$(TARGET_DIRS)) -distinstall: fpc_distinstall -zipinstall: fpc_zipinstall -zipsourceinstall: fpc_zipsourceinstall -zipexampleinstall: fpc_zipexampleinstall $(addsuffix _zipexampleinstall,$(TARGET_DIRS)) -zipdistinstall: fpc_zipdistinstall -clean: fpc_clean $(addsuffix _clean,$(TARGET_DIRS)) -distclean: fpc_distclean $(addsuffix _distclean,$(TARGET_DIRS)) -cleanall: fpc_cleanall $(addsuffix _cleanall,$(TARGET_DIRS)) -info: fpc_info -makefiles: fpc_makefiles -.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles -ifneq ($(wildcard fpcmake.loc),) -include fpcmake.loc -endif -fpgui$(PPUEXT): $(wildcard *.pp *.inc) diff --git a/gfx/Makefile.fpc b/gfx/Makefile.fpc deleted file mode 100644 index 2b1ad556..00000000 --- a/gfx/Makefile.fpc +++ /dev/null @@ -1,37 +0,0 @@ -# -# Makefile.fpc for fpGFX -# - -[package] -name=fpgfx -version=0.3 - -[require] -packages=fcl-base - -[target] -units=gfxbase geldirty gelimage -rsts=gfxbase -dirs_linux=x11 -dirs_freebsd=x11 -dirs_netbsd=xx11 -dirs_win32=gdi - -[compiler] -sourcedir=emulayer -unittargetdir=units -options=-S2h - -[install] -buildunit=gfxbase -fpcpackage=y - -[default] -fpcdir=/opt/fpc/src - -[rules] -fpgfx$(PPUEXT): $(wildcard *.pas *.inc) - -[libs] -libname=libfpgfx.so -libversion=0.3 diff --git a/gfx/carbon/fpgfxpackage.lpk b/gfx/carbon/fpgfxpackage.lpk deleted file mode 100644 index d6e740f4..00000000 --- a/gfx/carbon/fpgfxpackage.lpk +++ /dev/null @@ -1,81 +0,0 @@ -<?xml version="1.0"?> -<CONFIG> - <Package Version="2"> - <Name Value="fpgfxpackage"/> - <Author Value="Graeme Geldenhuys"/> - <CompilerOptions> - <Version Value="5"/> - <SearchPaths> - <OtherUnitFiles Value="../"/> - <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> - </SearchPaths> - <CodeGeneration> - <Generate Value="Faster"/> - </CodeGeneration> - <Other> - <CompilerPath Value="$(CompPath)"/> - </Other> - </CompilerOptions> - <Description Value="Free Pascal GFX Library - [Linux] -"/> - <License Value="Modified LGPL -"/> - <Version Minor="4"/> - <Files Count="10"> - <Item1> - <Filename Value="../gfxbase.pas"/> - <UnitName Value="GfxBase"/> - </Item1> - <Item2> - <Filename Value="gfx_carbon.pas"/> - <UnitName Value="gfx_carbon"/> - </Item2> - <Item3> - <Filename Value="gfxinterface.pas"/> - <UnitName Value="gfxinterface"/> - </Item3> - <Item4> - <Filename Value="../schar16.pas"/> - <UnitName Value="schar16"/> - </Item4> - <Item5> - <Filename Value="../unitkeys.pas"/> - <UnitName Value="unitkeys"/> - </Item5> - <Item6> - <Filename Value="../fpgfx.pas"/> - <UnitName Value="fpgfx"/> - </Item6> - <Item7> - <Filename Value="../geldirty.pas"/> - <UnitName Value="GELDirty"/> - </Item7> - <Item8> - <Filename Value="../gelimage.pas"/> - <UnitName Value="GELImage"/> - </Item8> - <Item9> - <Filename Value="../commandlineparams.pas"/> - <UnitName Value="CommandLineParams"/> - </Item9> - <Item10> - <Filename Value="../fputf8utils.pas"/> - <UnitName Value="fpUTF8Utils"/> - </Item10> - </Files> - <LazDoc Paths="../../docs/xml/gfx/"/> - <RequiredPkgs Count="1"> - <Item1> - <PackageName Value="FCL"/> - <MinVersion Major="1" Valid="True"/> - </Item1> - </RequiredPkgs> - <UsageOptions> - <UnitPath Value="$(PkgOutDir)/"/> - </UsageOptions> - <PublishOptions> - <Version Value="2"/> - <IgnoreBinaries Value="False"/> - </PublishOptions> - </Package> -</CONFIG> diff --git a/gfx/carbon/fpgfxpackage.pas b/gfx/carbon/fpgfxpackage.pas deleted file mode 100644 index d0ef0da0..00000000 --- a/gfx/carbon/fpgfxpackage.pas +++ /dev/null @@ -1,15 +0,0 @@ -{ This file was automatically created by Lazarus. Do not edit! -This source is only used to compile and install the package. - } - -unit fpgfxpackage; - -interface - -uses - GfxBase, gfx_carbon, gfxinterface, schar16, unitkeys, fpgfx, GELDirty, - GELImage, CommandLineParams, fpUTF8Utils; - -implementation - -end. diff --git a/gfx/carbon/gfx_carbon.pas b/gfx/carbon/gfx_carbon.pas deleted file mode 100644 index 6d1e7bfe..00000000 --- a/gfx/carbon/gfx_carbon.pas +++ /dev/null @@ -1,513 +0,0 @@ -{ - fpGUI - Free Pascal Graphical User Interface - - GFX_Carbon - Carbon (Mac OS X) target implementation - - Copyright (C) 2006 - 2007 See the file AUTHORS, included in this - distribution, for details of the copyright. - - See the file COPYING.modifiedLGPL, included in this distribution, - for details about the copyright. - - 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. -} -unit gfx_carbon; - -{$ifdef fpc} - {$mode delphi}{$H+} -{$endif} - -interface - -uses - { Pascal RTL Units } - SysUtils, Classes, - { Carbon headers } - FPCMacOSAll, - { fpGfx units } - GfxBase; - -type - - ECarbonError = class(EGfxError); - - { TCarbonFont } - - TCarbonFont = class(TFCustomFont) - public - class function GetDefaultFontName(const AFontClass: TGfxFontClass): String; override; - constructor Create(const Descriptor: String); - destructor Destroy; override; - end; - - - { TCarbonCanvas } - - TCarbonCanvas = class(TFCustomCanvas) - private - protected - function DoExcludeClipRect(const ARect: TRect): Boolean; override; - function DoIntersectClipRect(const ARect: TRect): Boolean; override; - function DoUnionClipRect(const ARect: TRect): Boolean; override; - function DoGetClipRect: TRect; override; - procedure DoDrawArc(const ARect: TRect; StartAngle, EndAngle: Single); override; - procedure DoDrawCircle(const ARect: TRect); override; - procedure DoDrawLine(const AFrom, ATo: TPoint); override; - procedure DoDrawPoint(const APoint: TPoint); override; - procedure DoFillRect(const ARect: TRect); override; - procedure DoTextOut(const APosition: TPoint; const AText: String); override; - procedure DoCopyRect(ASource: TFCustomCanvas; const ASourceRect: TRect; const ADestPos: TPoint); override; - procedure DoMaskedCopyRect(ASource, AMask: TFCustomCanvas; const ASourceRect: TRect; const AMaskPos, ADestPos: TPoint); override; - procedure DoDrawImageRect(AImage: TFCustomBitmap; ASourceRect: TRect; const ADestPos: TPoint); override; - public - constructor Create; - destructor Destroy; override; - function MapColor(const AColor: TGfxColor): TGfxPixel; override; - function FontCellHeight: Integer; override; - function TextExtent(const AText: String): TSize; override; - procedure SaveState; override; - procedure RestoreState; override; - procedure EmptyClipRect; override; - procedure DoSetColor(AColor: TGfxPixel); override; - procedure SetFont(AFont: TFCustomFont); override; - procedure SetLineStyle(ALineStyle: TGfxLineStyle); override; - end; - - - { TCarbonWindowCanvas } - - TCarbonWindowCanvas = class(TCarbonCanvas) - public - constructor Create; - destructor Destroy; override; - end; - - { TCarbonBitmapCanvas } - - TCarbonBitmapCanvas = class(TCarbonCanvas) - public - constructor Create(AWidth, AHeight: Integer); - destructor Destroy; override; - end; - - { TCarbonBitmap } - - TCarbonBitmap = class(TFCustomBitmap) - private - IsLocked: Boolean; - public - constructor Create(AWidth, AHeight: Integer; APixelFormat: TGfxPixelFormat); override; - destructor Destroy; override; - procedure Lock(out AData: Pointer; out AStride: LongWord); override; - procedure Unlock; override; - end; - - { TCarbonScreen } - - TCarbonScreen = class(TFCustomScreen) - public - constructor Create; override; - end; - - - { TCarbonApplication } - - TCarbonApplication = class(TFCustomApplication) - private - public - { default methods } - constructor Create; override; - destructor Destroy; override; - procedure Initialize(ADisplayName: String = ''); override; - procedure Run; override; - procedure Quit; override; - end; - - { TCarbonWindow } - - TCarbonWindow = class(TFCustomWindow) - private - FHandle: WindowRef; - contentView: HIViewRef; - protected - function GetTitle: String; override; - procedure SetTitle(const ATitle: String); override; - procedure DoSetCursor; override; - function GetHandle: PtrUInt; override; - public - constructor Create(AParent: TFCustomWindow; AWindowOptions: TFWindowOptions); override; - destructor Destroy; override; - procedure DefaultHandler(var Message); override; - procedure SetPosition(const APosition: TPoint); override; - procedure SetSize(const ASize: TSize); override; - procedure SetMinMaxSize(const AMinSize, AMaxSize: TSize); override; - procedure SetClientSize(const ASize: TSize); override; - procedure SetMinMaxClientSize(const AMinSize, AMaxSize: TSize); override; - procedure Show; override; - procedure Invalidate; override; - procedure CaptureMouse; override; - procedure ReleaseMouse; override; - end; - - -implementation - -{ TCarbonFont } - -class function TCarbonFont.GetDefaultFontName(const AFontClass: TGfxFontClass): String; -begin - Result:=inherited GetDefaultFontName(AFontClass); -end; - -constructor TCarbonFont.Create(const Descriptor: String); -begin - -end; - -destructor TCarbonFont.Destroy; -begin - inherited Destroy; -end; - -{ TCarbonCanvas } - -function TCarbonCanvas.DoExcludeClipRect(const ARect: TRect): Boolean; -begin - -end; - -function TCarbonCanvas.DoIntersectClipRect(const ARect: TRect): Boolean; -begin - -end; - -function TCarbonCanvas.DoUnionClipRect(const ARect: TRect): Boolean; -begin - -end; - -function TCarbonCanvas.DoGetClipRect: TRect; -begin - -end; - -procedure TCarbonCanvas.DoDrawArc(const ARect: TRect; StartAngle, EndAngle: Single); -begin - -end; - -procedure TCarbonCanvas.DoDrawCircle(const ARect: TRect); -begin - -end; - -procedure TCarbonCanvas.DoDrawLine(const AFrom, ATo: TPoint); -begin - -end; - -procedure TCarbonCanvas.DoDrawPoint(const APoint: TPoint); -begin - -end; - -procedure TCarbonCanvas.DoFillRect(const ARect: TRect); -begin - -end; - -procedure TCarbonCanvas.DoTextOut(const APosition: TPoint; const AText: String); -begin - -end; - -procedure TCarbonCanvas.DoCopyRect(ASource: TFCustomCanvas; - const ASourceRect: TRect; const ADestPos: TPoint); -begin - -end; - -procedure TCarbonCanvas.DoMaskedCopyRect(ASource, AMask: TFCustomCanvas; - const ASourceRect: TRect; const AMaskPos, ADestPos: TPoint); -begin - -end; - -procedure TCarbonCanvas.DoDrawImageRect(AImage: TFCustomBitmap; - ASourceRect: TRect; const ADestPos: TPoint); -begin - -end; - -constructor TCarbonCanvas.Create; -begin - inherited Create; - -end; - -destructor TCarbonCanvas.Destroy; -begin - inherited Destroy; -end; - -function TCarbonCanvas.MapColor(const AColor: TGfxColor): TGfxPixel; -begin - -end; - -function TCarbonCanvas.FontCellHeight: Integer; -begin - -end; - -function TCarbonCanvas.TextExtent(const AText: String): TSize; -begin - -end; - -procedure TCarbonCanvas.SaveState; -begin - -end; - -procedure TCarbonCanvas.RestoreState; -begin - -end; - -procedure TCarbonCanvas.EmptyClipRect; -begin - -end; - -procedure TCarbonCanvas.DoSetColor(AColor: TGfxPixel); -begin - -end; - -procedure TCarbonCanvas.SetFont(AFont: TFCustomFont); -begin - -end; - -procedure TCarbonCanvas.SetLineStyle(ALineStyle: TGfxLineStyle); -begin - -end; - -{ TCarbonWindowCanvas } - -constructor TCarbonWindowCanvas.Create; -begin - -end; - -destructor TCarbonWindowCanvas.Destroy; -begin - inherited Destroy; -end; - -{ TCarbonBitmapCanvas } - -constructor TCarbonBitmapCanvas.Create(AWidth, AHeight: Integer); -begin - -end; - -destructor TCarbonBitmapCanvas.Destroy; -begin - inherited Destroy; -end; - -{ TCarbonBitmap } - -constructor TCarbonBitmap.Create(AWidth, AHeight: Integer; - APixelFormat: TGfxPixelFormat); -begin - inherited Create(AWidth, AHeight, APixelFormat); -end; - -destructor TCarbonBitmap.Destroy; -begin - inherited Destroy; -end; - -procedure TCarbonBitmap.Lock(out AData: Pointer; out AStride: LongWord); -begin - -end; - -procedure TCarbonBitmap.Unlock; -begin - -end; - -{ TCarbonScreen } - -constructor TCarbonScreen.Create; -begin - inherited Create; -end; - -{ TCarbonApplication } - -constructor TCarbonApplication.Create; -begin - inherited Create; -end; - -destructor TCarbonApplication.Destroy; -begin - inherited Destroy; -end; - -procedure TCarbonApplication.Initialize(ADisplayName: String); -begin - -end; - -procedure TCarbonApplication.Run; -begin - RunApplicationEventLoop(); -end; - -procedure TCarbonApplication.Quit; -begin - -end; - -{ TCarbonWindow } - -function WindowCommandHandler(nextHandler: EventHandlerCallRef; theEvent: EventRef; userDataPtr: UnivPtr): OSStatus; -var - status: OSStatus; - ignoreResult: OSStatus; - aCommand: HICommand; - theAssociatedControl: ControlRef; -begin - status := eventNotHandledErr; - - ignoreResult := GetEventParameter(theEvent, kEventParamDirectObject, typeHICommand, NIL, sizeof(aCommand), NIL, @aCommand); - -// if aCommand.commandID = UInt32(FourCharCode(kButtonHello)) then status := ButtonHelloPressed() -// else if aCommand.commandID = UInt32(FourCharCode(kButtonMessage)) then status := ButtonMessagePressed(); - - Result := status; -end; - -function TCarbonWindow.GetTitle: String; -begin - -end; - -procedure TCarbonWindow.SetTitle(const ATitle: String); -begin - -end; - -procedure TCarbonWindow.DoSetCursor; -begin - -end; - -function TCarbonWindow.GetHandle: PtrUInt; -begin - Result := PtrUInt(FHandle); -end; - -constructor TCarbonWindow.Create(AParent: TFCustomWindow; AWindowOptions: TFWindowOptions); -var - status, ignoreResult: OSStatus; - cmdEvent: EventTypeSpec; - eventHandler: EventHandlerUPP; - QDRect: FPCMacOSAll.Rect; -begin - QDRect.left := 50; - QDRect.Top := 50; - QDRect.right := 300; - QDRect.bottom := 300; - - status := CreateNewWindow(kDocumentWindowClass, - (kWindowStandardDocumentAttributes or kWindowStandardHandlerAttribute - or kWindowCompositingAttribute), - QDRect, FHandle); - - if (status <> noErr) or (FHandle = nil) then - begin -// DoShowMessage('Error', 'CreateNewWindow failed'); - end; - - ignoreResult := SetWindowTitleWithCFString(FHandle, CFSTRP('Carbon FPC Hello World')); - - ignoreResult := HIViewFindByID(HIViewGetRoot(FHandle), kHIViewWindowContentID, contentView); - - { Add events } - - cmdEvent.eventClass := kEventClassCommand; - cmdEvent.eventKind := kEventCommandProcess; - eventHandler := NewEventHandlerUPP(@WindowCommandHandler); - ignoreResult := InstallEventHandler(GetWindowEventTarget(FHandle), - eventHandler, 1, @cmdEvent, nil, nil); - - { Creates a canvas } - FCanvas := TCarbonCanvas.Create; -end; - -destructor TCarbonWindow.Destroy; -begin - -end; - -procedure TCarbonWindow.DefaultHandler(var Message); -begin - -end; - -procedure TCarbonWindow.SetPosition(const APosition: TPoint); -begin - -end; - -procedure TCarbonWindow.SetSize(const ASize: TSize); -begin - -end; - -procedure TCarbonWindow.SetMinMaxSize(const AMinSize, AMaxSize: TSize); -begin - -end; - -procedure TCarbonWindow.SetClientSize(const ASize: TSize); -begin - -end; - -procedure TCarbonWindow.SetMinMaxClientSize(const AMinSize, AMaxSize: TSize); -begin - -end; - -procedure TCarbonWindow.Show; -begin - ShowWindow(FHandle); -end; - -procedure TCarbonWindow.Invalidate; -begin - -end; - -procedure TCarbonWindow.CaptureMouse; -begin - -end; - -procedure TCarbonWindow.ReleaseMouse; -begin - -end; - -end. diff --git a/gfx/carbon/gfxinterface.pas b/gfx/carbon/gfxinterface.pas deleted file mode 100644 index 0a2bd181..00000000 --- a/gfx/carbon/gfxinterface.pas +++ /dev/null @@ -1,45 +0,0 @@ -{ - fpGUI - Free Pascal Graphical User Interface - - GFXInterface - Default target selection unit for X11 target - - Copyright (C) 2006 - 2007 See the file AUTHORS, 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. -} -unit gfxinterface; - -{$ifdef fpc} - {$mode objfpc}{$H+} -{$endif} - -interface - -uses - gfx_carbon; - -type - - TDefCanvas = TCarbonCanvas; - - TDefFont = TCarbonFont; - - TDefScreen = TCarbonScreen; - - TDefApplication = TCarbonApplication; - - TDefWindow = TCarbonWindow; - - TDefBitmap = TCarbonBitmap; - - -implementation - -end. - diff --git a/gfx/commandlineparams.pas b/gfx/commandlineparams.pas deleted file mode 100644 index 49e10e96..00000000 --- a/gfx/commandlineparams.pas +++ /dev/null @@ -1,439 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - CommandLineParams - Unit to handle command line processing - - Copyright (C) 2007 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. -} - -unit CommandLineParams; - -{$IFDEF Debug} - {$ASSERTIONS On} -{$ENDIF} - -{$ifdef fpc} - {$mode objfpc}{$H+} -{$endif} - -interface -uses - Classes - ; - -const - ctiCommandLineParamPrefix = '-'; - -type - - TGfxCommandLineParams = class(TObject) - private - FsParams: string; - FslParams: TStringList; - procedure ReadParams; - function WordExtract(const AInput: string; const APos: integer; const ADelims: string): string; - function WordCount(const AStrToProcess: string; ADelims: string): integer; - function WordPosition(const AN: integer; const AStr: string; ADelims: string): integer; - function ExtractChar(const AValue: string; const APos: integer): char; - function CharInStr(const AChr: char; const AStr: string): boolean; - function StripLeadingDelims(const AStrToProcess: string; ADelims: string): string; - function StripTrailingDelims(const AStrToProcess: string; ADelims: string): string; - function NumToken(const AValue, AToken: string): integer; - function Token(const AValue, AToken: string; const APos: integer): string; - function StrTran(AValue, ADel, AIns: string): string; - public - constructor Create; - destructor Destroy; override; - function IsParam(const AParam: string): boolean; overload; - function IsParam(const AParams: array of string): boolean; overload; - function GetParam(const AParam: string): string; - property Params: TStringList read FslParams; - property AsString: string read FsParams; - end; - - -// Singleton -function gCommandLineParams: TGfxCommandLineParams; - - -implementation -uses - SysUtils - ; - -var - uCommandLineParams: TGfxCommandLineParams; - -// Singleton -function gCommandLineParams: TGfxCommandLineParams; -begin - if uCommandLineParams = nil then - uCommandLineParams := TGfxCommandLineParams.Create; - result := uCommandLineParams; -end; - -{ TGfxCommandLineParams } - -constructor TGfxCommandLineParams.Create; -begin - inherited; - FslParams := TStringList.Create; - ReadParams; -end; - -destructor TGfxCommandLineParams.destroy; -begin - FslParams.Free; - inherited; -end; - -function TGfxCommandLineParams.GetParam(const AParam: string): string; -begin - result := FslParams.Values[ upperCase(AParam)]; -end; - -function TGfxCommandLineParams.IsParam(const AParam: string): boolean; -var - i: integer; -begin - result := false; - for i := 0 to FslParams.Count - 1 do begin - if FslParams.Names[i] = upperCase(AParam) then begin - result := true; - break; //==> - end; - end; -end; - -function TGfxCommandLineParams.IsParam(const AParams: array of string): boolean; -var - i: integer; -begin - result := false; - for i := Low(AParams) to High(AParams) do - if IsParam(AParams[i]) then - begin - result := true; - Exit; //==> - end; -end; - -procedure TGfxCommandLineParams.ReadParams; -var - i: integer; - j: integer; - lsNameValue: string; - lsValue: string; - lsName: string; -const - cDelim = ' '; -begin - lsValue := ''; - FsParams := ''; - j := ParamCount; - for i := 1 to j do begin - if FsParams <> '' then FsParams := FsParams + cDelim; - FsParams := FsParams + ParamStr(i); - end ; - - j := WordCount(FsParams, ctiCommandLineParamPrefix); - for i := 1 to j do begin - lsNameValue := WordExtract(FsParams, i, ctiCommandLineParamPrefix); - lsName := Token(lsNameValue, cDelim, 1); - lsValue := copy(lsNameValue, length(lsName) + 1, - length(FsParams) - length(lsValue)); - - lsValue := Trim(lsValue); - lsName := StrTran(lsName, ctiCommandLineParamPrefix, ''); - lsName := upperCase(lsName); - - FslParams.Add(lsName + '=' + lsValue); - end; -end; - -function TGfxCommandLineParams.StrTran(AValue, ADel, AIns: string): string; -var - i: integer; - sToChange: string; -begin - result := ''; - sToChange := AValue; - i := pos(ADel, sToChange); - while i <> 0 do - begin - result := result + copy(sToChange, 1, i-1) + AIns; - delete(sToChange, 1, i+length(ADel)-1); - i := pos(ADel, sToChange); - end; - result := result + sToChange; -end; - -function TGfxCommandLineParams.NumToken(const AValue, AToken: string): integer; -var - i, iCount: integer; - lsValue: string; -begin - result := 0; - if AValue = '' then - Exit; //==> - - iCount := 0; - lsValue := AValue; - i := pos(AToken, lsValue); - while i <> 0 do - begin - delete(lsValue, i, length(AToken)); - inc(iCount); - i := pos(AToken, lsValue); - end; - result := iCount + 1; -end; - -function TGfxCommandLineParams.Token(const AValue, AToken: string; - const APos: integer): string; -var - i, iCount, iNumToken: integer; - lsValue: string; -begin - result := ''; - - iNumToken := NumToken(AValue, AToken); - if APos = 1 then - begin - if pos(AToken, AValue) = 0 then - result := AValue - else - result := copy(AValue, 1, pos(AToken, AValue)-1); - end - else if (iNumToken < APos-1) or (APos<1) then - begin - result := ''; - end - else - begin - { Remove leading blocks } - iCount := 1; - lsValue := AValue; - i := pos(AToken, lsValue); - while (i<>0) and (iCount<APos) do - begin - delete(lsValue, 1, i + length(AToken) - 1); - inc(iCount); - i := pos(AToken, lsValue); - end; - - if (i=0) and (iCount=APos) then - result := lsValue - else if (i=0) and (iCount<>APos) then - result := '' - else - result := copy(lsValue, 1, i-1); - end; -end; - -function TGfxCommandLineParams.WordExtract(const AInput: string; - const APos: integer; const ADelims: string): string; -var - iStart: integer; - i: integer; - iLen: integer; -begin - result := ''; - - // Find the starting pos of the Nth word - iStart := WordPosition(APos, AInput, ADelims); - - if iStart <> 0 then - begin - i := iStart; - iLen := length(AInput); - // Build up result until we come to our next wordDelim - // while (i <= iLen) and not(S[i] in ADelims) do begin - while (i <= iLen) and not(CharInStr(ExtractChar(AInput, i), ADelims)) do - begin - result := result + ExtractChar(AInput, i); - inc(i); - end; - end; -end; - -function TGfxCommandLineParams.WordPosition(const AN: integer; - const AStr: string; ADelims: string): integer; -var - lCount: integer; - lI: Word; - lSLen: integer; -begin - lCount := 0; - lI := 1; - Result := 0; - lSLen := length(AStr); - - while (lI <= lSLen) and (lCount <> AN) do - begin - while (lI <= lSLen) and (CharInStr(ExtractChar(AStr, lI), ADelims)) do - begin - Inc(lI); - end; - - // if we're not beyond end of S, we're at the start of a word - if lI <= lSLen then - begin - Inc(lCount); - end; - - // if not finished, find the end of the current word - if lCount <> AN then - begin - while (lI <= lSLen) and not(CharInStr(ExtractChar(AStr, lI), ADelims)) do - begin - Inc(lI); - end; - end - else - begin - Result := lI; - end; - end; -end; - -function TGfxCommandLineParams.ExtractChar(const AValue: string; - const APos: integer): char; -var - lResult: string; -begin - if APos > length(AValue) then - begin - result := ' '; - exit; - end; - lResult := copy(AValue, APos, 1); - result := lResult[1]; -end; - -function TGfxCommandLineParams.StripLeadingDelims(const AStrToProcess: string; - ADelims: string): string; -var - i: integer; - lCharCurrent: char; -begin - result := AStrToProcess; - // Loop through each char in the string - for i := 1 to length(AStrToProcess) do - begin - // Extract the current character - lCharCurrent := ExtractChar(AStrToProcess, i); - - // Is this character a NON word delim?, then we have found the body of the string. - if not CharInStr(lCharCurrent, ADelims) then - begin - result := copy(AStrToProcess, i, - length(AStrToProcess) - i + 1); - exit; //==> - // The current char is a word delim, but we are at the end of the string - - // so no words - end - else - begin - if i = length(AStrToProcess) then - begin - result := ''; - end; - end; - end; -end; - -// Strip any trailing ADelims -function TGfxCommandLineParams.StripTrailingDelims(const AStrToProcess: string; - ADelims: string): string; -var - i: integer; - lCharCurrent: char; -begin - result := AStrToProcess; - // Loop through each char in the string - for i := length(AStrToProcess) downto 1 do - begin - // Extract the current character - lCharCurrent := ExtractChar(AStrToProcess, i); - - // Is this character a NON word delim?, then we have found the body of the string. - if not CharInStr(lCharCurrent, ADelims) then - begin - result := copy(AStrToProcess, 1, i); - exit; //==> - // The current char is a word delim, but we are at the beginning of the string - - // so no words - end - else - begin - if i = length(AStrToProcess) then - begin - result := ''; - end; - end; - end; -end; - -// Given a set of word delimiters, return number of words in S -function TGfxCommandLineParams.WordCount(const AStrToProcess: string; - ADelims: string): integer; -var - i: integer; - lCharLast: char; - lCharCurrent: char; - lStrToProcess: string; -begin - // Strip any leading ADelims - lStrToProcess := StripLeadingDelims(AStrToProcess, ADelims); - lStrToProcess := StripTrailingDelims(lStrToProcess, ADelims); - - // If lStrToProcess is empty, then there are no words - if lStrToProcess = '' then - begin - result := 0; - Exit; //==> - end; - - // lStrToProcess is not empty, therefore there must be at least one word - // Every wordDelim we find equals another word: - // 0 word delim := 1 word - // 1 word delim := 2 words... - result := 1; - - // lCharLast is used to check for more than 1 wordDelim together - lCharLast := #0; - - for i := 1 to length(lStrToProcess) do - begin - lCharCurrent := ExtractChar(lStrToProcess, i); - if CharInStr(lCharCurrent, ADelims) and not(CharInStr(lCharLast, ADelims)) then - begin - inc(result); - end; - lCharLast := lCharCurrent; - end; -end; - -// Is AChr in the string AStr ? -function TGfxCommandLineParams.CharInStr(const AChr: char; const AStr: string): boolean; -begin - result := pos(AChr, AStr) <> 0; -end; - - -initialization - -finalization - uCommandLineParams.Free; - -end. - diff --git a/gfx/fpgfx.pas b/gfx/fpgfx.pas deleted file mode 100644 index 2ad60511..00000000 --- a/gfx/fpgfx.pas +++ /dev/null @@ -1,100 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - fpGFX - Main unit for the core drawing engine of fpGUI - - Copyright (C) 2006 - 2007 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. -} -unit fpgfx; - -{$ifdef fpc} - {$mode objfpc}{$H+} -{$endif} - -interface - -uses - Classes, SysUtils, - gfxinterface; - -type - - { TFFont } - - TFFont = class(TDefFont) - end; - - { TFCanvas } - - TFCanvas = class(TDefCanvas) - end; - - { TFBitmap } - - TFBitmap = class(TDefBitmap) - end; - - { TFScreen } - - TFScreen = class(TDefScreen) - end; - - { TFWindow } - - TFWindow = class(TDefWindow) - end; - - { TFApplication } - - TFApplication = class(TDefApplication) - public -// procedure CreateForm(InstanceClass: TComponentClass; var Reference); - end; - -{ Using the singleton pattern to hide instance variables and - only instantiate them when they are referred to for the first time. } -function GFScreen: TFScreen; -function GFApplication: TFApplication; - - -implementation - - -var - uScreen: TFScreen; - uApplication: TFApplication; - - -function GFScreen: TFScreen; -begin - if uScreen = nil then - uScreen := TFScreen.Create; - result := uScreen; -end; - -function GFApplication: TFApplication; -begin - if uApplication = nil then - uApplication := TFApplication.Create; - result := uApplication; -end; - - -initialization - uScreen := nil; - uApplication := nil; - -finalization - uApplication.Free; - uScreen.Free; - -end. - diff --git a/gfx/fputf8utils.pas b/gfx/fputf8utils.pas deleted file mode 100644 index f04c4212..00000000 --- a/gfx/fputf8utils.pas +++ /dev/null @@ -1,132 +0,0 @@ -{ - Some handly UTF8 function copied from the Lazarus LCL. Surely we can move - this into FPC? -} -unit fpUTF8Utils; - -{$ifdef FPC} - {$mode objfpc}{$H+} -{$endif} - -interface - -uses - Classes, SysUtils; - - -function UTF8Pos(const SearchForText, SearchInText: string): integer; -function UTF8Copy(const s: string; StartCharIndex, CharCount: integer): string; -function UTF8Length(const s: string): integer; -function UTF8Length(p: PChar; ByteCount: integer): integer; -function UTF8CharStart(UTF8Str: PChar; Len, Index: integer): PChar; -function UTF8CharacterLength(p: PChar): integer; - - -implementation - -function UTF8Pos(const SearchForText, SearchInText: string): integer; -// returns the character index, where the SearchForText starts in SearchInText -var - p: LongInt; -begin - p:=System.Pos(SearchForText,SearchInText); - if p>0 then - Result:=UTF8Length(PChar(SearchInText),p-1)+1 - else - Result:=0; -end; - -function UTF8Copy(const s: string; StartCharIndex, CharCount: integer): string; -// returns substring -var - StartBytePos: PChar; - EndBytePos: PChar; - MaxBytes: PtrInt; -begin - StartBytePos:=UTF8CharStart(PChar(s),length(s),StartCharIndex-1); - if StartBytePos=nil then - Result:='' - else begin - MaxBytes:=PtrInt(PChar(s)+length(s)-StartBytePos); - EndBytePos:=UTF8CharStart(StartBytePos,MaxBytes,CharCount); - if EndBytePos=nil then - Result:=copy(s,StartBytePos-PChar(s)+1,MaxBytes) - else - Result:=copy(s,StartBytePos-PChar(s)+1,EndBytePos-StartBytePos); - end; -end; - -function UTF8Length(const s: string): integer; -begin - Result := UTF8Length(PChar(s),length(s)); -end; - -function UTF8Length(p: PChar; ByteCount: integer): integer; -var - CharLen: LongInt; -begin - Result:=0; - while (ByteCount>0) do begin - inc(Result); - CharLen:=UTF8CharacterLength(p); - inc(p,CharLen); - dec(ByteCount,CharLen); - end; -end; - -function UTF8CharStart(UTF8Str: PChar; Len, Index: integer): PChar; -var - CharLen: LongInt; -begin - Result:=UTF8Str; - if Result<>nil then begin - while (Index>0) and (Len>0) do begin - CharLen:=UTF8CharacterLength(Result); - dec(Len,CharLen); - dec(Index); - inc(Result,CharLen); - end; - if (Index>0) or (Len<0) then - Result:=nil; - end; -end; - -function UTF8CharacterLength(p: PChar): integer; -begin - if p<>nil then begin - if ord(p^)<%11000000 then begin - // regular single byte character (#0 is a character, this is pascal ;) - Result:=1; - end - else if ((ord(p^) and %11100000) = %11000000) then begin - // could be 2 byte character - if (ord(p[1]) and %11000000) = %10000000 then - Result:=2 - else - Result:=1; - end - else if ((ord(p^) and %11110000) = %11100000) then begin - // could be 3 byte character - if ((ord(p[1]) and %11000000) = %10000000) - and ((ord(p[2]) and %11000000) = %10000000) then - Result:=3 - else - Result:=1; - end - else if ((ord(p^) and %11111000) = %11110000) then begin - // could be 4 byte character - if ((ord(p[1]) and %11000000) = %10000000) - and ((ord(p[2]) and %11000000) = %10000000) - and ((ord(p[3]) and %11000000) = %10000000) then - Result:=4 - else - Result:=1; - end - else - Result:=1 - end else - Result:=0; -end; - -end. - diff --git a/gfx/gdi/Makefile b/gfx/gdi/Makefile deleted file mode 100644 index 753cac82..00000000 --- a/gfx/gdi/Makefile +++ /dev/null @@ -1,1249 +0,0 @@ -# -# Makefile generated by fpcmake v1.00 [2000/12/14] -# - -defaultrule: all - -##################################################################### -# Autodetect OS (Linux or Dos or Windows NT) -# define inUnix when running under Unix (Linux,FreeBSD) -# define inWinNT when running under WinNT -##################################################################### - -# We need only / in the path -override PATH:=$(subst \,/,$(PATH)) - -# Search for PWD and determine also if we are under linux -PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH))))) -ifeq ($(PWD),) -PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH))))) -ifeq ($(PWD),) -nopwd: - @echo You need the GNU utils package to use this Makefile! - @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip - @exit -else -inUnix=1 -endif -else -PWD:=$(firstword $(PWD)) -endif - -# Detect NT - NT sets OS to Windows_NT -# Detect OS/2 - OS/2 has OS2_SHELL defined -ifndef inUnix -ifeq ($(OS),Windows_NT) -inWinNT=1 -else -ifdef OS2_SHELL -inOS2=1 -endif -endif -endif - -# The extension of executables -ifdef inUnix -SRCEXEEXT= -else -SRCEXEEXT=.exe -endif - -# The path which is searched separated by spaces -ifdef inUnix -SEARCHPATH=$(subst :, ,$(PATH)) -else -SEARCHPATH=$(subst ;, ,$(PATH)) -endif - -# Base dir -ifdef PWD -BASEDIR:=$(shell $(PWD)) -else -BASEDIR=. -endif - -##################################################################### -# FPC version/target Detection -##################################################################### - -# What compiler to use ? -ifndef FPC -# Compatibility with old makefiles -ifdef PP -FPC=$(PP) -else -FPC=ppc386 -endif -endif -override FPC:=$(subst $(SRCEXEEXT),,$(FPC)) -override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT) - -# Target OS -ifndef OS_TARGET -OS_TARGET:=$(shell $(FPC) -iTO) -endif - -# Source OS -ifndef OS_SOURCE -OS_SOURCE:=$(shell $(FPC) -iSO) -endif - -# Target CPU -ifndef CPU_TARGET -CPU_TARGET:=$(shell $(FPC) -iTP) -endif - -# Source CPU -ifndef CPU_SOURCE -CPU_SOURCE:=$(shell $(FPC) -iSP) -endif - -# FPC version -ifndef FPC_VERSION -FPC_VERSION:=$(shell $(FPC) -iV) -endif - -export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION FPCOPT - -##################################################################### -# FPCDIR Setting -##################################################################### - -# Test FPCDIR to look if the RTL dir exists -ifdef FPCDIR -override FPCDIR:=$(subst \,/,$(FPCDIR)) -ifeq ($(wildcard $(FPCDIR)/rtl),) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=wrong -endif -endif -else -override FPCDIR=wrong -endif - -# Default FPCDIR -ifeq ($(FPCDIR),wrong) -override FPCDIR=../../../.. -ifeq ($(wildcard $(FPCDIR)/rtl),) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=wrong -endif -endif -endif - -# Detect FPCDIR -ifeq ($(FPCDIR),wrong) -ifdef inUnix -override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=/usr/lib/fpc/$(FPC_VERSION) -endif -else -override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH)))))) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(FPCDIR)/rtl),) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(FPCDIR)/rtl),) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=c:/pp -endif -endif -endif -endif -endif -endif - -ifndef PACKAGESDIR -PACKAGESDIR=$(FPCDIR)/packages -endif -ifndef TOOLKITSDIR -TOOLKITSDIR= -endif -ifndef COMPONENTSDIR -COMPONENTSDIR= -endif - -# Create units dir -ifneq ($(FPCDIR),.) -UNITSDIR=$(FPCDIR)/units/$(OS_TARGET) -endif - -##################################################################### -# User Settings -##################################################################### - - -# Targets - -override UNITOBJECTS+=gfx_gdi gfximpl -override RSTOBJECTS+=gfx_gdi - -# Clean - - -# Install - -ZIPTARGET=install - -# Defaults - -override NEEDOPT=-S2ht - -# Directories - -override NEEDUNITDIR=.. - -# Packages - -override PACKAGES+=rtl - -# Libraries - -LIBNAME=fpgfx_gdi - -# Info - -INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall - -##################################################################### -# Shell tools -##################################################################### - -# echo -ifndef ECHO -ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=echo -ECHOE:=echo -else -ECHO:=$(firstword $(ECHO)) -ECHOE=$(ECHO) -E -endif -else -ECHO:=$(firstword $(ECHO)) -ECHOE=$(ECHO) -E -endif -endif - -# To copy pograms -ifndef COPY -COPY:=cp -fp -endif - -# Copy a whole tree -ifndef COPYTREE -COPYTREE:=cp -rfp -endif - -# To move pograms -ifndef MOVE -MOVE:=mv -f -endif - -# Check delete program -ifndef DEL -DEL:=rm -f -endif - -# Check deltree program -ifndef DELTREE -DELTREE:=rm -rf -endif - -# To install files -ifndef INSTALL -ifdef inUnix -INSTALL:=install -c -m 644 -else -INSTALL:=$(COPY) -endif -endif - -# To install programs -ifndef INSTALLEXE -ifdef inUnix -INSTALLEXE:=install -c -m 755 -else -INSTALLEXE:=$(COPY) -endif -endif - -# To make a directory. -ifndef MKDIR -ifdef inUnix -MKDIR:=install -m 755 -d -else -MKDIR:=ginstall -m 755 -d -endif -endif - -export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR - -##################################################################### -# Default Tools -##################################################################### - -# assembler, redefine it if cross compiling -ifndef AS -AS=as -endif - -# linker, but probably not used -ifndef LD -LD=ld -endif - -# ppas.bat / ppas.sh -ifdef inUnix -PPAS=ppas.sh -else -ifdef inOS2 -PPAS=ppas.cmd -else -PPAS=ppas.bat -endif -endif - -# ldconfig to rebuild .so cache -ifdef inUnix -LDCONFIG=ldconfig -else -LDCONFIG= -endif - -# ppumove -ifndef PPUMOVE -PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(PPUMOVE),) -PPUMOVE= -else -PPUMOVE:=$(firstword $(PPUMOVE)) -endif -endif -export PPUMOVE - -# ppufiles -ifndef PPUFILES -PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(PPUFILES),) -PPUFILES= -else -PPUFILES:=$(firstword $(PPUFILES)) -endif -endif -export PPUFILES - -# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase -# upx uses that one itself (PFV) -ifndef UPXPROG -ifeq ($(OS_TARGET),go32v2) -UPXPROG:=1 -endif -ifeq ($(OS_TARGET),win32) -UPXPROG:=1 -endif -ifdef UPXPROG -UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(UPXPROG),) -UPXPROG= -else -UPXPROG:=$(firstword $(UPXPROG)) -endif -else -UPXPROG= -endif -endif -export UPXPROG - -# ZipProg, you can't use Zip as the var name (PFV) -ifndef ZIPPROG -ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ZIPPROG),) -ZIPPROG= -else -ZIPPROG:=$(firstword $(ZIPPROG)) -endif -endif -export ZIPPROG - -ZIPOPT=-9 -ZIPEXT=.zip - -# Tar -ifndef TARPROG -TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(TARPROG),) -TARPROG= -else -TARPROG:=$(firstword $(TARPROG)) -endif -endif -export TARPROG - -ifeq ($(USETAR),bz2) -TAROPT=vI -TAREXT=.tar.bz2 -else -TAROPT=vz -TAREXT=.tar.gz -endif - -##################################################################### -# Default extensions -##################################################################### - -# Default needed extensions (Go32v2,Linux) -LOADEREXT=.as -EXEEXT=.exe -PPLEXT=.ppl -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.so -RSTEXT=.rst -FPCMADE=fpcmade - -# Go32v1 -ifeq ($(OS_TARGET),go32v1) -PPUEXT=.pp1 -OEXT=.o1 -ASMEXT=.s1 -SMARTEXT=.sl1 -STATICLIBEXT=.a1 -SHAREDLIBEXT=.so1 -FPCMADE=fpcmade.v1 -endif - -# Go32v2 -ifeq ($(OS_TARGET),go32v2) -FPCMADE=fpcmade.dos -endif - -# Linux -ifeq ($(OS_TARGET),linux) -EXEEXT= -HASSHAREDLIB=1 -FPCMADE=fpcmade.lnx -endif - -# Linux -ifeq ($(OS_TARGET),freebsd) -EXEEXT= -HASSHAREDLIB=1 -FPCMADE=fpcmade.freebsd -endif - -# Win32 -ifeq ($(OS_TARGET),win32) -PPUEXT=.ppw -OEXT=.ow -ASMEXT=.sw -SMARTEXT=.slw -STATICLIBEXT=.aw -SHAREDLIBEXT=.dll -FPCMADE=fpcmade.w32 -endif - -# OS/2 -ifeq ($(OS_TARGET),os2) -PPUEXT=.ppo -ASMEXT=.so2 -OEXT=.oo2 -SMARTEXT=.so -STATICLIBEXT=.ao2 -SHAREDLIBEXT=.dll -FPCMADE=fpcmade.os2 -endif - -# library prefix -LIBPREFIX=lib -ifeq ($(OS_TARGET),go32v2) -LIBPREFIX= -endif -ifeq ($(OS_TARGET),go32v1) -LIBPREFIX= -endif - -# determine which .pas extension is used -ifndef PASEXT -ifdef EXEOBJECTS -override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS))))) -else -override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS))))) -endif -ifeq ($(TESTPAS),) -PASEXT=.pp -else -PASEXT=.pas -endif -endif - - -# Check if the dirs really exists, else turn it off -ifeq ($(wildcard $(UNITSDIR)),) -UNITSDIR= -endif -ifeq ($(wildcard $(TOOLKITSDIR)),) -TOOLKITSDIR= -endif -ifeq ($(wildcard $(PACKAGESDIR)),) -PACKAGESDIR= -endif -ifeq ($(wildcard $(COMPONENTSDIR)),) -COMPONENTSDIR= -endif - - -# PACKAGESDIR packages - -PACKAGERTL=1 - -ifdef PACKAGERTL -ifneq ($(wildcard $(FPCDIR)/rtl),) -ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),) -PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET) -else -PACKAGEDIR_RTL=$(FPCDIR)/rtl -endif -ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),) -override COMPILEPACKAGES+=package_rtl -package_rtl: - $(MAKE) -C $(PACKAGEDIR_RTL) all -endif -UNITDIR_RTL=$(PACKAGEDIR_RTL) -else -PACKAGEDIR_RTL= -ifneq ($(wildcard $(UNITSDIR)/rtl),) -ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),) -UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET) -else -UNITDIR_RTL=$(UNITSDIR)/rtl -endif -else -UNITDIR_RTL= -endif -endif -ifdef UNITDIR_RTL -override NEEDUNITDIR+=$(UNITDIR_RTL) -endif -endif - - -##################################################################### -# Default Directories -##################################################################### - -# Linux and freebsd use unix dirs with /usr/bin, /usr/lib -# When zipping use the target as default, when normal install then -# use the source os as default -ifdef ZIPNAME -# Zipinstall -ifeq ($(OS_TARGET),linux) -UNIXINSTALLDIR=1 -endif -ifeq ($(OS_TARGET),freebsd) -UNIXINSTALLDIR=1 -endif -else -# Normal install -ifeq ($(OS_SOURCE),linux) -UNIXINSTALLDIR=1 -endif -ifeq ($(OS_SOURCE),freebsd) -UNIXINSTALLDIR=1 -endif -endif - -# set the prefix directory where to install everything -ifndef PREFIXINSTALLDIR -ifdef UNIXINSTALLDIR -PREFIXINSTALLDIR=/usr -else -PREFIXINSTALLDIR=/pp -endif -endif -export PREFIXINSTALLDIR - -# Where to place the resulting zip files -ifndef DESTZIPDIR -DESTZIPDIR:=$(BASEDIR) -endif -export DESTZIPDIR - -##################################################################### -# Install Directories -##################################################################### - -# set the base directory where to install everything -ifndef BASEINSTALLDIR -ifdef UNIXINSTALLDIR -BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION) -else -BASEINSTALLDIR=$(PREFIXINSTALLDIR) -endif -endif - -# set the directory where to install the binaries -ifndef BININSTALLDIR -ifdef UNIXINSTALLDIR -BININSTALLDIR=$(PREFIXINSTALLDIR)/bin -else -BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET) -endif -endif - -# set the directory where to install the units. -ifndef UNITINSTALLDIR -UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET) -ifdef UNITSUBDIR -UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR) -endif -endif - -# Where to install shared libraries -ifndef LIBINSTALLDIR -ifdef UNIXINSTALLDIR -LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib -else -LIBINSTALLDIR=$(UNITINSTALLDIR) -endif -endif - -# Where the source files will be stored -ifndef SOURCEINSTALLDIR -ifdef UNIXINSTALLDIR -SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION) -else -SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source -endif -ifdef SOURCESUBDIR -SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR) -endif -endif - -# Where the doc files will be stored -ifndef DOCINSTALLDIR -ifdef UNIXINSTALLDIR -DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION) -else -DOCINSTALLDIR=$(BASEINSTALLDIR)/doc -endif -endif - -# Where to install the examples, under linux we use the doc dir -# because the copytree command will create a subdir itself -ifndef EXAMPLEINSTALLDIR -ifdef UNIXINSTALLDIR -EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples -else -EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples -endif -ifdef EXAMPLESUBDIR -EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR) -endif -endif - -# Where the some extra (data)files will be stored -ifndef DATAINSTALLDIR -DATAINSTALLDIR=$(BASEINSTALLDIR) -endif - -##################################################################### -# Redirection -##################################################################### - -ifndef REDIRFILE -REDIRFILE=log -endif - -ifdef REDIR -ifndef inUnix -override FPC=redir -eo $(FPC) -endif -# set the verbosity to max -override FPCOPT+=-va -override REDIR:= >> $(REDIRFILE) -endif - - -##################################################################### -# Compiler Command Line -##################################################################### - -# Load commandline OPTDEF and add FPC_CPU define -override FPCOPTDEF:=-d$(CPU_TARGET) - -# Load commandline OPT and add target and unit dir to be sure -ifneq ($(OS_TARGET),$(OS_SOURCE)) -override FPCOPT+=-T$(OS_TARGET) -endif - -# User dirs should be first, so they are looked at first -ifdef UNITDIR -override FPCOPT+=$(addprefix -Fu,$(UNITDIR)) -endif -ifdef LIBDIR -override FPCOPT+=$(addprefix -Fl,$(LIBDIR)) -endif -ifdef OBJDIR -override FPCOPT+=$(addprefix -Fo,$(OBJDIR)) -endif -ifdef INCDIR -override FPCOPT+=$(addprefix -Fi,$(INCDIR)) -endif - -# Smartlinking -ifdef LINKSMART -override FPCOPT+=-XX -endif - -# Smartlinking creation -ifdef CREATESMART -override FPCOPT+=-CX -endif - -# Debug -ifdef DEBUG -override FPCOPT+=-gl -dDEBUG -endif - -# Release mode (strip, optimize and don't load ppc386.cfg) -# 0.99.12b has a bug in the optimizer so don't use it by default -ifdef RELEASE -ifeq ($(FPC_VERSION),0.99.12) -override FPCOPT+=-Xs -OGp3 -n -else -override FPCOPT+=-Xs -OG2p3 -n -endif -endif - -# Strip -ifdef STRIP -override FPCOPT+=-Xs -endif - -# Optimizer -ifdef OPTIMIZE -override FPCOPT+=-OG2p3 -endif - -# Verbose settings (warning,note,info) -ifdef VERBOSE -override FPCOPT+=-vwni -endif - -ifdef NEEDOPT -override FPCOPT+=$(NEEDOPT) -endif - -ifdef NEEDUNITDIR -override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR)) -endif - -ifdef UNITSDIR -override FPCOPT+=-Fu$(UNITSDIR) -endif - -# Target dirs and the prefix to use for clean/install -ifdef TARGETDIR -override FPCOPT+=-FE$(TARGETDIR) -ifeq ($(TARGETDIR),.) -override TARGETDIRPREFIX= -else -override TARGETDIRPREFIX=$(TARGETDIR)/ -endif -endif -ifdef UNITTARGETDIR -override FPCOPT+=-FU$(UNITTARGETDIR) -ifeq ($(UNITTARGETDIR),.) -override UNITTARGETDIRPREFIX= -else -override UNITTARGETDIRPREFIX=$(TARGETDIR)/ -endif -else -ifdef TARGETDIR -override UNITTARGETDIR=$(TARGETDIR) -override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX) -endif -endif - -# Add commandline options last so they can override -ifdef OPT -override FPCOPT+=$(OPT) -endif - -# Add defines from FPCOPTDEF to FPCOPT -ifdef FPCOPTDEF -override FPCOPT+=$(FPCOPTDEF) -endif - -# Error file ? -ifdef ERRORFILE -override FPCOPT+=-Fr$(ERRORFILE) -endif - -# Was a config file specified ? -ifdef CFGFILE -override FPCOPT+=@$(CFGFILE) -endif - -# For win32 the options are passed using the environment FPCEXTCMD -ifeq ($(OS_SOURCE),win32) -override FPCEXTCMD:=$(FPCOPT) -override FPCOPT:=!FPCEXTCMD -export FPCEXTCMD -endif - -# Compiler commandline -override COMPILER:=$(FPC) $(FPCOPT) - -# also call ppas if with command option -s -# but only if the OS_SOURCE and OS_TARGE are equal -ifeq (,$(findstring -s ,$(COMPILER))) -EXECPPAS= -else -ifeq ($(OS_SOURCE),$(OS_TARGET)) -EXECPPAS:=@$(PPAS) -endif -endif - -##################################################################### -# Standard rules -##################################################################### - -all: fpc_all - -debug: fpc_debug - -smart: fpc_smart - -shared: fpc_shared - -showinstall: fpc_showinstall - -install: fpc_install - -sourceinstall: fpc_sourceinstall - -exampleinstall: fpc_exampleinstall - -zipinstall: fpc_zipinstall - -zipsourceinstall: fpc_zipsourceinstall - -zipexampleinstall: fpc_zipexampleinstall - -clean: fpc_clean - -distclean: fpc_distclean - -cleanall: fpc_cleanall - -info: fpc_info - -.PHONY: all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info - -##################################################################### -# Units -##################################################################### - -.PHONY: fpc_units - -override ALLTARGET+=fpc_units - -override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS)) -override INSTALLPPUFILES+=$(UNITPPUFILES) -override CLEANPPUFILES+=$(UNITPPUFILES) - -fpc_units: $(UNITPPUFILES) - -##################################################################### -# Resource strings -##################################################################### - -ifdef RSTOBJECTS -override RSTFILES=$(addsuffix $(RSTEXT),$(RSTOBJECTS)) - -override CLEANRSTFILES+=$(RSTFILES) -endif - -##################################################################### -# General compile rules -##################################################################### - -.PHONY: fpc_packages fpc_all fpc_debug - -$(FPCMADE): $(ALLTARGET) - @$(ECHO) Compiled > $(FPCMADE) - -fpc_packages: $(COMPILEPACKAGES) - -fpc_all: fpc_packages $(FPCMADE) - -fpc_debug: - $(MAKE) all DEBUG=1 - -# Search paths for .ppu if targetdir is set -ifdef UNITTARGETDIR -vpath %$(PPUEXT) $(UNITTARGETDIR) -endif - -# General compile rules, available for both possible PASEXT - -.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp - -%$(PPUEXT): %.pp - $(COMPILER) $< $(REDIR) - $(EXECPPAS) - -%$(PPUEXT): %.pas - $(COMPILER) $< $(REDIR) - $(EXECPPAS) - -%$(EXEEXT): %.pp - $(COMPILER) $< $(REDIR) - $(EXECPPAS) - -%$(EXEEXT): %.pas - $(COMPILER) $< $(REDIR) - $(EXECPPAS) - -##################################################################### -# Library -##################################################################### - -.PHONY: fpc_smart fpc_shared - -ifdef LIBVERSION -LIBFULLNAME=$(LIBNAME).$(LIBVERSION) -else -LIBFULLNAME=$(LIBNAME) -endif - -# Default sharedlib units are all unit objects -ifndef SHAREDLIBUNITOBJECTS -SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS) -endif - -fpc_smart: - $(MAKE) all LINKSMART=1 CREATESMART=1 - -fpc_shared: all -ifdef HASSHAREDLIB -ifndef LIBNAME - @$(ECHO) "LIBNAME not set" -else - $(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME) -endif -else - @$(ECHO) "Shared Libraries not supported" -endif - -##################################################################### -# Install rules -##################################################################### - -.PHONY: fpc_showinstall fpc_install - -ifdef EXTRAINSTALLUNITS -override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS)) -endif - -ifdef INSTALLPPUFILES -override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES)) -ifdef PPUFILES -INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)) -else -INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))) -endif -override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES)) -endif - -ifdef INSTALLEXEFILES -override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES)) -endif - -fpc_showinstall: $(SHOWINSTALLTARGET) -ifdef INSTALLEXEFILES - @$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES)) -endif -ifdef INSTALLPPUFILES - @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES)) -ifneq ($(INSTALLPPULINKFILES),) - @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES)) -endif -ifneq ($(wildcard $(LIBFULLNAME)),) - @$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME) -ifdef HASSHAREDLIB - @$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME) -endif -endif -endif -ifdef EXTRAINSTALLFILES - @$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES)) -endif - -fpc_install: $(INSTALLTARGET) -# Create UnitInstallFiles -ifdef INSTALLEXEFILES - $(MKDIR) $(BININSTALLDIR) -# Compress the exes if upx is defined -ifdef UPXPROG - -$(UPXPROG) $(INSTALLEXEFILES) -endif - $(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR) -endif -ifdef INSTALLPPUFILES - $(MKDIR) $(UNITINSTALLDIR) - $(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR) -ifneq ($(INSTALLPPULINKFILES),) - $(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR) -endif -ifneq ($(wildcard $(LIBFULLNAME)),) - $(MKDIR) $(LIBINSTALLDIR) - $(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR) -ifdef inUnix - ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME) -endif -endif -endif -ifdef EXTRAINSTALLFILES - $(MKDIR) $(DATAINSTALLDIR) - $(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR) -endif - -##################################################################### -# SourceInstall rules -##################################################################### - -.PHONY: fpc_sourceinstall - -ifndef SOURCETOPDIR -SOURCETOPDIR=$(BASEDIR) -endif - -fpc_sourceinstall: clean - $(MKDIR) $(SOURCEINSTALLDIR) - $(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR) - -##################################################################### -# exampleinstall rules -##################################################################### - -.PHONY: fpc_exampleinstall - -fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS)) -ifdef EXAMPLESOURCEFILES - $(MKDIR) $(EXAMPLEINSTALLDIR) - $(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR) -endif -ifdef EXAMPLEDIROBJECTS -ifndef EXAMPLESOURCEFILES - $(MKDIR) $(EXAMPLEINSTALLDIR) -endif - $(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR) -endif - -##################################################################### -# Zip -##################################################################### - -.PHONY: fpc_zipinstall - -# Create suffix to add -ifndef PACKAGESUFFIX -PACKAGESUFFIX=$(OS_TARGET) -ifeq ($(OS_TARGET),go32v2) -PACKAGESUFFIX=go32 -endif -ifeq ($(OS_TARGET),win32) -PACKAGESUFFIX=w32 -endif -endif - -# Temporary path to pack a file -ifndef PACKDIR -ifndef inUnix -PACKDIR=$(BASEDIR)/pack_tmp -else -PACKDIR=/tmp/fpc-pack -endif -endif - -# Maybe create default zipname from packagename -ifndef ZIPNAME -ifdef PACKAGENAME -ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX) -endif -endif - -# Use tar by default under linux -ifndef USEZIP -ifdef inUnix -USETAR=1 -endif -endif - -fpc_zipinstall: -ifndef ZIPNAME - @$(ECHO) "Please specify ZIPNAME!" - @exit 1 -else - $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR) -ifdef USETAR - $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) - cd $(PACKDIR) ; $(TARPROG) cf$(TAROPT) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR) -else - $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) - cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR) -endif - $(DELTREE) $(PACKDIR) -endif - -.PHONY: fpc_zipsourceinstall - -fpc_zipsourceinstall: - $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src - -.PHONY: fpc_zipexampleinstall - -fpc_zipexampleinstall: - $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm - -##################################################################### -# Clean rules -##################################################################### - -.PHONY: fpc_clean fpc_cleanall fpc_distclean - -ifdef EXEFILES -override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES)) -endif - -ifdef EXTRACLEANUNITS -override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS)) -endif - -ifdef CLEANPPUFILES -override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES)) -# Get the .o and .a files created for the units -ifdef PPUFILES -CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES)) -else -CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))) -endif -override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)) -endif - -fpc_clean: $(CLEANTARGET) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif -ifdef CLEANPPUFILES - -$(DEL) $(CLEANPPUFILES) -endif -ifneq ($(CLEANPPULINKFILES),) - -$(DEL) $(CLEANPPULINKFILES) -endif -ifdef CLEANRSTFILES - -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES)) -endif -ifdef EXTRACLEANFILES - -$(DEL) $(EXTRACLEANFILES) -endif -ifdef LIBNAME - -$(DEL) $(LIBNAME) $(LIBFULLNAME) -endif - -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE) - -fpc_distclean: fpc_clean - -# Also run clean first if targetdir is set. Unittargetdir is always -# set if targetdir or unittargetdir is specified -ifdef UNITTARGETDIR -TARGETDIRCLEAN=fpc_clean -endif - -fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif - -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT) - -$(DELTREE) *$(SMARTEXT) - -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE) - -##################################################################### -# Info rules -##################################################################### - -.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \ - fpc_dirinfo - -fpc_info: $(INFOTARGET) - -fpc_infocfg: - @$(ECHO) - @$(ECHO) == Configuration info == - @$(ECHO) - @$(ECHO) FPC....... $(FPC) - @$(ECHO) Version... $(FPC_VERSION) - @$(ECHO) CPU....... $(CPU_TARGET) - @$(ECHO) Source.... $(OS_SOURCE) - @$(ECHO) Target.... $(OS_TARGET) - @$(ECHO) - -fpc_infoobjects: - @$(ECHO) - @$(ECHO) == Object info == - @$(ECHO) - @$(ECHO) LoaderObjects..... $(LOADEROBJECTS) - @$(ECHO) UnitObjects....... $(UNITOBJECTS) - @$(ECHO) ExeObjects........ $(EXEOBJECTS) - @$(ECHO) - @$(ECHO) ExtraCleanUnits... $(EXTRACLEANUNITS) - @$(ECHO) ExtraCleanFiles... $(EXTRACLEANFILES) - @$(ECHO) - @$(ECHO) ExtraInstallUnits. $(EXTRAINSTALLUNITS) - @$(ECHO) ExtraInstallFiles. $(EXTRAINSTALLFILES) - @$(ECHO) - -fpc_infoinstall: - @$(ECHO) - @$(ECHO) == Install info == - @$(ECHO) -ifdef DATE - @$(ECHO) DateStr.............. $(DATESTR) -endif -ifdef PACKAGEPREFIX - @$(ECHO) PackagePrefix........ $(PACKAGEPREFIX) -endif -ifdef PACKAGENAME - @$(ECHO) PackageName.......... $(PACKAGENAME) -endif - @$(ECHO) PackageSuffix........ $(PACKAGESUFFIX) - @$(ECHO) - @$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR) - @$(ECHO) BinInstallDir........ $(BININSTALLDIR) - @$(ECHO) LibInstallDir........ $(LIBINSTALLDIR) - @$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR) - @$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR) - @$(ECHO) DocInstallDir........ $(DOCINSTALLDIR) - @$(ECHO) DataInstallDir....... $(DATAINSTALLDIR) - @$(ECHO) - @$(ECHO) DestZipDir........... $(DESTZIPDIR) - @$(ECHO) ZipName.............. $(ZIPNAME) - @$(ECHO) - -##################################################################### -# Local Makefile -##################################################################### - -ifneq ($(wildcard fpcmake.loc),) -include fpcmake.loc -endif - diff --git a/gfx/gdi/Makefile.fpc b/gfx/gdi/Makefile.fpc deleted file mode 100644 index f3807726..00000000 --- a/gfx/gdi/Makefile.fpc +++ /dev/null @@ -1,36 +0,0 @@ -# -# Makefile.fpc for fpGFX Win32 GDI support -# - -[package] -name=fpgfx -version=0.3 - -[require] -packages=fcl -unitdir=.. ../emulayer - -[target] -units=gfx_gdi gfxinterface -rst=gfx_gdi - -[compiler] -unitdir=.. ../emulayer -unittargetdir=../units -options=-S2h - -[install] -fpcpackage=y - -[default] -fpcdir=/opt/fpc/src - -#[libs] -#libname=fpgfx - -#[install] -#subdir= - -#[dirs] -#fpcdir=../../../.. -#unitdir=.. diff --git a/gfx/gdi/fpgfxpackage.lpk b/gfx/gdi/fpgfxpackage.lpk deleted file mode 100644 index 06dbd483..00000000 --- a/gfx/gdi/fpgfxpackage.lpk +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0"?> -<CONFIG> - <Package Version="2"> - <PathDelim Value="\"/> - <Name Value="fpGFXPackage"/> - <Author Value="Graeme Geldenhuys"/> - <CompilerOptions> - <Version Value="5"/> - <PathDelim Value="\"/> - <SearchPaths> - <OtherUnitFiles Value="..\;..\emulayer\"/> - <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> - <SrcPath Value="$(TargetOS)\"/> - </SearchPaths> - <CodeGeneration> - <Generate Value="Faster"/> - </CodeGeneration> - <Other> - <CompilerPath Value="$(CompPath)"/> - </Other> - </CompilerOptions> - <Description Value="Free Pascal GFX Library - [Windows] -"/> - <License Value="Modified LGPL -"/> - <Version Minor="4"/> - <Files Count="7"> - <Item1> - <Filename Value="..\gfxbase.pas"/> - <UnitName Value="GfxBase"/> - </Item1> - <Item2> - <Filename Value="gfxinterface.pas"/> - <UnitName Value="GFXInterface"/> - </Item2> - <Item3> - <Filename Value="gfx_gdi.pas"/> - <UnitName Value="GFX_GDI"/> - </Item3> - <Item4> - <Filename Value="..\fpgfx.pas"/> - <UnitName Value="fpgfx"/> - </Item4> - <Item5> - <Filename Value="..\geldirty.pas"/> - <UnitName Value="GELDirty"/> - </Item5> - <Item6> - <Filename Value="..\gelimage.pas"/> - <UnitName Value="GELImage"/> - </Item6> - <Item7> - <Filename Value="..\fputf8utils.pas"/> - <UnitName Value="fpUTF8Utils"/> - </Item7> - </Files> - <RequiredPkgs Count="1"> - <Item1> - <PackageName Value="FCL"/> - <MinVersion Major="1" Valid="True"/> - </Item1> - </RequiredPkgs> - <UsageOptions> - <UnitPath Value="$(PkgOutDir)\"/> - </UsageOptions> - <PublishOptions> - <Version Value="2"/> - <DestinationDirectory Value="$(TestDir)\publishedpackage\"/> - <IgnoreBinaries Value="False"/> - </PublishOptions> - </Package> -</CONFIG> diff --git a/gfx/gdi/fpgfxpackage.pas b/gfx/gdi/fpgfxpackage.pas deleted file mode 100644 index 0c2e3f6c..00000000 --- a/gfx/gdi/fpgfxpackage.pas +++ /dev/null @@ -1,14 +0,0 @@ -{ This file was automatically created by Lazarus. Do not edit! -This source is only used to compile and install the package. - } - -unit fpGFXPackage; - -interface - -uses - GfxBase, GFXInterface, gfx_gdi, fpgfx, GELDirty, GELImage, fpUTF8Utils; - -implementation - -end. diff --git a/gfx/gdi/gdikeys.inc b/gfx/gdi/gdikeys.inc deleted file mode 100644 index 20bb97b9..00000000 --- a/gfx/gdi/gdikeys.inc +++ /dev/null @@ -1,332 +0,0 @@ -{ - fpGFX - Free Pascal Graphics Library - Copyright (C) 2000 - 2001 by - Areca Systems GmbH / Sebastian Guenther, sg@freepascal.org - Copyright (C) 2006 by Graeme Geldenhuys - member of the fpGFX development team. - - Win32 GDI target implementation: Keycode translation helpers - - See the file COPYING.modifiedLGPL, included in this distribution, - for details about the copyright. - - 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. - - **********************************************************************} - - -function VirtKeyToKeycode(VirtKey: Byte): Word; -const - TranslTable: array[Byte] of Integer = ( - -1, // $00 - -1, // $01 VK_LBUTTON - -1, // $02 VK_RBUTTON - -1, // $03 VK_CANCEL - -1, // $04 VK_MBUTTON - -1, // $05 VK_XBUTTON1 - -1, // $06 VK_XBUTTON2 - -1, // $07 - keyBackSpace, // $08 VK_BACK - keyTab, // $09 VK_TAB - -1, // $0a - -1, // $0b - keyClear, // $0c VK_CLEAR - keyReturn, // $0d VK_RETURN - -1, // $0e - -1, // $0f - keyShift, // $10 VK_SHIFT - keyCtrl, // $11 VK_CONTROL - keyAlt, // $12 VK_MENU - keyPause, // $13 VK_PAUSE - -1, // $14 VK_CAPITAL - -1, // $15 VK_KANA - -1, // $16 - -1, // $17 VK_JUNJA - -1, // $18 VK_FINAL - -1, // $19 VK_HANJA - -1, // $1a - keyEscape, // $1b VK_ESCAPE - -1, // $1c VK_CONVERT - -1, // $1d VK_NONCONVERT - -1, // $1e VK_ACCEPT - keyModeSwitch, // $1f VK_MODECHANGE - $20, // $20 VK_SPACE - keyPrior, // $21 VK_PRIOR - keyNext, // $22 VK_NEXT - keyEnd, // $23 VK_END - keyHome, // $24 VK_HOME - keyLeft, // $25 VK_LEFT - keyUp, // $26 VK_UP - keyRight, // $27 VK_RIGHT - keyDown, // $28 VK_DOWN - keySelect, // $29 VK_SELECT - keyPrintScreen, // $2a VK_PRINT - keyExecute, // $2b VK_EXECUTE - keyPrintScreen, // $2c VK_SNAPSHOT - keyInsert, // $2d VK_INSERT - keyDelete, // $2e VK_DELETE - keyHelp, // $2f VK_HELP - $30, // $30 '0' - $31, // $31 '1' - $32, // $32 '2' - $33, // $33 '3' - $34, // $34 '4' - $35, // $35 '5' - $36, // $36 '6' - $37, // $37 '7' - $38, // $38 '8' - $39, // $39 '9' - -1, // $3a - -1, // $3b - -1, // $3c - -1, // $3d - -1, // $3e - -1, // $3f - -1, // $40 - $41, // $41 'A' - $42, // $42 'B' - $43, // $43 'C' - $44, // $44 'D' - $45, // $45 'E' - $46, // $46 'F' - $47, // $47 'G' - $48, // $48 'H' - $49, // $49 'I' - $4a, // $4a 'J' - $4b, // $4b 'K' - $4c, // $4c 'L' - $4d, // $4d 'M' - $4e, // $4e 'N' - $4f, // $4f 'O' - $50, // $50 'P' - $51, // $51 'Q' - $52, // $52 'R' - $53, // $53 'S' - $54, // $54 'T' - $55, // $55 'U' - $56, // $56 'V' - $57, // $57 'W' - $58, // $58 'X' - $59, // $59 'Y' - $5a, // $5a 'Z' - -1, // $5b VK_LWIN - -1, // $5c VK_RWIN - -1, // $5d VK_APPS - -1, // $5e - -1, // $5f VK_SLEEP - keyP0, // $60 VK_NUMPAD0 - keyP1, // $61 VK_NUMPAD1 - keyP2, // $62 VK_NUMPAD2 - keyP3, // $63 VK_NUMPAD3 - keyP4, // $64 VK_NUMPAD4 - keyP5, // $65 VK_NUMPAD5 - keyP6, // $66 VK_NUMPAD6 - keyP7, // $67 VK_NUMPAD7 - keyP8, // $68 VK_NUMPAD8 - keyP9, // $69 VK_NUMPAD9 - keyPAsterisk, // $6a VK_MULTIPLY - keyPPlus, // $6b VK_ADD - keyPSeparator, // $6c VK_SEPARATOR - keyPMinus, // $6d VK_SUBTRACT - keyPDecimal, // $6e VK_DECIMAL - keyPSlash, // $6f VK_DIVIDE - keyF1, // $70 VK_F1 - keyF2, // $71 VK_F2 - keyF3, // $72 VK_F3 - keyF4, // $73 VK_F4 - keyF5, // $74 VK_F5 - keyF6, // $75 VK_F6 - keyF7, // $76 VK_F7 - keyF8, // $77 VK_F8 - keyF9, // $78 VK_F9 - keyF10, // $79 VK_F10 - keyF11, // $7a VK_F11 - keyF12, // $7b VK_F12 - keyF13, // $7c VK_F13 - keyF14, // $7d VK_F14 - keyF15, // $7e VK_F15 - keyF16, // $7f VK_F16 - keyF17, // $80 VK_F17 - keyF18, // $81 VK_F18 - keyF19, // $82 VK_F19 - keyF20, // $83 VK_F20 - keyF21, // $84 VK_F21 - keyF22, // $85 VK_F22 - keyF23, // $86 VK_F23 - keyF24, // $87 VK_F24 - -1, // $88 - -1, // $89 - -1, // $8a - -1, // $8b - -1, // $8c - -1, // $8d - -1, // $8e - -1, // $8f - keyNumLock, // $90 VK_NUMLOCK - keyScroll, // $91 VK_SCROLL - -1, // $92 VK_OEM_NEC_EQUAL - -1, // $93 VK_OEM_FJ_MASSHOU - -1, // $94 VK_OEM_FJ_TOUROKU - -1, // $95 VK_OEM_FJ_LOYA - -1, // $96 VK_OEM_FJ_ROYA - -1, // $97 - -1, // $98 - -1, // $99 - -1, // $9a - -1, // $9b - -1, // $9c - -1, // $9d - -1, // $9e - -1, // $9f - keyShiftL, // $a0 VK_LSHIFT - keyShiftR, // $a1 VK_RSHIFT - keyCtrlL, // $a2 VK_LCONTROL - keyCtrlR, // $a3 VK_RCONTROL - -1, // $a4 VK_LMENU - -1, // $a5 VK_RMENU - -1, // $a6 VK_BROWSER_BACK - -1, // $a7 VK_BROWSER_FORWARD - -1, // $a8 VK_BROWSER_REFRESH - -1, // $a9 VK_BROWSER_STOP - -1, // $aa VK_BROWSER_SEARCH - -1, // $ab VK_BROWSER_FAVORITES - -1, // $ac VK_BROWSER_HOME - -1, // $ad VK_VOLUME_MUTE - -1, // $ae VK_VOLUME_DOWN - -1, // $af VK_VOLUME_UP - -1, // $b0 VK_MEDIA_NEXT_TRACK - -1, // $b1 VK_MEDIA_PREV_TRACK - -1, // $b2 VK_MEDIA_STOP - -1, // $b3 VK_MEDIA_PLAY_PAUSE - -1, // $b4 VK_LAUNCH_MAIL - -1, // $b5 VK_LAUNCH_MEDIA_SELECT - -1, // $b6 VK_LAUNCH_APP1 - -1, // $b7 VK_LAUNCH_APP2 - -1, // $b8 - -1, // $b9 - $dc, {U Umlaut} // $ba VK_OEM_1 - $2b, {+ char} // $bb VK_OEM_PLUS - $2c, {, char} // $bc VK_OEM_COMMA - $2d, {- char} // $bd VK_OEM_MINUS - $2e, {. char} // $be VK_OEM_PERIOD - $23, {# char} // $bf VK_OEM_2 - $d6, {O Umlaut} // $c0 VK_OEM_3 - -1, // $c1 - -1, // $c2 - -1, // $c3 - -1, // $c4 - -1, // $c5 - -1, // $c6 - -1, // $c7 - -1, // $c8 - -1, // $c9 - -1, // $ca - -1, // $cb - -1, // $cc - -1, // $cd - -1, // $ce - -1, // $cf - -1, // $d0 - -1, // $d1 - -1, // $d2 - -1, // $d3 - -1, // $d4 - -1, // $d5 - -1, // $d6 - -1, // $d7 - -1, // $d8 - -1, // $d9 - -1, // $da - -1, // $db VK_OEM_4 - keyDeadCircumflex, // $dc VK_OEM_5 - keyDeadAcute, // $dd VK_OEM_6 - $c4, {A Umlaut} // $de VK_OEM_7 - -1, // $df VK_OEM_8 - -1, // $e0 - -1, // $e1 VK_OEM_AX - $3c, {< char} // $e2 VK_OEM_102 - -1, // $e3 VK_ICO_HELP - keyP5, // $e4 VK_ICO_00 - -1, // $e5 VK_PROCESSKEY - -1, // $e6 VK_ICO_CLEAR - -1, // $e7 VK_PACKET - -1, // $e8 - -1, // $e9 VK_OEM_RESET - -1, // $ea VK_OEM_JUMP - -1, // $eb VK_OEM_PA1 - -1, // $ec VK_OEM_PA2 - -1, // $ed VK_OEM_PA3 - -1, // $ee VK_OEM_WSCTRL - -1, // $ef VK_OEM_CUSEL - -1, // $f0 VK_OEM_ATTN - -1, // $f1 VK_OEM_FINISH - -1, // $f2 VK_OEM_COPY - -1, // $f3 VK_OEM_AUTO - -1, // $f4 VK_OEM_ENLW - -1, // $f5 VK_OEM_BACKTAB - -1, // $f6 VK_ATTN - -1, // $f7 VK_CRSEL - -1, // $f8 VK_EXSEL - -1, // $f9 VK_EREOF - -1, // $fa VK_PLAY - -1, // $fb VK_ZOOM - -1, // $fc VK_NONAME - -1, // $fd VK_PA1 - -1, // $fe VK_OEM_CLEAR - -1 // $ff - ); -begin - if TranslTable[VirtKey] = -1 then - begin -{$IFDEF Debug} - WriteLn('No mapping for virtual keycode $', IntToHex(VirtKey, 2)); -{$ENDIF} - Result := keyNIL - end else - begin - Result := TranslTable[VirtKey]; - // WriteLn('Key $', IntToHex(VirtKey, 2), ' mapped to $', IntToHex(Result, 4)); - end; -end; - - -function GetKeyboardShiftState: TShiftState; -var - State: array[Byte] of Byte; -begin - {$ifndef wince} - Windows.GetKeyboardState(State); - {$endif} - Result := []; - if (State[VK_SHIFT] and 128) <> 0 then - Include(Result, ssShift); - if (State[VK_MENU] and 128) <> 0 then - Include(Result, ssAlt); - if (State[VK_CONTROL] and 128) <> 0 then - Include(Result, ssCtrl); - if (State[VK_LBUTTON] and 128) <> 0 then - Include(Result, ssLeft); - if (State[VK_RBUTTON] and 128) <> 0 then - Include(Result, ssRight); - if (State[VK_MBUTTON] and 128) <> 0 then - Include(Result, ssMiddle); - if (State[VK_CAPITAL] and 1) <> 0 then - Include(Result, ssCaps); - if (State[VK_NUMLOCK] and 1) <> 0 then - Include(Result, ssNum); - if (State[VK_SCROLL] and 1) <> 0 then - Include(Result, ssScroll); -end; - - -{ - $Log: gdikeys.inc,v $ - Revision 1.2 2001/02/09 20:44:59 sg - * Fixed lots of keyboard mapping bugs - - Revision 1.1 2001/01/11 23:07:24 sg - *** empty log message *** - -} diff --git a/gfx/gdi/gfx_gdi.pas b/gfx/gdi/gfx_gdi.pas deleted file mode 100644 index 293fd50a..00000000 --- a/gfx/gdi/gfx_gdi.pas +++ /dev/null @@ -1,1991 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - GFX_GDI - Windows GDI specific code - - Copyright (C) 2000 - 2006 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. -} -unit gfx_gdi; - -{$ifdef fpc} - {$mode delphi}{$H+} -{$endif} - -interface - -uses - Windows, - SysUtils, Classes, - GfxBase; - - -resourcestring - SGDICanvasInvalidFontClass = - 'Tried to set font of class "%s" into GDI context. ' - + 'Only TGDIFont is allowed.'; - -{ Constants missing on windows unit } -const - WM_MOUSEWHEEL = $020a; - - VER_PLATFORM_WIN32_CE = 3; - -{ Unicode selection variables } -var - UnicodeEnabledOS: Boolean; - - WinVersion: TOSVersionInfo; - -type - - EGDIError = class(EGfxError); - - { TGDIFont } - - TGDIFont = class(TFCustomFont) - public - class function GetDefaultFontName(const AFontClass: TGfxFontClass): String; override; - constructor Create(const Descriptor: String); - destructor Destroy; override; - end; - - - { TGDICanvas } - - PGDICanvasState = ^TGDICanvasState; - TGDICanvasState = record - Prev: PGDICanvasState; - Matrix: TGfxMatrix; - Color, PenColor, FontColor: TGfxPixel; - PenLineStyle: TGfxLineStyle; - Font: TFCustomFont; - CurFontHandle: HFONT; - end; - - TGDICanvas = class(TFCustomCanvas) - private - FColor, FBrushColor, FPenColor, FFontColor: TGfxPixel; - FLineStyle, FPenLineStyle: TGfxLineStyle; - FBrush, FOldBrush: HBRUSH; - FPen, FOldPen: HPEN; - FFont: TFCustomFont; - FFontHandle, FDefaultFontHandle, FCurFontHandle: HFONT; - FFontMetrics: TTextMetric; - FStateStackpointer: PGDICanvasState; - procedure Resized(NewWidth, NewHeight: Integer); - protected - function DoExcludeClipRect(const ARect: TRect): Boolean; override; - function DoIntersectClipRect(const ARect: TRect): Boolean; override; - function DoUnionClipRect(const ARect: TRect): Boolean; override; - function DoGetClipRect: TRect; override; - procedure NeedBrush; - procedure NeedPen; - procedure NeedFont(ANeedFontColor: Boolean); - procedure NeedFontColor; - procedure DoDrawArc(const ARect: TRect; StartAngle, EndAngle: Single); override; - procedure DoDrawCircle(const ARect: TRect); override; - procedure DoDrawLine(const AFrom, ATo: TPoint); override; - procedure DoDrawPoint(const APoint: TPoint); override; - procedure DoFillRect(const ARect: TRect); override; - procedure DoFillTriangle(const P1, P2, P3: TPoint); override; - procedure DoTextOut(const APosition: TPoint; const AText: String); override; - procedure DoCopyRect(ASource: TFCustomCanvas; const ASourceRect: TRect; const ADestPos: TPoint); override; - procedure DoMaskedCopyRect(ASource, AMask: TFCustomCanvas; const ASourceRect: TRect; const AMaskPos, ADestPos: TPoint); override; - procedure DoDrawImageRect(AImage: TFCustomBitmap; ASourceRect: TRect; const ADestPos: TPoint); override; - public - constructor Create; override; - destructor Destroy; override; - procedure SetHandle(AHandle: PtrUInt); override; - function MapColor(const AColor: TGfxColor): TGfxPixel; override; - function FontCellHeight: Integer; override; - function TextExtent(const AText: String): TSize; override; - procedure SaveState; override; - procedure RestoreState; override; - procedure EmptyClipRect; override; - procedure DoSetColor(AColor: TGfxPixel); override; - procedure SetFont(AFont: TFCustomFont); override; - procedure SetLineStyle(ALineStyle: TGfxLineStyle); override; - end; - - - TGDIWindowCanvas = class(TGDICanvas) - private - FWnd: HWND; - public - constructor Create(AWnd: HWND); - destructor Destroy; override; - end; - - - TGDIBitmapCanvas = class(TGDICanvas) - private - FBitmap, FOldBitmap: HBITMAP; - public - constructor Create(ABitmap: HBITMAP; AWidth, AHeight: Integer); - destructor Destroy; override; - property Bitmap: HBITMAP read FBitmap; - end; - - { TGDIBitmap } - - TGDIBitmap = class(TFCustomBitmap) - private - IsLocked: Boolean; - public - constructor Create(AWidth, AHeight: Integer; APixelFormat: TGfxPixelFormat); override; - destructor Destroy; override; - procedure Lock(out AData: Pointer; out AStride: LongWord); override; - procedure Unlock; override; - end; - - { TGDIScreen } - - TGDIScreen = class(TFCustomScreen) - protected - procedure SetMousePos(const NewPos: TPoint); override; - function GetMousePos: TPoint; override; - public - constructor Create; override; - function CreateBitmapCanvas(AWidth, AHeight: Integer): TFCustomCanvas; override; - function CreateMonoBitmapCanvas(AWidth, AHeight: Integer): TFCustomCanvas; override; - end; - - - { TGDIApplication } - - TGDIApplication = class(TFCustomApplication) - public - { default methods } - constructor Create; override; - destructor Destroy; override; - procedure Initialize(ADisplayName: String = ''); override; - procedure Run; override; - procedure Quit; override; - end; - - { TGDIWindow } - - TGDIWindow = class(TFCustomWindow) - private - FPaintStruct: TPaintStruct; - protected - FHandle: PtrUInt; - WindowClass: TWndClass; - WindowClassW: TWndClassW; - FWindowStyle, FWindowStyleEx: LongWord; - FMouseInWindow, FHasMouseCapture, FHasFocus: Boolean; - - { Internal resource allocation methods } - procedure DoSetCursor; override; - procedure DoSetWindowOptions; override; - function GetHandle: PtrUInt; override; - procedure CreateWindow; override; - { Internal methods specific to the win backend } - procedure UpdateWindowButtons; - function DoMouseEnterLeaveCheck(uMsg, wParam, lParam: Cardinal): Boolean; - procedure EvInternalPaint; - { Event processing methods } - procedure EvCreate; override; - procedure EvFocusIn; override; - procedure EvFocusOut; override; - procedure EvHide; override; - procedure EvKeyPressed(AKey: Word); override; - procedure EvKeyReleased(AKey: Word); override; - procedure EvKeyChar(AKeyChar: Char); override; - procedure EvMouseEnter(const AMousePos: TPoint); override; - procedure EvMouseLeave; override; - procedure EvMousePressed(AButton: TMouseButton; const AMousePos: TPoint); override; - procedure EvMouseReleased(AButton: TMouseButton; const AMousePos: TPoint); override; - procedure EvMouseMove(const AMousePos: TPoint); override; - procedure EvMouseWheel(AWheelDelta: Single; const AMousePos: TPoint); override; - procedure EvPaint; override; - procedure EvMove; override; - procedure EvResize; override; - procedure EvShow; override; - public - { Constructors / Destructors } - constructor Create(AParent: TFCustomWindow; AWindowOptions: TFWindowOptions); override; - destructor Destroy; override; - { Widget controling methods } - function GetTitle: String; override; - procedure SetTitle(const ATitle: String); override; - procedure SetPosition(const APosition: TPoint); override; - procedure SetSize(const ASize: TSize); override; - procedure SetMinMaxSize(const AMinSize, AMaxSize: TSize); override; - procedure SetClientSize(const ASize: TSize); override; - procedure SetMinMaxClientSize(const AMinSize, AMaxSize: TSize); override; - procedure Show; override; - procedure Hide; override; - procedure Invalidate; override; - procedure CaptureMouse; override; - procedure ReleaseMouse; override; - end; - - -function RectToWinRect(const ARect: TRect): Windows.Rect; -function WinRectToRect(const ARect: Windows.Rect): TRect; - -function VirtKeyToKeycode(VirtKey: Byte): Word; -function GetKeyboardShiftState: TShiftState; - - -implementation - -uses - math, fpgfx; - -{ - Use CenterPoint to get the Center-Point of any rectangle. It is primarily - for use with, and in, other routines such as Quadrant, and RadialPoint. -} -function CenterPoint(Rect : TRect) : TPoint; -var - Tmp : Longint; -begin - With Rect do begin - - If Right < Left then begin - Tmp := Right; - Right := Left; - Left := Tmp; - end; - - If Bottom < Top then begin - Tmp := Bottom; - Bottom := Top; - Top := Tmp; - end; - - Result.X := Left + (Right - Left) div 2; - Result.Y := Top + (Bottom - Top) div 2; - end; -end; - - -{ - Use LineEndPoint to get the End-Point of a line of any given Length at - any given angle with any given Start-Point. It is primarily for use in - other routines such as RadialPoint. The angle is in 1/16th of a degree. - For example, a full circle equals 5760 (16*360). Zero degrees is at the - 3'o clock position. -} -Function LineEndPoint(StartPoint : TPoint; Angle, Length : Extended) : -TPoint; -begin - if Angle > 360*16 then - Angle := Frac(Angle / 360*16) * 360*16; - - if Angle < 0 then - Angle := 360*16 - abs(Angle); - - Result.Y := StartPoint.Y - Round(Length*Sin(DegToRad(Angle/16))); - Result.X := StartPoint.X + Round(Length*Cos(DegToRad(Angle/16))); -end; - - -{ - Use EllipseRadialLength to get the Radial-Length of non-rotated ellipse at - any given Eccentric( aka Radial ) Angle. It is primarily for use in other - routines such as RadialPoint. The Eccentric angle is in 1/16th of a degree. - For example, a full circle equals 5760 (16*360). Zero degrees is at the - 3'o clock position. -} -function EllipseRadialLength(Rect: TRect; EccentricAngle: Extended): Longint; -var - a, b, R : Extended; -begin - a := (Rect.Right - Rect.Left) div 2; - b := (Rect.Bottom - Rect.Top) div 2; - R := Sqr(a)*Sqr(b); - R := Sqrt(R / ((Sqr(b)*Sqr(Cos(DegToRad(EccentricAngle/16)))) - + (Sqr(a)*Sqr(Sin(DegToRad(EccentricAngle/16)))))); - Result := integer(Trunc(R)); -end; - - -{ - Use RadialPoint to get the Radial-Point at any given Eccentric( aka Radial ) - angle on any non-rotated ellipse. It is primarily for use in Angles2Coords. - The EccentricAngle is in 1/16th of a degree. For example, a full circle - equals 5760 (16*360). Zero degrees is at the 3'o clock position. -} -function RadialPoint(EccentricAngle: Extended; Rect: TRect): TPoint; -var - R: Longint; -Begin - R := EllipseRadialLength(Rect, EccentricAngle); - Result := LineEndPoint(CenterPoint(Rect), EccentricAngle, R); -end; - - -{ - Use Angles2Coords to convert an Eccentric(aka Radial) Angle and an - Angle-Length, such as are used in X-Windows and GTK, into the coords, - for Start and End Radial-Points, such as are used in the Windows API Arc - Pie and Chord routines. The angles are 1/16th of a degree. For example, a - full circle equals 5760 (16*360). Positive values of Angle and AngleLength - mean counter-clockwise while negative values mean clockwise direction. - Zero degrees is at the 3'o clock position. -} -procedure Angles2Coords(X, Y, Width, Height: Integer; Angle1, Angle2: Extended; - var SX, SY, EX, EY: Integer); -var - aRect: TRect; - SP, EP: TPoint; -begin - aRect := Rect(X, Y, X + Width, Y + Height); - SP := RadialPoint(Angle1, aRect); - If Angle2 + Angle1 > 360*16 then - Angle2 := (Angle2 + Angle1) - 360*16 - else - Angle2 := Angle2 + Angle1; - EP := RadialPoint(Angle2, aRect); - SX := SP.X; - SY := SP.Y; - EX := EP.X; - EY := EP.Y; -end; - - -{ TGDIFont } - -class function TGDIFont.GetDefaultFontName(const AFontClass: TGfxFontClass): String; -const - FontNames: array[TGfxFontClass] of String = ( - 'Times New Roman', 'Arial', 'Courier New', 'Wingdings'); -begin - Result := FontNames[AFontClass]; -end; - -constructor TGDIFont.Create(const Descriptor: String); -type - TXLFDFields = (lfdFoundry, lfdFamily, lfdWeight, lfdSlant, lfdSetWidth, - lfdAddStyle, lfdPixelSize, lfdPointSize, lfdResolutionX, lfdResolutionY, - lfdSpacing, lfdAverageWidth, lfdCharsetRegistry, lfdCharsetEncoding); -var - Fields: array[TXLFDFields] of String; - FontInfo: LOGFONT; - FieldIndex: TXLFDFields; - s: String; - i: Integer; - dc: HDC; -begin - inherited Create; - - // Split the font descriptor string - s := Descriptor; - for FieldIndex := Low(TXLFDFields) to High(TXLFDFields) do - begin - Fields[FieldIndex] := Copy(s, 2, Length(s)); - i := Pos('-', Fields[FieldIndex]); - if i = 0 then - i := Length(s); - Fields[FieldIndex] := Copy(Fields[FieldIndex], 1, i - 1); - s := Copy(s, i + 1, Length(s)); - end; - - FillChar(FontInfo, SizeOf(FontInfo), 0); - - if (Length(Fields[lfdPixelSize]) > 0) and (Fields[lfdPixelSize] <> '*') then - FontInfo.lfHeight := -StrToInt(Fields[lfdPixelSize]) - else if (Length(Fields[lfdPointSize]) > 0) and - (Fields[lfdPointSize] <> '*') then - begin - dc := Windows.GetDC(0); - FontInfo.lfHeight := ((StrToInt(Fields[lfdPointSize]) * - Windows.GetDeviceCaps(dc, LOGPIXELSY)) + (5 * 72)) div 720; - Windows.ReleaseDC(0, dc); - end; - - if (Length(Fields[lfdAverageWidth]) > 0) and - (Fields[lfdAverageWidth] <> '*') then - FontInfo.lfWidth := StrToInt(Fields[lfdAverageWidth]); - - if CompareText(Fields[lfdWeight], 'medium') = 0 then - FontInfo.lfWeight := FW_MEDIUM - else if CompareText(Fields[lfdWeight], 'bold') = 0 then - FontInfo.lfWeight := FW_BOLD; - - if (CompareText(Fields[lfdSlant], 'i') = 0) or - (CompareText(Fields[lfdSlant], 'o') = 0) then - FontInfo.lfItalic := 1; - - if (CompareText(Fields[lfdSpacing], 'm') = 0) or - (CompareText(Fields[lfdSpacing], 'c') = 0) then - FontInfo.lfPitchAndFamily := FIXED_PITCH - else if CompareText(Fields[lfdSpacing], 'p') = 0 then - FontInfo.lfPitchAndFamily := VARIABLE_PITCH; - - if Fields[lfdFamily] <> '*' then - FontInfo.lfFaceName := Fields[lfdFamily]; - - FHandle := Windows.CreateFontIndirect(@FontInfo); -end; - - -destructor TGDIFont.Destroy; -begin - Windows.DeleteObject(Handle); - inherited Destroy; -end; - - -{ TGDICanvas } - -constructor TGDICanvas.Create; -begin - inherited Create; - FDefaultFontHandle := Windows.GetStockObject(DEFAULT_GUI_FONT); - FCurFontHandle := FDefaultFontHandle; -end; - -destructor TGDICanvas.Destroy; -begin - if FBrush <> 0 then - begin - Windows.SelectObject(Handle, FOldBrush); - Windows.DeleteObject(FBrush); - end; - if FPen <> 0 then - begin - Windows.SelectObject(Handle, FOldPen); - Windows.DeleteObject(FPen); - end; - inherited Destroy; -end; - -procedure TGDICanvas.SetHandle(AHandle: PtrUInt); -begin - FHandle := AHandle; - - { It's possible to set the Handle to zero - In this case we effectively disallowing new painting - until a new handle is set } - if AHandle = 0 then Exit; - - Windows.SelectObject(Handle, FDefaultFontHandle); - Windows.GetTextMetrics(Handle, @FFontMetrics); - Windows.SetBkMode(Handle, TRANSPARENT); -end; - -procedure TGDICanvas.SaveState; -var - SavedState: PGDICanvasState; - NewRegion: HRGN; -begin - New(SavedState); - SavedState^.Prev := FStateStackpointer; - SavedState^.Matrix := Matrix; - SavedState^.Color := FColor; - SavedState^.PenColor := FPenColor; - SavedState^.PenLineStyle := FPenLineStyle; - SavedState^.FontColor := FFontColor; - SavedState^.Font := FFont; - SavedState^.CurFontHandle := FCurFontHandle; - FStateStackpointer := SavedState; - { !!!: This is very dangerous! Some of the FCurXXX variables are not saved in - SavedState, which might result in graphics errors under certain - circumstances. Better try to remove SaveDC/RestoreDC completely. } - Windows.SaveDC(Handle); -end; - - -procedure TGDICanvas.RestoreState; -var - SavedState: PGDICanvasState; -begin - Windows.RestoreDC(Handle, -1); - - SavedState := FStateStackpointer; - FStateStackpointer := SavedState^.Prev; - Matrix := SavedState^.Matrix; - FColor := SavedState^.Color; - FPenColor := SavedState^.PenColor; - FPenLineStyle := SavedState^.PenLineStyle; - FFontColor := SavedState^.FontColor; - FCurFontHandle := SavedState^.CurFontHandle; - SetFont(SavedState^.Font); - Dispose(SavedState); -end; - - -procedure TGDICanvas.EmptyClipRect; -begin - Windows.IntersectClipRect(Handle, 0, 0, 0, 0); -end; - - -function TGDICanvas.DoExcludeClipRect(const ARect: TRect): Boolean; -begin - with ARect do - Result := - Windows.ExcludeClipRect(Handle, Left, Top, Right, Bottom) <> NULLREGION; -end; - - -function TGDICanvas.DoIntersectClipRect(const ARect: TRect): Boolean; -begin - with ARect do - Result := - Windows.IntersectClipRect(Handle, Left, Top, Right, Bottom) <> NULLREGION -end; - - -function TGDICanvas.DoUnionClipRect(const ARect: TRect): Boolean; -var - Region: HRGN; -begin - with ARect do - Region := Windows.CreateRectRgn(Left, Top, Right, Bottom); - {$IFNDEF WinCE} - Result := Windows.ExtSelectClipRgn(Handle, Region, RGN_OR) <> NULLREGION; - {$ENDIF} - Windows.DeleteObject(Region); -end; - - -function TGDICanvas.DoGetClipRect: TRect; -var - Rect: Windows.Rect; -begin - Windows.GetClipBox(Handle, @Rect); - Result := TRect(Rect); -end; - - -function TGDICanvas.MapColor(const AColor: TGfxColor): TGfxPixel; -begin -{ Result := Windows.GetNearestColor(Handle, RGB(AColor.Red div 257, - AColor.Green div 257, AColor.Blue div 257));} - Result := RGB(AColor.Red, AColor.Green, AColor.Blue); -end; - - -procedure TGDICanvas.DoSetColor(AColor: TGfxPixel); -begin - FColor := AColor; -end; - - -procedure TGDICanvas.SetFont(AFont: TFCustomFont); -begin - if AFont = FFont then - exit; - - FFont := AFont; - - if not Assigned(AFont) then - FFontHandle := FDefaultFontHandle - else - begin - if not AFont.InheritsFrom(TGDIFont) then - raise EGfxError.CreateFmt(SGDICanvasInvalidFontClass, [AFont.ClassName]); - FFontHandle := TGDIFont(AFont).Handle; - end; -end; - - -procedure TGDICanvas.SetLineStyle(ALineStyle: TGfxLineStyle); -begin - FLineStyle := ALineStyle; -end; - - -procedure TGDICanvas.DoDrawArc(const ARect: TRect; StartAngle, EndAngle: Single); -var - SX, SY, EX, EY : Longint; -begin - {$Warning DoDrawArc needs testing. } - Angles2Coords(ARect.Left, ARect.Top, ARect.Right - ARect.Left, - ARect.Bottom - ARect.Top, StartAngle, EndAngle, SX, SY, EX, EY); - {$ifndef wince} - Windows.Arc(Handle, ARect.Left, ARect.Top, ARect.Right, - ARect.Bottom, SX, SY, EX, EY) - {$endif} -end; - - -procedure TGDICanvas.DoDrawCircle(const ARect: TRect); -begin - {$Warning DoDrawCircle needs testing. } - NeedPen; - Windows.Ellipse(Handle, ARect.Left, ARect.Top, ARect.Right, ARect.Bottom); -end; - - -procedure TGDICanvas.DoDrawLine(const AFrom, ATo: TPoint); -begin - NeedPen; - Windows.MoveToEx(Handle, AFrom.x, AFrom.y, nil); - Windows.LineTo(Handle, ATo.x, ATo.y); -end; - - -procedure TGDICanvas.DoDrawPoint(const APoint: TPoint); -begin - {$Warning This is not implemented yet. } - // Use DrawLine() as windows doesn't have a DrawPoint. It does have a - // SetPixel() method, but not sure how to use it yet. - DoDrawLine(APoint, APoint); -// DoFillRect(Rect(APoint.X, APoint.Y, APoint.X, APoint.Y)); -end; - - -procedure TGDICanvas.DoFillRect(const ARect: TRect); -var - r: Windows.Rect; -begin - NeedBrush; - r := RectToWinRect(ARect); - Windows.FillRect(Handle, r, FBrush); -end; - -procedure TGDICanvas.DoFillTriangle(const P1, P2, P3: TPoint); -var - pts : array[1..3] of windows.TPoint; - pt: TPoint; -begin - pt := Transform(P1); - pts[1].X := pt.X; pts[1].Y := pt.Y; - pt := Transform(P2); - pts[2].X := pt.X; pts[2].Y := pt.Y; - pt := Transform(P3); - pts[3].X := pt.X; pts[3].Y := pt.Y; - - NeedBrush; - {$ifdef wince} - Windows.Polygon(Handle, @pts[1], 3); - {$else} - Windows.Polygon(Handle, pts[1], 3); - {$endif} -end; - - -function TGDICanvas.FontCellHeight: Integer; -begin - NeedFont(False); - Result := FFontMetrics.tmHeight; -end; - - -function TGDICanvas.TextExtent(const AText: String): TSize; -var - WideText: WideString; - ASize: Windows.SIZE; -begin - NeedFont(False); - - WideText := Utf8Decode(AText); - {$ifdef wince} - Windows.GetTextExtentPoint32(Handle, PWideChar(WideText), Length(WideText), @Result); - {$else} - Windows.GetTextExtentPoint32W(Handle, PWideChar(WideText), Length(WideText), ASize); - Result.cx := ASize.cx; - Result.cy := ASize.cy; - {$endif} -end; - - -procedure TGDICanvas.DoTextOut(const APosition: TPoint; const AText: String); -var - WideText: WideString; -begin - NeedFont(True); - - WideText := Utf8Decode(AText); - {$ifdef wince} - Windows.ExtTextOut(Handle, APosition.x, APosition.y, ETO_CLIPPED, nil, PWideChar(WideText), Length(WideText), nil) - {$else} - Windows.TextOutW(Handle, APosition.x, APosition.y, PWideChar(WideText), Length(WideText)) - {$endif} -end; - - -procedure TGDICanvas.DoCopyRect(ASource: TFCustomCanvas; const ASourceRect: TRect; - const ADestPos: TPoint); -begin - if not ASource.InheritsFrom(TGDICanvas) then - raise EGDIError.CreateFmt(SIncompatibleCanvasForBlitting, - [ASource.ClassName, Self.ClassName]); - - Windows.BitBlt( - Handle, ADestPos.x, ADestPos.y, ASourceRect.Right - ASourceRect.Left, - ASourceRect.Bottom - ASourceRect.Top, - TGDICanvas(ASource).Handle, ASourceRect.Left, ASourceRect.Top, - SRCCOPY); -end; - - -procedure TGDICanvas.DoMaskedCopyRect(ASource, AMask: TFCustomCanvas; - const ASourceRect: TRect; const AMaskPos, ADestPos: TPoint); -var - w, h: Integer; - SourceBitmap, AndObjectBitmap, AndMemBitmap, SaveBitmap, - OldSourceBitmap, OldAndObjectBitmap, OldAndMemBitmap, - OldSaveBitmap: HBITMAP; - SourceDC, MemDC, ObjectDC, SaveDC: HDC; -begin - if not ASource.InheritsFrom(TGDICanvas) then - raise EGDIError.CreateFmt(SIncompatibleCanvasForBlitting, - [ASource.ClassName, Self.ClassName]); - - if not AMask.InheritsFrom(TGDICanvas) then - raise EGDIError.CreateFmt(SIncompatibleCanvasForBlitting, - [AMask.ClassName, Self.ClassName]); - - w := ASourceRect.Right - ASourceRect.Left; - h := ASourceRect.Bottom - ASourceRect.Top; - - // See http://support.microsoft.com/support/kb/articles/Q79/2/12.ASP - - SourceDC := Windows.CreateCompatibleDC(Handle); - ObjectDC := Windows.CreateCompatibleDC(Handle); - MemDC := Windows.CreateCompatibleDC(Handle); - SourceBitmap := Windows.CreateCompatibleBitmap(Handle, w, h); - AndObjectBitmap := Windows.CreateCompatibleBitmap(ObjectDC, w, h); - AndMemBitmap := Windows.CreateCompatibleBitmap(Handle, w, h); - OldSourceBitmap := Windows.SelectObject(SourceDC, SourceBitmap); - OldAndObjectBitmap := Windows.SelectObject(ObjectDC, AndObjectBitmap); - OldAndMemBitmap := Windows.SelectObject(MemDC, AndMemBitmap); - - Windows.BitBlt(SourceDC, 0, 0, w, h, - TGDICanvas(ASource).Handle, ASourceRect.Left, ASourceRect.Top, SRCCOPY); - Windows.BitBlt(MemDC, 0, 0, w, h, Handle, ADestPos.x, ADestPos.y, SRCCOPY); - - // !!!: Find a ROP for replacing the following 2 Blits with a single one: - Windows.BitBlt(ObjectDC, 0, 0, w, h, - TGDICanvas(AMask).Handle, AMaskPos.x, AMaskPos.y, NOTSRCCOPY); - Windows.BitBlt(MemDC, 0, 0, w, h, ObjectDC, 0, 0, SRCAND); - - Windows.BitBlt(SourceDC, 0, 0, w, h, - TGDICanvas(AMask).Handle, AMaskPos.x, AMaskPos.y, SRCAND); - Windows.BitBlt(MemDC, 0, 0, w, h, SourceDC, 0, 0, SRCPAINT); - // Copy the result to the screen - Windows.BitBlt(Handle, ADestPos.x, ADestPos.y, w, h, MemDC, 0, 0, SRCCOPY); - - // Clean up - Windows.DeleteObject(Windows.SelectObject(ObjectDC, OldAndObjectBitmap)); - Windows.DeleteObject(Windows.SelectObject(MemDC, OldAndMemBitmap)); - Windows.DeleteObject(Windows.SelectObject(SourceDC, OldSourceBitmap)); - Windows.DeleteDC(MemDC); - Windows.DeleteDC(ObjectDC); - Windows.DeleteDC(SourceDC); -end; - - -procedure TGDICanvas.DoDrawImageRect(AImage: TFCustomBitmap; ASourceRect: TRect; - const ADestPos: TPoint); -var - MemDC: HDC; - OldBitmap: HBITMAP; - GDIPal: array of RGBQUAD; - i: Integer; -begin - ASSERT(AImage.InheritsFrom(TGDIBitmap)); - {$IFDEF Debug} - ASSERT(not TGDIBitmap(AImage).IsLocked); - {$ENDIF} - - MemDC := Windows.CreateCompatibleDC(Handle); - OldBitmap := Windows.SelectObject(MemDC, AImage.Handle); - - // Set the color palette, if present - if Assigned(AImage.Palette) then - begin - SetLength(GDIPal,AImage.Palette.EntryCount * SizeOf(RGBQUAD)); - for i := 0 to AImage.Palette.EntryCount - 1 do - with AImage.Palette.Entries[i] do - begin - GDIPal[i].rgbRed := Red; - GDIPal[i].rgbGreen := Green; - GDIPal[i].rgbBlue := Blue; - GDIPal[i].rgbReserved := 0; - end; - Windows.SetDIBColorTable(MemDC, 0, AImage.Palette.EntryCount, GDIPal[0]); - end; - - with ASourceRect do - Windows.BitBlt(Handle, ADestPos.x, ADestPos.y, Right - Left, Bottom - Top, - MemDC, Left, Top, SRCCOPY); - - Windows.SelectObject(MemDC, OldBitmap); - Windows.DeleteDC(MemDC); -end; - - -procedure TGDICanvas.NeedBrush; -begin - if (FBrush = 0) or (FBrushColor <> FColor) then - begin - if FBrush <> 0 then - begin - Windows.SelectObject(Handle, FOldBrush); - Windows.DeleteObject(FBrush); - end; - FBrushColor := FColor; - FBrush := Windows.CreateSolidBrush(FBrushColor); - FOldBrush := Windows.SelectObject(Handle, FBrush); - end; -end; - - -procedure TGDICanvas.NeedPen; -begin - if (FPen = 0) or (FPenColor <> FColor) or (FPenLineStyle <> FLineStyle) then - begin - if FPen <> 0 then - begin - Windows.SelectObject(Handle, FOldPen); - Windows.DeleteObject(FPen); - end; - FPenColor := FColor; - FPenLineStyle := FLineStyle; - case FPenLineStyle of - lsSolid: - FPen := Windows.CreatePen(PS_SOLID, 0, FPenColor); - end; - FOldPen := Windows.SelectObject(Handle, FPen); - end; -end; - - -procedure TGDICanvas.NeedFont(ANeedFontColor: Boolean); -begin - if FCurFontHandle <> FFontHandle then - begin - Windows.SelectObject(Handle, FFontHandle); - { TODO : Store the font metrics in TGDIFont } - Windows.GetTextMetrics(Handle, @FFontMetrics); - FCurFontHandle := FFontHandle; - end; - if ANeedFontColor then - NeedFontColor; -end; - - -procedure TGDICanvas.NeedFontColor; -begin - if FFontColor <> FColor then - begin - FFontColor := FColor; - Windows.SetTextColor(Handle, FFontColor); - end; -end; - - -procedure TGDICanvas.Resized(NewWidth, NewHeight: Integer); -begin - FWidth := NewWidth; - FHeight := NewHeight; -end; - - -{ TGDIWindowCanvas } - -constructor TGDIWindowCanvas.Create(AWnd: HWND); -begin - FWnd := AWnd; - inherited Create(); - SetHandle(Windows.GetDC(FWnd)); -end; - - -destructor TGDIWindowCanvas.Destroy; -begin - inherited Destroy; - if Handle <> 0 then - Windows.ReleaseDC(FWnd, Handle); -end; - - -{ TGDIBitmapCanvas } - -constructor TGDIBitmapCanvas.Create(ABitmap: HBITMAP; AWidth, AHeight: Integer); -begin - ASSERT(ABitmap <> 0); - FBitmap := ABitmap; - inherited Create(); - SetHandle(Windows.CreateCompatibleDC(0)); - FWidth := AWidth; - FHeight := AHeight; - FOldBitmap := Windows.SelectObject(Handle, Bitmap); -end; - - -destructor TGDIBitmapCanvas.Destroy; -begin - Windows.SelectObject(Handle, FOldBitmap); - Windows.DeleteObject(Bitmap); - Windows.DeleteDC(Handle); - inherited Destroy; -end; - - -{ TGDIBitmap } - -constructor TGDIBitmap.Create(AWidth, AHeight: Integer; APixelFormat: TGfxPixelFormat); -var - BitmapInfo: PBitmapInfo; - Color: PRGBQUAD; - TempDC: HDC; -begin - inherited Create(AWidth, AHeight, APixelFormat); - - case APixelFormat.FormatType of - ftMono: - begin - FStride := (AWidth + 7) shr 3; - GetMem(BitmapInfo, SizeOf(TBitmapInfoHeader) + 2 * SizeOf(RGBQUAD)); - BitmapInfo^.bmiHeader.biClrUsed := 2; - Color := @BitmapInfo^.bmiColors[0]; - Color^.rgbRed := 0; - Color^.rgbGreen := 0; - Color^.rgbBlue := 0; - Color^.rgbReserved := 0; - Inc(Color); - Color^.rgbRed := 255; - Color^.rgbGreen := 255; - Color^.rgbBlue := 255; - Color^.rgbReserved := 0; - end; - ftPal4, ftPal4A: - begin - FStride := (AWidth + 1) shr 1; - GetMem(BitmapInfo, SizeOf(TBitmapInfoHeader) + 16 * SizeOf(RGBQUAD)); - BitmapInfo^.bmiHeader.biClrUsed := 0; - end; - ftPal8, ftPal8A: - begin - FStride := AWidth; - GetMem(BitmapInfo, SizeOf(TBitmapInfoHeader) + 256 * SizeOf(RGBQUAD)); - BitmapInfo^.bmiHeader.biClrUsed := 0; - end; - else - begin - FStride := AWidth * (FormatTypeBPPTable[APixelFormat.FormatType] shr 3); - GetMem(BitmapInfo, SizeOf(TBitmapInfoHeader)); - BitmapInfo^.bmiHeader.biClrUsed := 0; - end; - end; - // The stride is always a multiple of 4 - FStride := (FStride + 3) and not 3; - - with BitmapInfo^.bmiHeader do - begin - biSize := SizeOf(TBitmapInfoHeader); - biWidth := AWidth; - biHeight := AHeight; - biPlanes := 1; - biBitCount := FormatTypeBPPTable[APixelFormat.FormatType]; - biCompression := 0; - biSizeImage := 4 * AHeight * AWidth; - biXPelsPerMeter := 0; - biYPelsPerMeter := 0; - biClrImportant := 0; - end; - - FData := nil; - - TempDC := GetDC(0); - FHandle := Windows.CreateDIBSection(TempDC, BitmapInfo^, DIB_RGB_COLORS, FData, 0, 0); - ReleaseDC(0, TempDC); - - FreeMem(BitmapInfo); -end; - - -destructor TGDIBitmap.Destroy; -begin - if Handle <> 0 then - Windows.DeleteObject(Handle); - inherited Destroy; -end; - - -procedure TGDIBitmap.Lock(out AData: Pointer; out AStride: LongWord); -begin - ASSERT(not IsLocked); - IsLocked := True; - AData := Data; - AStride := Stride; - {$ifndef wince} - Windows.GdiFlush; - {$endif} -end; - -procedure TGDIBitmap.Unlock; -begin - ASSERT(IsLocked); - IsLocked := False; -end; - - -{ TGDIScreen } - -procedure TGDIScreen.SetMousePos(const NewPos: TPoint); -begin - Windows.SetCursorPos(NewPos.x, NewPos.y); -end; - -function TGDIScreen.GetMousePos: TPoint; -var - Pos: Windows.TPoint; -begin - Windows.GetCursorPos(Pos); - - Result.x := Pos.x; - Result.y := Pos.y; -end; - -constructor TGDIScreen.Create; -begin - inherited Create; - -end; - -function TGDIScreen.CreateBitmapCanvas(AWidth, AHeight: Integer - ): TFCustomCanvas; -var - TempDC: HDC; -begin - TempDC := Windows.GetDC(0); - Result := TGDIBitmapCanvas.Create( - Windows.CreateCompatibleBitmap(TempDC, AWidth, AHeight), AWidth, AHeight); - Windows.ReleaseDC(0, TempDC); -end; - -function TGDIScreen.CreateMonoBitmapCanvas(AWidth, AHeight: Integer): TFCustomCanvas; -var - TempDC: HDC; -begin - TempDC := Windows.CreateCompatibleDC(0); - Result := TGDIBitmapCanvas.Create( - Windows.CreateCompatibleBitmap(TempDC, AWidth, AHeight), AWidth, AHeight); - Windows.DeleteDC(TempDC); -end; - -{ TGDIApplication } - -constructor TGDIApplication.Create; -begin - inherited Create; - -end; - - -{ It´s not the job of the Application object to clean up undestroyed forms - This can generate crashes } -destructor TGDIApplication.Destroy; -begin - inherited Destroy; -end; - -procedure TGDIApplication.Initialize(ADisplayName: String); -begin - -end; - -procedure TGDIApplication.Run; -var - Msg: TMsg; -begin - inherited Run; - - while Windows.GetMessage(@Msg, 0, 0, 0) and - (not (QuitWhenLastWindowCloses and (Forms.Count = 0))) and - (DoBreakRun = False) do - begin - Windows.TranslateMessage(@msg); - Windows.DispatchMessage(@msg); - end; - - DoBreakRun := False; -end; - - -procedure TGDIApplication.Quit; -begin - DoBreakRun := True; -end; - - -{ TGDIWindow } - -function fpGFXWindowProc(hwnd: HWND; uMsg: UINT; wParam: WPARAM; - lParam: LPARAM): LRESULT; stdcall; -var - Window: TGDIWindow; - PaintStruct: TPaintStruct; - r: TRect; -begin - Result := 0; - - if uMsg = WM_CREATE then - begin - Window := TGDIWindow(PCreateStruct(lParam)^.lpCreateParams); - Window.FHandle := hwnd; - Windows.SetWindowLong(hwnd, GWL_USERDATA, LongWord(Window)); - end else - Window := TGDIWindow(Windows.GetWindowLong(hwnd, GWL_USERDATA)); - - if Assigned(Window) then - begin - case uMsg of - { Messages } - WM_CREATE: - begin - Window.EvCreate(); - end; - WM_DESTROY: - begin - if Window.Handle <> 0 then Window.Free; - end; - WM_GetMinMaxInfo: - begin - if Window.FMinSize.cx > 0 then - PMinMaxInfo(lParam)^.ptMinTrackSize.x := Window.FMinSize.cx; - if Window.FMinSize.cy > 0 then - PMinMaxInfo(lParam)^.ptMinTrackSize.y := Window.FMinSize.cy; - if Window.FMaxSize.cx > 0 then - PMinMaxInfo(lParam)^.ptMaxTrackSize.x := Window.FMaxSize.cx; - if Window.FMaxSize.cy > 0 then - PMinMaxInfo(lParam)^.ptMaxTrackSize.y := Window.FMaxSize.cy; - end; - WM_Activate: - begin - if wParam = WA_INACTIVE then Window.EvFocusOut() - else Window.EvFocusIn(); - end; - WM_Paint: - begin - Windows.BeginPaint(Window.Handle, @PaintStruct); - Window.FPaintStruct := PaintStruct; - Window.EvInternalPaint(); - Windows.EndPaint(Window.Handle, @PaintStruct); - end; - WM_ShowWindow: - begin - if wParam <> 0 then - begin - Window.EvFocusIn(); - - Window.EvShow(); - - GFApplication.AddWindow(Window); - end - else - begin - Window.EvHide(); - - GFApplication.RemoveWindow(Window); - end; - end; - WM_Move: - begin - if (LoWord(lParam) <> Window.Left) or (HiWord(lParam) <> Window.Top) then - begin - Window.FLeft := LoWord(lParam); - Window.FTop := HiWord(lParam); - - Window.EvMove(); - end; - end; - WM_Size: - begin - if (LoWord(lParam) <> Window.ClientWidth) or (HiWord(lParam) <> Window.ClientHeight) then - begin - Windows.GetWindowRect(Window.Handle, @r); - Window.FWidth := r.Right - r.Left; - Window.FHeight := r.Bottom - r.Top; - Windows.GetClientRect(Window.Handle, @r); - Window.FClientWidth := LoWord(lParam); - Window.FClientHeight := HiWord(lParam); - - Window.EvResize(); - end; - end; - { Input messages } - WM_LButtonDown: - begin - if Window.FMouseInWindow and not Window.FHasFocus then - Windows.SetActiveWindow(Window.Handle); - - if Window.DoMouseEnterLeaveCheck(uMsg, wParam, lParam) then - begin - Window.EvMousePressed(mbLeft, - Point(LoWord(lparam), HiWord(lParam))); - end; - end; - WM_LButtonUp: - begin - if Window.DoMouseEnterLeaveCheck(uMsg, wParam, lParam) then - begin - Window.EvMouseReleased(mbLeft, - Point(LoWord(lparam), HiWord(lParam))); - end; - end; - WM_RButtonDown: - begin - if Window.FMouseInWindow and not Window.FHasFocus then - Windows.SetActiveWindow(Window.Handle); - - if Window.DoMouseEnterLeaveCheck(uMsg, wParam, lParam) then - begin - Window.EvMousePressed(mbRight, - Point(LoWord(lparam), HiWord(lParam))); - end; - end; - WM_RButtonUp: - begin - if Window.DoMouseEnterLeaveCheck(uMsg, wParam, lParam) then - begin - Window.EvMouseReleased(mbRight, - Point(LoWord(lparam), HiWord(lParam))); - end; - end; - WM_MButtonDown: - begin - if Window.FMouseInWindow and not Window.FHasFocus then - Windows.SetActiveWindow(Window.Handle); - - if Window.DoMouseEnterLeaveCheck(uMsg, wParam, lParam) then - begin - Window.EvMousePressed(mbMiddle, - Point(LoWord(lparam), HiWord(lParam))); - end; - end; - WM_MButtonUp: - begin - if Window.DoMouseEnterLeaveCheck(uMsg, wParam, lParam) then - begin - Window.EvMouseReleased(mbMiddle, - Point(LoWord(lparam), HiWord(lParam))); - end; - end; - WM_MouseMove: - begin - if Window.DoMouseEnterLeaveCheck(uMsg, wParam, lParam) then - begin - Window.EvMouseMove(Point(LoWord(lParam), HiWord(lParam))); - end; - end; - WM_MouseWheel: - begin - if Window.DoMouseEnterLeaveCheck(uMsg, wParam, lParam) then - begin -// Windows.ScreenToClient(Handle, @pt); - Window.EvMouseWheel( - SmallInt(HiWord(wParam)) / -120.0, - Point(LoWord(lparam), HiWord(lparam)) - ); - end; - end; - WM_KeyDown, WM_SysKeyDown: - begin - Window.EvKeyPressed(VirtKeyToKeycode(wParam)); - - if (wParam = $2e {VK_DELETE}) then Window.EvKeyChar(#127); - end; - WM_KeyUp, WM_SysKeyUp: - begin - Window.EvKeyReleased(VirtKeyToKeycode(wParam)); - end; - WM_Char, WM_SysChar: - begin - Window.EvKeyChar(Chr(wParam)); - end; - else - if UnicodeEnabledOS then Result := Windows.DefWindowProcW(hwnd, uMsg, wParam, lParam) - else Result := Windows.DefWindowProc(hwnd, uMsg, wParam, lParam); - end; - end - else - if UnicodeEnabledOS then Result := Windows.DefWindowProcW(hwnd, uMsg, wParam, lParam) - else Result := Windows.DefWindowProc(hwnd, uMsg, wParam, lParam); -end; - - -constructor TGDIWindow.Create(AParent: TFCustomWindow; AWindowOptions: TFWindowOptions); -begin - inherited Create(AParent, AWindowOptions); - - CreateWindow; - - { Creates the Canvas } - - FCanvas := TGDICanvas.Create(); -end; - - -destructor TGDIWindow.Destroy; -var - OldHandle: HWND; -begin - if Assigned(OnClose) then - OnClose(Self); - - Canvas.Free; - - if Handle <> 0 then - begin - OldHandle := Handle; - FHandle := 0; - Windows.DestroyWindow(OldHandle); - end; - - GFApplication.RemoveWindow(Self); - - // Are we the last window for our owning application? - if (GFApplication.QuitWhenLastWindowCloses and (GFApplication.Forms.Count = 0)) then - Windows.PostQuitMessage(0); - - inherited Destroy; -end; - - -procedure TGDIWindow.SetPosition(const APosition: TPoint); -begin - Windows.SetWindowPos(Handle, 0, APosition.x, APosition.y, 0, 0, - SWP_NOSIZE or SWP_NOZORDER); -end; - - -procedure TGDIWindow.SetSize(const ASize: TSize); -begin - if (ASize.cx <> Width) or (ASize.cy <> Height) then - Windows.SetWindowPos(Handle, 0, 0, 0, ASize.cx, ASize.cy, - SWP_NOMOVE or SWP_NOZORDER); -end; - - -procedure TGDIWindow.SetMinMaxSize(const AMinSize, AMaxSize: TSize); -begin - FMinSize := AMinSize; - FMaxSize := AMaxSize; - UpdateWindowButtons; -end; - - -procedure TGDIWindow.SetClientSize(const ASize: TSize); -var - r: Windows.Rect; -begin - if (ASize.cx <> ClientWidth) or (ASize.cx <> ClientHeight) then - begin - r.Left := 0; - r.Top := 0; - r.Right := ASize.cx; - r.Bottom := ASize.cy; - Windows.AdjustWindowRectEx(@r, FWindowStyle, False, FWindowStyleEx); - SetSize(Size(WinRectToRect(r))); - end; -end; - - -procedure TGDIWindow.SetMinMaxClientSize(const AMinSize, AMaxSize: TSize); -var - Rect: Windows.Rect; -begin - Rect.Left := 0; - Rect.Top := 0; - Rect.Right := AMinSize.cx; - Rect.Bottom := AMinSize.cy; - Windows.AdjustWindowRectEx(@Rect, FWindowStyle, False, FWindowStyleEx); - if AMinSize.cx > 0 then - FMinSize.cx := Rect.Right - Rect.Left - else - FMinSize.cx := 0; - if AMinSize.cy > 0 then - FMinSize.cy := Rect.Bottom - Rect.Top - else - FMinSize.cy := 0; - - Rect.Left := 0; - Rect.Top := 0; - Rect.Right := AMaxSize.cx; - Rect.Bottom := AMaxSize.cy; - Windows.AdjustWindowRectEx(@Rect, FWindowStyle, False, FWindowStyleEx); - if AMaxSize.cx > 0 then - FMaxSize.cx := Rect.Right - Rect.Left - else - FMaxSize.cx := 0; - if AMaxSize.cy > 0 then - FMaxSize.cy := Rect.Bottom - Rect.Top - else - FMaxSize.cy := 0; - - UpdateWindowButtons; -end; - - -procedure TGDIWindow.Show; -var - i: integer; -begin - Windows.ShowWindow(Handle, SW_SHOWNORMAL); - Windows.UpdateWindow(Handle); - Windows.SetForegroundWindow(Handle); - - { Show all child windows } - for i := 0 to Pred(ChildWindows.Count) do - TGDIWindow(ChildWindows.Items[i]).Show; -end; - -procedure TGDIWindow.Hide; -var - i: integer; -begin - Windows.ShowWindow(Handle, SW_HIDE); - - { Hide all child windows } - for i := 0 to Pred(ChildWindows.Count) do - TGDIWindow(ChildWindows.Items[i]).Hide; -end; - -{ Invalidates the entire window } -procedure TGDIWindow.Invalidate; -begin - Windows.InvalidateRect(Handle, nil, True); -end; - - -procedure TGDIWindow.CaptureMouse; -begin - if FHasMouseCapture then - exit; - - FHasMouseCapture := True; - - if not FMouseInWindow then - begin - FMouseInWindow := True; - Windows.SetCapture(Handle); - end; -end; - - -procedure TGDIWindow.ReleaseMouse; -begin - if FHasMouseCapture then - begin - FHasMouseCapture := False; - if not FMouseInWindow then - begin - Windows.ReleaseCapture; - end; - end; -end; - -procedure TGDIWindow.EvCreate; -begin - if Assigned(OnCreate) then OnCreate(Self); -end; - -procedure TGDIWindow.EvFocusIn; -begin - FHasFocus := True; - if Assigned(OnFocusIn) then OnFocusIn(Self); -end; - -procedure TGDIWindow.EvFocusOut; -begin - FHasFocus := False; - if Assigned(OnFocusOut) then OnFocusOut(Self); -end; - -procedure TGDIWindow.EvHide; -begin - if Assigned(OnHide) then OnHide(Self); -end; - -procedure TGDIWindow.EvKeyPressed(AKey: Word); -var - vEvent: TFEvent; -begin - if GetRootWindow().FocusedWindow = Self then - begin - if Assigned(OnKeyPressed) then OnKeyPressed(Self, AKey, GetKeyboardShiftState); - end - else - begin - vEvent.EventType := etKeyPressed; - vEvent.Key := AKey; - GetRootWindow().FocusedWindow.ProcessEvent(vEvent); - end; -end; - -procedure TGDIWindow.EvKeyReleased(AKey: Word); -var - vEvent: TFEvent; -begin - if GetRootWindow().FocusedWindow = Self then - begin - if Assigned(OnKeyReleased) then OnKeyReleased(Self, AKey, GetKeyboardShiftState); - end - else - begin - vEvent.EventType := etKeyReleased; - vEvent.Key := AKey; - GetRootWindow().FocusedWindow.ProcessEvent(vEvent); - end; -end; - -procedure TGDIWindow.EvKeyChar(AKeyChar: Char); -var - vEvent: TFEvent; -begin - if GetRootWindow().FocusedWindow = Self then - begin - if Assigned(OnKeyChar) then OnKeyChar(Self, AKeyChar); - end - else - begin - vEvent.EventType := etKeyChar; - vEvent.KeyChar := AKeyChar; - GetRootWindow().FocusedWindow.ProcessEvent(vEvent); - end; -end; - -procedure TGDIWindow.EvMouseEnter(const AMousePos: TPoint); -var - vEvent: TFEvent; -begin - if Assigned(OnMouseEnter) then - OnMouseEnter(Self, GetKeyboardShiftState, AMousePos) - else if Assigned(Parent) then - begin - vEvent.EventType := etMouseEnter; - vEvent.MousePos := AMousePos; - Parent.ProcessEvent(vEvent); - end; -end; - -procedure TGDIWindow.EvMouseLeave; -var - vEvent: TFEvent; -begin - if Assigned(OnMouseLeave) then OnMouseLeave(Self) - else if Assigned(Parent) then - begin - vEvent.EventType := etMouseLeave; - Parent.ProcessEvent(vEvent); - end; -end; - -procedure TGDIWindow.EvMousePressed(AButton: TMouseButton; - const AMousePos: TPoint); -var - vEvent: TFEvent; -begin - { Defines focus } - if FFocusable then GetRootWindow().FocusedWindow := Self; - - { Processes the event } - if Assigned(OnMousePressed) then - OnMousePressed(Self, AButton, GetKeyboardShiftState, AMousePos); -{ else if Assigned(Parent) then - begin - vEvent.EventType := etMousePressed; - vEvent.MousePos := AMousePos; - vEvent.MouseButton := AButton; - Parent.ProcessEvent(vEvent); - end; } -end; - -procedure TGDIWindow.EvMouseReleased(AButton: TMouseButton; - const AMousePos: TPoint); -var - vEvent: TFEvent; -begin - if Assigned(OnMouseReleased) then - OnMouseReleased(Self, AButton, GetKeyboardShiftState, AMousePos); -{ else if Assigned(Parent) then - begin - vEvent.EventType := etMouseReleased; - vEvent.MousePos := AMousePos; - vEvent.MouseButton := AButton; - Parent.ProcessEvent(vEvent); - end; } -end; - -procedure TGDIWindow.EvMouseMove(const AMousePos: TPoint); -var - vEvent: TFEvent; -begin - if Assigned(OnMouseMove) then - OnMouseMove(Self, GetKeyboardShiftState, AMousePos); -{ else if Assigned(Parent) then - begin - vEvent.EventType := etMouseMove; - vEvent.MousePos := AMousePos; - Parent.ProcessEvent(vEvent); - end; } -end; - -procedure TGDIWindow.EvMouseWheel(AWheelDelta: Single; const AMousePos: TPoint); -var - vEvent: TFEvent; -begin - if Assigned(OnMouseWheel) then - OnMouseWheel(Self, GetKeyboardShiftState, AWheelDelta, AMousePos); -{ else if Assigned(Parent) then - begin - vEvent.EventType := etMouseMove; - vEvent.WheelDelta := AWheelDelta; - vEvent.MousePos := AMousePos; - Parent.ProcessEvent(vEvent); - end;} -end; - -{ Because the painting code is executed on the middle of the processing - of the event, we have an internal paint method, which allows descending - objects to override the EvPaint function like they would do with other - event functions. - - This frees the OnPaint event for use by the users of the components } -procedure TGDIWindow.EvInternalPaint; -var - rect: TRect; - OldBitmap, NewBitmap: HBITMAP; - hdcMem: HDC; -begin - rect := FPaintStruct.rcPaint; - - { It is necessary to create a bitmap and select it to implement - double buffering. If we just create a DC and don't select a bitmap, - there is no memory where to store the painting } - - hdcMem := CreateCompatibleDC(FPaintStruct.hdc); - - NewBitmap := Windows.CreateCompatibleBitmap(FPaintStruct.hdc, Width, Height); - - OldBitmap := HBITMAP(SelectObject(hdcMem, NewBitmap)); - - FCanvas.SetHandle(hdcMem); - - { Execution of user paint code } - - EvPaint; - - { Flushes the result to the screen } - - Windows.BitBlt( - FPaintStruct.hdc, // handle to destination DC - rect.Left, // x-coord of destination upper-left corner - rect.Top, // y-coord of destination upper-left corner - rect.Left + rect.Right, // width of destination rectangle - rect.Top + rect.Bottom, // height of destination rectangle - FCanvas.Handle, // handle to source DC - rect.Left, // x-coordinate of source upper-left corner - rect.Top, // y-coordinate of source upper-left corner - SRCCOPY // raster operation code - ); - - { Clean up } - - SelectObject(hdcMem, OldBitmap); - DeleteDC(hdcMem); - DeleteObject(NewBitmap); - - { Resets the canvas handle } - - FCanvas.SetHandle(0); -end; - -procedure TGDIWindow.EvPaint; -begin - if Assigned(OnPaint) then OnPaint(Self); -end; - -procedure TGDIWindow.EvMove; -begin - if Assigned(OnMove) then OnMove(Self); -end; - -procedure TGDIWindow.EvResize; -begin - if Assigned(OnResize) then OnResize(Self); -end; - -procedure TGDIWindow.EvShow; -begin - if Assigned(OnShow) then OnShow(Self); -end; - -function TGDIWindow.GetTitle: String; -var - TextLen: Integer; - AnsiBuffer: string; - WideBuffer: WideString; -begin - if UnicodeEnabledOS then - begin - TextLen := Windows.GetWindowTextLengthW(Handle); - SetLength(WideBuffer, TextLen); - TextLen := Windows.GetWindowTextW(Handle, @WideBuffer[1], TextLen + 1); - SetLength(WideBuffer, TextLen); - Result := Utf8Encode(WideBuffer); - end - else - begin - TextLen := Windows.GetWindowTextLength(Handle); - SetLength(AnsiBuffer, TextLen); - TextLen := Windows.GetWindowText(Handle, @AnsiBuffer[1], TextLen + 1); - SetLength(AnsiBuffer, TextLen); - Result := AnsiToUtf8(AnsiBuffer); - end; -end; - -procedure TGDIWindow.SetTitle(const ATitle: String); -begin - {$ifdef wince} - Windows.SetWindowText(Handle, PWideChar(Utf8Decode(ATitle))) - {$else} - if UnicodeEnabledOS then - Windows.SetWindowTextW(Handle, PWideChar(Utf8Decode(ATitle))) - else Windows.SetWindowText(Handle, PChar(Utf8ToAnsi(ATitle))); - {$endif} -end; - - -procedure TGDIWindow.DoSetCursor; -const - CursorTable: array[TFCursor] of Integer = ( - 32512, // crDefault - 0, // crNone - 32512, // crArrow - 32515, // crCross - 32513, // crIBeam - 32646, // crSize - 32645, // crSizeNS - 32644, // crSizeWE - 32516, // crUpArrow - 32514, // crHourGlass - 32648, // crNoDrop - 32651); // crHelp -var - ID: Integer; -begin - if FMouseInWindow then - begin - ID := CursorTable[Cursor]; - if ID <> 0 then - Windows.SetCursor(Windows.LoadCursor(0, MAKEINTRESOURCE(ID))) - else - Windows.SetCursor(0); - end; -end; - -procedure TGDIWindow.DoSetWindowOptions; -begin - // implement me -end; - -function TGDIWindow.GetHandle: PtrUInt; -begin -// if FHandle = 0 then CreateWindow; - - Result := FHandle; -end; - -procedure TGDIWindow.CreateWindow; -var - ParentHandle: HWND; -begin - { Initialize a window class, if necessary } - if woWindow in WindowOptions then - begin - if UnicodeEnabledOS then - begin - if not Assigned(WindowClassW.lpfnWndProc) then - begin - WindowClassW.style := CS_HREDRAW or CS_VREDRAW; - WindowClassW.lpfnWndProc := WndProc(@fpGFXWindowProc); - WindowClassW.hInstance := MainInstance; - WindowClassW.hIcon := LoadIcon(0, IDI_APPLICATION); - WindowClassW.hCursor := LoadCursor(0, IDC_ARROW); - WindowClassW.hbrBackground := 0; - WindowClassW.lpszClassName := 'fpGFX'; - end; - Windows.RegisterClassW(@WindowClassW); - end - else - begin - if not Assigned(WindowClass.lpfnWndProc) then - begin - WindowClass.style := CS_HREDRAW or CS_VREDRAW; - WindowClass.lpfnWndProc := WndProc(@fpGFXWindowProc); - WindowClass.hInstance := MainInstance; - WindowClass.hIcon := LoadIcon(0, IDI_APPLICATION); - WindowClass.hCursor := LoadCursor(0, IDC_ARROW); - WindowClass.hbrBackground := 0; - WindowClass.lpszClassName := 'fpGFX'; - end; - Windows.RegisterClass(@WindowClass); - end; - end; - - if Assigned(FParent) then - ParentHandle := FParent.Handle - else - ParentHandle := 0; - - if not (woWindow in FWindowOptions) then FWindowStyle := WS_CHILD - else if (woBorderless in FWindowOptions) and (woPopUp in FWindowOptions) then FWindowStyle := WS_POPUP - else if woPopUp in FWindowOptions then FWindowStyle := WS_POPUPWINDOW - else if woToolWindow in FWindowOptions then FWindowStyle := WS_OVERLAPPEDWINDOW - else if woChildWindow in FWindowOptions then FWindowStyle := WS_CHILDWINDOW - else if woBorderless in FWindowOptions then FWindowStyle := WS_OVERLAPPED - else FWindowStyle := WS_OVERLAPPEDWINDOW; - - if not (woWindow in FWindowOptions) then FWindowStyleEx := 0 - else if woPopUp in FWindowOptions then FWindowStyleEx := WS_EX_TOOLWINDOW - else if woToolWindow in FWindowOptions then FWindowStyleEx := WS_EX_TOOLWINDOW - else FWindowStyleEx := WS_EX_APPWINDOW; - - if UnicodeEnabledOS then - FHandle := Windows.CreateWindowExW( - FWindowStyleEx, // extended window style - 'fpGFX', // registered class name - 'fpGFX Window', // window name - FWindowStyle, // window style - CW_USEDEFAULT, // horizontal position of window - CW_USEDEFAULT, // vertical position of window - CW_USEDEFAULT, // window width - CW_USEDEFAULT, // window height - ParentHandle, // handle to parent or owner window - 0, // menu handle or child identifier - MainInstance, // handle to application instance - Self) // window-creation data - else - FHandle := Windows.CreateWindowEx( - FWindowStyleEx, // extended window style - 'fpGFX', // registered class name - 'fpGFX Window', // window name - FWindowStyle, // window style - CW_USEDEFAULT, // horizontal position of window - CW_USEDEFAULT, // vertical position of window - CW_USEDEFAULT, // window width - CW_USEDEFAULT, // window height - ParentHandle, // handle to parent or owner window - 0, // menu handle or child identifier - MainInstance, // handle to application instance - Self); // window-creation data -end; - - -procedure TGDIWindow.UpdateWindowButtons; -var - CanMaximize: Boolean; -begin - if woWindow in FWindowOptions then - begin - CanMaximize := (FMaxSize.cx = 0) or (FMaxSize.cy = 0) or - (FMaxSize.cx > FMinSize.cx) or (FMaxSize.cy > FMinSize.cy); - - if CanMaximize and ((FWindowStyle and WS_MAXIMIZEBOX) = 0) then - FWindowStyle := FWindowStyle or WS_MAXIMIZEBOX - else if (not CanMaximize) and - ((FWindowStyle and WS_MAXIMIZEBOX) <> 0) then - FWindowStyle := FWindowStyle and not WS_MAXIMIZEBOX; - - Windows.SetWindowLong(Handle, GWL_STYLE, FWindowStyle or - (Windows.GetWindowLong(Handle, GWL_STYLE) and - (WS_MAXIMIZE or WS_MINIMIZE or WS_VISIBLE))); // preserver these bits! - end; -end; - -function TGDIWindow.DoMouseEnterLeaveCheck(uMsg, wParam, lParam: Cardinal): Boolean; - - function CursorInDifferentWindow: Boolean; - var - pt: Windows.POINT; - begin - pt.x := LoWord(lParam); - pt.y := HiWord(lParam); - - // only WM_MOUSEWHEEL uses screen coordinates!!! - if uMsg <> WM_MOUSEWHEEL then - Windows.ClientToScreen(Handle, @pt); - - Result := WindowFromPoint(pt) <> Handle; - end; - -var - pt: Windows.POINT; -begin - if not FMouseInWindow then - begin - FMouseInWindow := True; - DoSetCursor; - Windows.SetCapture(Handle); - EvMouseEnter(Point(LoWord(lparam), HiWord(lparam))); - Result := uMsg <> WM_MOUSEMOVE; - end - else - begin - pt.x := LoWord(lParam); - pt.y := HiWord(lParam); - if uMsg = WM_MOUSEWHEEL then - Windows.ScreenToClient(Handle, @pt); - if (pt.x < 0) or (pt.y < 0) or (pt.x >= ClientWidth) or - (pt.y >= ClientHeight) or CursorInDifferentWindow then - FMouseInWindow := False; - - if (not FHasMouseCapture) and (not FMouseInWindow) then - begin - Windows.ReleaseCapture; - EvMouseLeave; - Result := False; - end - else - Result := True; - end; -end; - -{ Helpers } - -function RectToWinRect(const ARect: TRect): Windows.Rect; -begin - Result.Left := ARect.Left; - Result.Top := ARect.Top; - Result.Right := ARect.Right; - Result.Bottom := ARect.Bottom; -end; - -function WinRectToRect(const ARect: Windows.Rect): TRect; -begin - Result.Left := ARect.Left; - Result.Top := ARect.Top; - Result.Right := ARect.Right; - Result.Bottom := ARect.Bottom; -end; - - -{$INCLUDE gdikeys.inc} - -initialization - -{$IFDEF WinCE} - - UnicodeEnabledOS := True; - -{$ELSE} - - WinVersion.dwOSVersionInfoSize := SizeOf(TOSVersionInfo); - GetVersionEx(WinVersion); - - UnicodeEnabledOS := (WinVersion.dwPlatformID = VER_PLATFORM_WIN32_NT) - or (WinVersion.dwPlatformID = VER_PLATFORM_WIN32_CE); -{$ENDIF} - -end. - diff --git a/gfx/gdi/gfxinterface.pas b/gfx/gdi/gfxinterface.pas deleted file mode 100644 index 938bab79..00000000 --- a/gfx/gdi/gfxinterface.pas +++ /dev/null @@ -1,39 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - GFXInterface - Default target selection unit for Windows GDI target - - Copyright (C) 2000 - 2006 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. -} -unit GFXInterface; - -interface - -uses GFX_GDI; - -type - - TDefFont = TGDIFont; - - TDefCanvas = TGDICanvas; - - TDefBitmap = TGDIBitmap; - - TDefScreen = TGDIScreen; - - TDefApplication = TGDIApplication; - - TDefWindow = TGDIWindow; - -implementation - -end. - diff --git a/gfx/geldirty.pas b/gfx/geldirty.pas deleted file mode 100644 index 398e3ca9..00000000 --- a/gfx/geldirty.pas +++ /dev/null @@ -1,195 +0,0 @@ -{ - fpGUI - Free Pascal Graphical User Interface - - GelDirty - Window dirty list (redrawing queue) - - Copyright (C) 2000 - 2006 See the file AUTHORS, included in this - distribution, for details of the copyright. - - See the file COPYING.modifiedLGPL, included in this distribution, - for details about the copyright. - - 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. -} -unit GELDirty; - -{$IFDEF Debug} - {$ASSERTIONS On} -{$ENDIF} - -{$ifdef fpc} - {$mode objfpc}{$H+} -{$endif} - -interface -uses - Classes, - GfxBase; // fpGFX units - - -type - - PDirtyListEntry = ^TDirtyListEntry; - TDirtyListEntry = record - Prev, Next: PDirtyListEntry; - Window: TFCustomWindow; - Rect: TRect; - end; - - - TDirtyList = class - private - FFirst, FLast: PDirtyListEntry; - protected - procedure RemoveEntry(AEntry: PDirtyListEntry); - public - destructor Destroy; override; - procedure AddRect(AWindow: TFCustomWindow; const ARect: TRect); - procedure ClearQueueForWindow(AWindow: TFCustomWindow); - procedure PaintQueueForWindow(AWindow: TFCustomWindow); - procedure PaintAll; - property First: PDirtyListEntry read FFirst write FFirst; // !!! - end; - - -implementation - - -destructor TDirtyList.Destroy; -var - Entry, NextEntry: PDirtyListEntry; -begin - Entry := FFirst; - while Assigned(Entry) do - begin - NextEntry := Entry^.Next; - Dispose(Entry); - Entry := NextEntry; - end; - inherited Destroy; -end; - - -procedure TDirtyList.AddRect(AWindow: TFCustomWindow; const ARect: TRect); -var - Entry, NextEntry: PDirtyListEntry; -begin - // Check for empty or invalid update rectangle - if (ARect.Left >= ARect.Right) or (ARect.Top >= ARect.Bottom) or - (ARect.Right < 0) or (ARect.Top < 0) or - (ARect.Left >= AWindow.ClientWidth) or - (ARect.Top >= AWindow.ClientHeight) then - exit; - - { Check if the new rectangle is already contained in some other rectangle - in the dirty list for the same window } - Entry := FFirst; - while Assigned(Entry) do - begin - NextEntry := Entry^.Next; - with Entry^.Rect do - if AWindow = Entry^.Window then - if (ARect.Left >= Left) and (ARect.Top >= Top) and - (ARect.Right <= Right) and (ARect.Bottom <= Bottom) then - // Rectangle is already contained in dirt list -> do nothing - exit - else if (Left >= ARect.Left) and (Top >= ARect.Top) and - (Right <= ARect.Right) and (Bottom <= ARect.Bottom) then - begin - // The new rectangle contains the currently checked rectangle - Entry^.Rect := ARect; - exit; - end; - Entry := NextEntry; - end; - - - // If we got this far, then we really have to add the rectangle to our list - - New(Entry); - Entry^.Window := AWindow; - Entry^.Rect := ARect; - Entry^.Next := nil; - - if Assigned(FFirst) then - begin - Entry^.Prev := FLast; - FLast^.Next := Entry; - FLast := Entry; - end else - begin - Entry^.Prev := nil; - FFirst := Entry; - FLast := Entry; - end; -end; - - -procedure TDirtyList.ClearQueueForWindow(AWindow: TFCustomWindow); -var - Entry, NextEntry: PDirtyListEntry; -begin - Entry := FFirst; - while Assigned(Entry) do - begin - NextEntry := Entry^.Next; - if Entry^.Window = AWindow then - RemoveEntry(Entry); - Entry := NextEntry; - end; -end; - - -procedure TDirtyList.PaintQueueForWindow(AWindow: TFCustomWindow); -var - IsNotEmpty: Boolean; - Entry, NextEntry: PDirtyListEntry; -begin - IsNotEmpty := False; - AWindow.Canvas.SaveState; - AWindow.Canvas.EmptyClipRect; - - Entry := First; - while Assigned(Entry) do - begin - NextEntry := Entry^.Next; - if Entry^.Window = AWindow then - begin - IsNotEmpty := AWindow.Canvas.UnionClipRect(Entry^.Rect); - RemoveEntry(Entry); - end; - Entry := NextEntry; - end; - - if IsNotEmpty and Assigned(AWindow.OnPaint) then - AWindow.OnPaint(AWindow); - - AWindow.Canvas.RestoreState; -end; - - -procedure TDirtyList.PaintAll; -begin - while Assigned(FFirst) do - PaintQueueForWindow(FFirst^.Window); -end; - - -procedure TDirtyList.RemoveEntry(AEntry: PDirtyListEntry); -begin - if Assigned(AEntry^.Prev) then - AEntry^.Prev^.Next := AEntry^.Next - else - FFirst := AEntry^.Next; - if Assigned(AEntry^.Next) then - AEntry^.Next^.Prev := AEntry^.Prev - else - FLast := AEntry^.Prev; - Dispose(AEntry); -end; - - -end. - diff --git a/gfx/gelimage.pas b/gfx/gelimage.pas deleted file mode 100644 index b03c64ff..00000000 --- a/gfx/gelimage.pas +++ /dev/null @@ -1,440 +0,0 @@ -{ - fpGUI - Free Pascal Graphical User Interface - - GelImage - X11 image conversion routines - - Copyright (C) 2000 - 2006 See the file AUTHORS, included in this - distribution, for details of the copyright. - - See the file COPYING.modifiedLGPL, included in this distribution, - for details about the copyright. - - 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. -} -unit GELImage; - -{$IFDEF Debug} - {$ASSERTIONS On} -{$ENDIF} - -{$ifdef fpc} - {$mode objfpc}{$H+} -{$endif} - -interface - -uses - Classes, - GfxBase; - - -procedure ConvertImage( - ASourceRect: TRect; ASourceFormat: TGfxPixelFormat; ASourcePal: TGfxPalette; - ASourceData: Pointer; ASourceStride: LongWord; - ADestX, ADestY: Integer; ADestFormat: TGfxPixelFormat; - ADestData: Pointer; ADestStride: LongWord); - -procedure FlipMonoImageBits( - ASourceRect: TRect; ASourceData: Pointer; ASourceStride: LongWord; - ADestX, ADestY: Integer; ADestData: Pointer; ADestStride: LongWord); - - -implementation - -type - TConvertParams = record - RedShiftR, RedShiftL, - GreenShiftR, GreenShiftL, - BlueShiftR, BlueShiftL: Byte; - RedMask, GreenMask, BlueMask: LongWord; - RedMult, GreenMult, BlueMult: Word; - Palette: array[0..255] of LongWord; - end; - - TConvertToInternalProc = procedure(Params: TConvertParams; Data: Pointer; - StartX, EndX: Integer; Dest: Pointer); - - TConvertFromInternalProc = procedure(Params: TConvertParams; Data: Pointer; - Dest: Pointer; Width: Integer); - - -procedure ConvertMonoToInternal(Params: TConvertParams; Data: Pointer; - StartX, EndX: Integer; Dest: Pointer); -var - Mask: Byte; -begin - Inc(Data, StartX shr 3); - Mask := 1 shl (7 - StartX and 7); - while StartX < EndX do - begin - PLongWord(Dest)^ := Params.Palette[Ord((PByte(Data)^ and Mask) <> 0)]; - if Mask = 1 then - begin - Inc(Data); - Mask := 128; - end else - Mask := Mask shr 1; - Inc(StartX); - Inc(Dest, 4); - end; -end; - -procedure ConvertPal4ToInternal(Params: TConvertParams; Data: Pointer; - StartX, EndX: Integer; Dest: Pointer); -var - b: Byte; -begin - // !!!: Just works for even StartX and EndX values - ASSERT((StartX and 1) = 0); - ASSERT((EndX and 1) = 0); - Inc(Data, StartX shr 1); - while StartX < EndX do - begin - b := PByte(Data)^; - PLongWord(Dest)[0] := Params.Palette[b shr 4]; - PLongWord(Dest)[1] := Params.Palette[b and 15]; - Inc(StartX, 2); - Inc(Data); - Inc(Dest, 8); - end; -end; - -procedure ConvertPal8ToInternal(Params: TConvertParams; Data: Pointer; - StartX, EndX: Integer; Dest: Pointer); -begin - Inc(Data, StartX); - while StartX < EndX do - begin - PLongWord(Dest)^ := Params.Palette[PByte(Data)^]; - Inc(StartX); - Inc(Data); - Inc(Dest, 4); - end; -end; - -procedure ConvertRGB16ToInternal(Params: TConvertParams; Data: Pointer; - StartX, EndX: Integer; Dest: Pointer); -var - PixelIn: LongWord; -begin - Inc(Data, StartX * 2); - while StartX < EndX do - begin - PixelIn := 0; - Move(Data^, PixelIn, 2); - PLongWord(Dest)^ := - (((PixelIn shr Params.RedShiftR) and $ff) shl Params.RedShiftL) or - (((PixelIn shr Params.GreenShiftR) and $ff) shl Params.GreenShiftL) or - (((PixelIn shr Params.BlueShiftR) and $ff) shl Params.BlueShiftL); - Inc(StartX); - Inc(Data, 4); - Inc(Dest, 2); - end; -end; - -procedure ConvertRGB24ToInternal(Params: TConvertParams; Data: Pointer; - StartX, EndX: Integer; Dest: Pointer); -var - PixelIn: LongWord; -begin - Inc(Data, StartX * 3); - while StartX < EndX do - begin - PixelIn := 0; - Move(Data^, PixelIn, 3); - PLongWord(Dest)^ := - (((PixelIn shr Params.RedShiftR) and $ff) shl Params.RedShiftL) or - (((PixelIn shr Params.GreenShiftR) and $ff) shl Params.GreenShiftL) or - (((PixelIn shr Params.BlueShiftR) and $ff) shl Params.BlueShiftL); - Inc(StartX); - Inc(Data, 4); - Inc(Dest, 3); - end; -end; - -procedure ConvertRGB32ToInternal(Params: TConvertParams; Data: Pointer; - StartX, EndX: Integer; Dest: Pointer); -var - PixelIn: LongWord; -begin - Inc(Data, StartX * 4); - while StartX < EndX do - begin - PixelIn := PLongWord(Data)^; - PLongWord(Dest)^ := - (((PixelIn shr Params.RedShiftR) and $ff) shl Params.RedShiftL) or - (((PixelIn shr Params.GreenShiftR) and $ff) shl Params.GreenShiftL) or - (((PixelIn shr Params.BlueShiftR) and $ff) shl Params.BlueShiftL); - Inc(StartX); - Inc(Data, 4); - Inc(Dest, 4); - end; -end; - - -procedure ConvertInternalToRGB16(Params: TConvertParams; Data: Pointer; - Dest: Pointer; Width: Integer); -var - PixelIn: LongWord; -begin - repeat - PixelIn := PLongWord(Data)^; - PWord(Dest)^ := - (((PixelIn and $0000ff) shr Params.RedShiftR) shl Params.RedShiftL) or - (((PixelIn and $00ff00) shr Params.GreenShiftR) shl Params.GreenShiftL) or - (((PixelIn and $ff0000) shr Params.BlueShiftR) shl Params.BlueShiftL); - - Inc(Data, 4); - Inc(Dest, 2); - Dec(Width); - until Width = 0; -end; - -procedure ConvertInternalToRGB24(Params: TConvertParams; Data: Pointer; - Dest: Pointer; Width: Integer); -var - PixelIn, PixelOut: LongWord; -begin - repeat - PixelIn := PLongWord(Data)^; - PixelOut := - (((PixelIn and $0000ff) shr Params.RedShiftR) shl Params.RedShiftL) or - (((PixelIn and $00ff00) shr Params.GreenShiftR) shl Params.GreenShiftL) or - (((PixelIn and $ff0000) shr Params.BlueShiftR) shl Params.BlueShiftL); - PWord(Dest)^ := Word(PixelOut); - PByte(Dest)[2] := PixelOut shr 16; - - Inc(Data, 4); - Inc(Dest, 3); - Dec(Width); - until Width = 0; -end; - -procedure ConvertInternalToRGB32(Params: TConvertParams; Data: Pointer; - Dest: Pointer; Width: Integer); -var - PixelIn: LongWord; -begin - repeat - PixelIn := PLongWord(Data)^; - PLongWord(Dest)^ := - (((PixelIn and $0000ff) shr Params.RedShiftR) shl Params.RedShiftL) or - (((PixelIn and $00ff00) shr Params.GreenShiftR) shl Params.GreenShiftL) or - (((PixelIn and $ff0000) shr Params.BlueShiftR) shl Params.BlueShiftL); - - Inc(Data, 4); - Inc(Dest, 4); - Dec(Width); - until Width = 0; -end; - - -function GetBitShiftAndCount(Mask: LongWord; var Shift: Byte): Integer; -begin - Shift := 0; - while (Mask and 1) = 0 do - begin - Mask := Mask shr 1; - Inc(Shift); - end; - Result := 0; - while Mask > 0 do - begin - Mask := Mask shr 1; - Inc(Result); - end; -end; - -procedure SetupShifts(PixelFormat: TGfxPixelFormat; var Params: TConvertParams); -begin - Params.RedShiftR := 8 - - GetBitShiftAndCount(PixelFormat.RedMask, Params.RedShiftL); - Params.GreenShiftR := 16 - - GetBitShiftAndCount(PixelFormat.GreenMask, Params.GreenShiftL); - Params.BlueShiftR := 24 - - GetBitShiftAndCount(PixelFormat.BlueMask, Params.BlueShiftL); -end; - -procedure ConvertImage( - ASourceRect: TRect; ASourceFormat: TGfxPixelFormat; ASourcePal: TGfxPalette; - ASourceData: Pointer; ASourceStride: LongWord; - ADestX, ADestY: Integer; ADestFormat: TGfxPixelFormat; - ADestData: Pointer; ADestStride: LongWord); - - // returns the highest processed index - function ConvertPalette(MaxIndex: Integer; - var Params: TConvertParams): Integer; - var - i: Integer; - begin - Assert(MaxIndex = MaxIndex); // removes compiler warning - if Assigned(ASourcePal) then - begin - Result := ASourcePal.EntryCount - 1; - if Result > 255 then - Result := 255; - for i := 0 to Result do - with ASourcePal.Entries[i] do - Params.Palette[i] := - (Red div 257) or - ((Green div 257) shl 8) or - ((Blue div 257) shl 16); - end else - Result := -1; - end; - -var - ParamsS2I, ParamsI2D: TConvertParams; // Source to internal, internal to dest - ConvertToInternal: TConvertToInternalProc; - ConvertFromInternal: TConvertFromInternalProc; - Scanline: Pointer; - i, max, w, y: Integer; -begin - Assert(ADestX = ADestX); // removes compiler warning - Assert(ADestY = AdestY); - Scanline := nil; - ParamsI2D.BlueShiftL := 0; - ParamsS2I.BlueShiftL := 0; - - { To avoid converting at all, everything must be equal: - The Alpha, Red, Green and Blue Mask and not only the Format Type } -{ if ASourceFormat.FormatType = ADestFormat.FormatType then - begin - Move( ASourceData^, ADestData^, ADestStride * (ASourceRect.Top - ASourceRect.Bottom) ); - Exit; - end;} - - case ASourceFormat.FormatType of - ftMono: - begin - ConvertToInternal := @ConvertMonoToInternal; - max := ConvertPalette(1, ParamsS2I); - if max < 1 then - begin - ParamsS2I.Palette[1] := $ffffff; - if max < 0 then - ParamsS2I.Palette[0] := 0; - end; - end; - ftPal4, ftPal4A: - begin - ConvertToInternal := @ConvertPal4ToInternal; - max := ConvertPalette(15, ParamsS2I); - for i := max + 1 to 15 do - ParamsS2I.Palette[i] := 0; - end; - ftPal8, ftPal8A: - begin - ConvertToInternal := @ConvertPal8ToInternal; - max := ConvertPalette(255, ParamsS2I); - for i := max + 1 to 255 do - ParamsS2I.Palette[i] := i or (i shl 8) or (i shl 16); - end; - ftRGB16: - begin - ConvertToInternal := @ConvertRGB16ToInternal; - ParamsS2I.RedShiftR := 5 - - GetBitShiftAndCount(ASourceFormat.RedMask, ParamsS2I.RedShiftL); - ParamsS2I.GreenShiftR := 11 - - GetBitShiftAndCount(ASourceFormat.GreenMask, ParamsS2I.GreenShiftL); - ParamsS2I.BlueShiftR := 16 - - GetBitShiftAndCount(ASourceFormat.BlueMask, ParamsS2I.BlueShiftL); - end; - ftRGB24: - begin - ConvertToInternal := @ConvertRGB24ToInternal; - SetupShifts(ASourceFormat, ParamsS2I); - end; - ftRGB32: - begin - ConvertToInternal := @ConvertRGB32ToInternal; - SetupShifts(ASourceFormat, ParamsS2I); - end; - else - raise EGfxUnsupportedPixelFormat.Create(ASourceFormat); - end; - - case ADestFormat.FormatType of - ftRGB16: - begin - ConvertFromInternal := @ConvertInternalToRGB16; - ParamsI2D.RedShiftR := 5 - - GetBitShiftAndCount(ADestFormat.RedMask, ParamsI2D.RedShiftL); - ParamsI2D.GreenShiftR := 11 - - GetBitShiftAndCount(ADestFormat.GreenMask, ParamsI2D.GreenShiftL); - ParamsI2D.BlueShiftR := 16 - - GetBitShiftAndCount(ADestFormat.BlueMask, ParamsI2D.BlueShiftL); - end; - ftRGB24: - begin - ConvertFromInternal := @ConvertInternalToRGB24; - SetupShifts(ADestFormat, ParamsI2D); - end; - ftRGB32: - begin - ConvertFromInternal := @ConvertInternalToRGB32; - SetupShifts(ADestFormat, ParamsI2D); - end; - else - raise EGfxUnsupportedPixelFormat.Create(ADestFormat); - end; - - w := ASourceRect.Right - ASourceRect.Left; - GetMem(Scanline, w * SizeOf(TGfxPixel)); - for y := ASourceRect.Top to ASourceRect.Bottom - 1 do - begin - ConvertToInternal(ParamsS2I, ASourceData, - ASourceRect.Left, ASourceRect.Right, Scanline); - Inc(ASourceData, ASourceStride); - ConvertFromInternal(ParamsI2D, Scanline, ADestData, w); - Inc(ADestData, ADestStride); - end; - FreeMem(Scanline); -end; - - -procedure FlipMonoImageBits( - ASourceRect: TRect; ASourceData: Pointer; ASourceStride: LongWord; - ADestX, ADestY: Integer; ADestData: Pointer; ADestStride: LongWord); -const - BitFlipTable: array[Byte] of Byte = ( - $00, $80, $40, $C0, $20, $A0, $60, $E0, $10, $90, $50, $D0, $30, $B0, $70, $F0, - $08, $88, $48, $C8, $28, $A8, $68, $E8, $18, $98, $58, $D8, $38, $B8, $78, $F8, - $04, $84, $44, $C4, $24, $A4, $64, $E4, $14, $94, $54, $D4, $34, $B4, $74, $F4, - $0C, $8C, $4C, $CC, $2C, $AC, $6C, $EC, $1C, $9C, $5C, $DC, $3C, $BC, $7C, $FC, - $02, $82, $42, $C2, $22, $A2, $62, $E2, $12, $92, $52, $D2, $32, $B2, $72, $F2, - $0A, $8A, $4A, $CA, $2A, $AA, $6A, $EA, $1A, $9A, $5A, $DA, $3A, $BA, $7A, $FA, - $06, $86, $46, $C6, $26, $A6, $66, $E6, $16, $96, $56, $D6, $36, $B6, $76, $F6, - $0E, $8E, $4E, $CE, $2E, $AE, $6E, $EE, $1E, $9E, $5E, $DE, $3E, $BE, $7E, $FE, - $01, $81, $41, $C1, $21, $A1, $61, $E1, $11, $91, $51, $D1, $31, $B1, $71, $F1, - $09, $89, $49, $C9, $29, $A9, $69, $E9, $19, $99, $59, $D9, $39, $B9, $79, $F9, - $05, $85, $45, $C5, $25, $A5, $65, $E5, $15, $95, $55, $D5, $35, $B5, $75, $F5, - $0D, $8D, $4D, $CD, $2D, $AD, $6D, $ED, $1D, $9D, $5D, $DD, $3D, $BD, $7D, $FD, - $03, $83, $43, $C3, $23, $A3, $63, $E3, $13, $93, $53, $D3, $33, $B3, $73, $F3, - $0B, $8B, $4B, $CB, $2B, $AB, $6B, $EB, $1B, $9B, $5B, $DB, $3B, $BB, $7B, $FB, - $07, $87, $47, $C7, $27, $A7, $67, $E7, $17, $97, $57, $D7, $37, $B7, $77, $F7, - $0F, $8F, $4F, $CF, $2F, $AF, $6F, $EF, $1F, $9F, $5F, $DF, $3F, $BF, $7F, $FF); -var - StartByte, EndByte, x, y: Integer; -begin - Assert(ADestX = ADestX); // removes compiler warning - Assert(ADestY = AdestY); - - StartByte := ASourceRect.Left shr 3; - EndByte := (ASourceRect.Right + 7) shr 3; - Inc(ASourceData, StartByte); - Dec(EndByte, StartByte); - for y := ASourceRect.Top to ASourceRect.Bottom - 1 do - begin - for x := 0 to EndByte do - PByte(ADestData)[x] := BitFlipTable[PByte(ASourceData)[x]]; - Inc(ASourceData, ASourceStride); - Inc(ADestData, ADestStride); - end; -end; - -end. - - diff --git a/gfx/gfxbase.pas b/gfx/gfxbase.pas deleted file mode 100644 index 30abebae..00000000 --- a/gfx/gfxbase.pas +++ /dev/null @@ -1,1504 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - GFXBase - Abstract declarations to be implemented on each platform - - Copyright (C) 2000 - 2007 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. -} -unit GfxBase; - -{$IFDEF Debug} - {$ASSERTIONS On} -{$ENDIF} - -{$ifdef fpc} - {$mode objfpc}{$H+} -{$endif} - -interface - -uses - SysUtils, - Classes; - -{$INCLUDE keys.inc} - -resourcestring - // Exception message strings, to be used by target implementations - SUnsupportedPixelFormat = 'Pixel format (%d bits/pixel) is not supported'; - SIncompatibleCanvasForBlitting = 'Cannot blit from %s to %s'; - -type - - TSize = record - cx, cy: Integer; - end; - - - { We use a special 3x3 matrix for transformations of coordinates. As the - only allowed transformations are translations and scalations, we need a - matrix with the following content ([x,y] is a variable): - [0,0] 0 [2,0] - 0 [1,1] [2,1] - 0 0 1 - [0,0]: X scalation - [2,0]: X translation - [1,1]: Y scalation - [2,1]: Y translation - NOTE: This may change in the future! Don't assume anything about the - structure of TGfxMatrix! TGfxCanvas only allows you to read and - write the current transformation matrix so that the matrix can - easily be saved and restored. - } - - TGfxMatrix = record - _00, _20, _11, _21: Integer; - end; - -const - GfxIdentityMatrix: TGfxMatrix = (_00: 1; _20: 0; _11: 1; _21: 0); - -type - - TColor = type LongWord; - - PGfxColor = ^TGfxColor; - TGfxColor = packed record - Red, Green, Blue, Alpha: Byte; - end; - - PGfxPixel = ^TGfxPixel; - TGfxPixel = LongWord; - - - TGfxImageType = ( - ftInvalid, - ftMono, // Monochrome - ftPal4, // 4 bpp using palette - ftPal4A, // 4 bpp using palette with alpha values > 0 - ftPal8, // 8 bpp using palette - ftPal8A, // 8 bpp using palette with alpha values > 0 - ftRGB16, // 15/16 bpp RGB - ftRGBA16, // 16 bpp RGBA - ftRGB24, // 24 bpp RGB - ftRGB32, // 32 bpp RGB - ftRGBA32); // 32 bpp RGBA - - - TGfxPixelFormat = record - FormatType: TGfxImageType; - RedMask: TGfxPixel; - GreenMask: TGfxPixel; - BlueMask: TGfxPixel; - AlphaMask: TGfxPixel; - end; - - -const - - FormatTypeBPPTable: array[TGfxImageType] of Integer = - (0, 1, 4, 4, 8, 8, 16, 16, 24, 32, 32); - - { Predefined desktop colors } - - colTransparent: TGfxColor = (Red: $00; Green: $00; Blue: $00; Alpha: $ff); - colBlack: TGfxColor = (Red: $00; Green: $00; Blue: $00; Alpha: $00); - colBlue: TGfxColor = (Red: $00; Green: $00; Blue: $ff; Alpha: $00); - colGreen: TGfxColor = (Red: $00; Green: $ff; Blue: $00; Alpha: $00); - colCyan: TGfxColor = (Red: $00; Green: $ff; Blue: $ff; Alpha: $00); - colRed: TGfxColor = (Red: $ff; Green: $00; Blue: $00; Alpha: $00); - colMagenta: TGfxColor = (Red: $ff; Green: $00; Blue: $ff; Alpha: $00); - colYellow: TGfxColor = (Red: $ff; Green: $ff; Blue: $00; Alpha: $00); - colWhite: TGfxColor = (Red: $ff; Green: $ff; Blue: $ff; Alpha: $00); - colGray: TGfxColor = (Red: $80; Green: $80; Blue: $80; Alpha: $00); - colLtGray: TGfxColor = (Red: $c0; Green: $c0; Blue: $c0; Alpha: $00); - colDkBlue: TGfxColor = (Red: $00; Green: $00; Blue: $80; Alpha: $00); - colDkGreen: TGfxColor = (Red: $00; Green: $80; Blue: $00; Alpha: $00); - colDkCyan: TGfxColor = (Red: $00; Green: $80; Blue: $80; Alpha: $00); - colDkRed: TGfxColor = (Red: $80; Green: $00; Blue: $00; Alpha: $00); - colDkMagenta: TGfxColor = (Red: $80; Green: $00; Blue: $80; Alpha: $00); - colDkYellow: TGfxColor = (Red: $80; Green: $80; Blue: $00; Alpha: $00); - - { Predefined web colors } - - webBlack: TGfxColor = (Red: $00; Green: $00; Blue: $00; Alpha: $00); - webMaroon: TGfxColor = (Red: $80; Green: $00; Blue: $00; Alpha: $00); - webGreen: TGfxColor = (Red: $00; Green: $80; Blue: $00; Alpha: $00); - webOlive: TGfxColor = (Red: $80; Green: $80; Blue: $00; Alpha: $00); - webNavy: TGfxColor = (Red: $00; Green: $00; Blue: $80; Alpha: $00); - webPurple: TGfxColor = (Red: $80; Green: $00; Blue: $80; Alpha: $00); - webTeal: TGfxColor = (Red: $00; Green: $80; Blue: $80; Alpha: $00); - webGray: TGfxColor = (Red: $80; Green: $80; Blue: $80; Alpha: $00); - webSilver: TGfxColor = (Red: $c0; Green: $c0; Blue: $c0; Alpha: $00); - webRed: TGfxColor = (Red: $ff; Green: $00; Blue: $00; Alpha: $00); - webLime: TGfxColor = (Red: $00; Green: $ff; Blue: $00; Alpha: $00); - webYellow: TGfxColor = (Red: $ff; Green: $ff; Blue: $00; Alpha: $00); - webBlue: TGfxColor = (Red: $00; Green: $00; Blue: $ff; Alpha: $00); - webFuchsia: TGfxColor = (Red: $ff; Green: $00; Blue: $ff; Alpha: $00); - webAqua: TGfxColor = (Red: $00; Green: $ff; Blue: $ff; Alpha: $00); - webWhite: TGfxColor = (Red: $ff; Green: $ff; Blue: $ff; Alpha: $00); - - - // Some predefined pixel formats: - - PixelFormatMono: TGfxPixelFormat = ( - FormatType: ftMono; - RedMask: 0; - GreenMask: 0; - BlueMask: 0; - AlphaMask: 0); - - PixelFormatPal4: TGfxPixelFormat = ( - FormatType: ftPal4; - RedMask: 0; - GreenMask: 0; - BlueMask: 0; - AlphaMask: 0); - - PixelFormatPal4A: TGfxPixelFormat = ( - FormatType: ftPal4A; - RedMask: 0; - GreenMask: 0; - BlueMask: 0; - AlphaMask: 0); - - PixelFormatPal8: TGfxPixelFormat = ( - FormatType: ftPal8; - RedMask: 0; - GreenMask: 0; - BlueMask: 0; - AlphaMask: 0); - - PixelFormatPal8A: TGfxPixelFormat = ( - FormatType: ftPal8A; - RedMask: 0; - GreenMask: 0; - BlueMask: 0; - AlphaMask: 0); - - { Windows requires this particular order for RGB images } - - { 5-6-5 storage } - PixelFormatRGB16: TGfxPixelFormat = ( - FormatType: ftRGB16; - RedMask: $F800; - GreenMask: $07E0; - BlueMask: $001F; - AlphaMask: 0); - - PixelFormatRGB24: TGfxPixelFormat = ( - FormatType: ftRGB24; - RedMask: $ff0000; - GreenMask: $00ff00; - BlueMask: $0000ff; - AlphaMask: 0); - - PixelFormatRGB32: TGfxPixelFormat = ( - FormatType: ftRGB32; - RedMask: $ff0000; - GreenMask: $00ff00; - BlueMask: $0000ff; - AlphaMask: 0); - - PixelFormatRGBA32: TGfxPixelFormat = ( - FormatType: ftRGB32; - RedMask: $00ff0000; - GreenMask: $0000ff00; - BlueMask: $000000ff; - AlphaMask: $ff000000); - -type - - EGfxError = class(Exception); - - EGfxUnsupportedPixelFormat = class(EGfxError) - constructor Create(const APixelFormat: TGfxPixelFormat); - end; - - - TFCustomBitmap = class; - TFCustomApplication = class; - TFCustomWindow = class; - - TFWindowOption = ( - woWindow, woBorderless, woPopup, woToolWindow, woChildWindow, - woX11SkipWMHints, woModal); - TFWindowOptions = set of TFWindowOption; - - TFCursor = (crDefault, crNone, crArrow, crCross, crIBeam, crSize, crSizeNS, - crSizeWE, cpUpArrow, crHourGlass, crNoDrop, crHelp); - - TMouseButton = (mbLeft, mbRight, mbMiddle); - - { TFEvent } - - TFEventType = (etCreate, etCanClose, etClose, etFocusIn, etFocusOut, - etHide, etKeyPressed, etKeyReleased, etKeyChar, - etMouseEnter, etMouseLeave, etMousePressed, etMouseReleased, - etMouseMove, etMouseWheel, etPaint, etMove, etResize, etShow); - - TFEvent = record - EventType: TFEventType; - { Key fields } - Key: Word; - KeyChar: Char; - { Mouse fields } - MousePos: TPoint; - MouseButton: TMouseButton; - WheelDelta: Single; - end; - - { TFCustomFont } - - TGfxFontClass = (fcSerif, fcSansSerif, fcTypewriter, fcDingbats); - - TFCustomFont = class - protected - FHandle: Cardinal; - public - class function GetDefaultFontName(const AFontClass: TGfxFontClass): String; virtual; - property Handle: Cardinal read FHandle; - end; - - - { TGfxPalette } - - TGfxPalette = class - private - FRefCount: LongInt; - FEntryCount: Integer; - FEntries: PGfxColor; - function GetEntry(AIndex: Integer): TGfxColor; - public - constructor Create(AEntryCount: Integer; AEntries: PGfxColor); - destructor Destroy; override; - procedure AddRef; - procedure Release; - property EntryCount: Integer read FEntryCount; - property Entries[AIndex: Integer]: TGfxColor read GetEntry; - end; - - - { TFCustomCanvas } - - TGfxLineStyle = (lsSolid, lsDot); - - TFCustomCanvas = class(TObject) - private - FMatrix: TGfxMatrix; - protected - FWidth: Integer; - FHeight: Integer; - FHandle: Cardinal; - FPixelFormat: TGfxPixelFormat; - FColor: TGfxColor; - function DoExcludeClipRect(const ARect: TRect): Boolean; virtual; abstract; - function DoIntersectClipRect(const ARect: TRect): Boolean; virtual; abstract; - function DoUnionClipRect(const ARect: TRect): Boolean; virtual; abstract; - function DoGetClipRect: TRect; virtual; abstract; - procedure DoDrawArc(const ARect: TRect; StartAngle, EndAngle: Single); virtual; abstract; - procedure DoDrawCircle(const ARect: TRect); virtual; abstract; - procedure DoDrawLine(const AFrom, ATo: TPoint); virtual; abstract; - procedure DoDrawRect(const ARect: TRect); virtual; - procedure DoDrawPoint(const APoint: TPoint); virtual; abstract; - procedure DoFillRect(const ARect: TRect); virtual; abstract; - procedure DoFillTriangle(const P1, P2, P3: TPoint); virtual; abstract; - procedure DoTextOut(const APosition: TPoint; const AText: String); virtual; abstract; - procedure DoCopyRect(ASource: TFCustomCanvas; const ASourceRect: TRect; const ADestPos: TPoint); virtual; abstract; - procedure DoMaskedCopyRect(ASource, AMask: TFCustomCanvas; const ASourceRect: TRect; const AMaskPos, ADestPos: TPoint); virtual; abstract; - procedure DoDrawImageRect(AImage: TFCustomBitmap; ASourceRect: TRect; const ADestPos: TPoint); virtual; abstract; - public - constructor Create; virtual; - procedure SetHandle(AHandle: PtrUInt); virtual; abstract; - // Transformations - function Transform(APoint: TPoint): TPoint; - function Transform(ARect: TRect): TRect; - function ReverseTransform(APoint: TPoint): TPoint; - function ReverseTransform(ARect: TRect): TRect; - procedure AppendTranslation(ADelta: TPoint); - - // Graphics state - procedure SaveState; virtual; abstract; - procedure RestoreState; virtual; abstract; - procedure EmptyClipRect; virtual; - procedure DoSetColor(AColor: TGfxPixel); virtual; abstract; - procedure SetColor(AColor: TGfxColor); virtual; - procedure SetFont(AFont: TFCustomFont); virtual; abstract; - procedure SetLineStyle(ALineStyle: TGfxLineStyle); virtual; abstract; - function ExcludeClipRect(const ARect: TRect): Boolean; - function IntersectClipRect(const ARect: TRect): Boolean; - function UnionClipRect(const ARect: TRect): Boolean; - function GetClipRect: TRect; - function MapColor(const AColor: TGfxColor): TGfxPixel; virtual; abstract; - function GetColor: TGfxColor; - - // Drawing functions - procedure DrawArc(const ARect: TRect; StartAngle, EndAngle: Single); - procedure DrawCircle(const ARect: TRect); - procedure DrawLine(const AFrom, ATo: TPoint); overload; - procedure DrawLine(const X1, Y1, X2, Y2: Integer); overload; - procedure DrawPolyLine(const Coords: array of TPoint); virtual; - procedure DrawRect(const ARect: TRect); - procedure DrawPoint(const APoint: TPoint); - procedure FillRect(const ARect: TRect); - procedure FillTriangle(const P1, P2, P3: TPoint); - - // Fonts - function FontCellHeight: Integer; virtual; abstract; - function TextExtent(const AText: String): TSize; virtual; - function TextWidth(const AText: String): Integer; virtual; - procedure TextOut(const APosition: TPoint; const AText: String); -// procedure TextRect(Rect: TRect; X, Y: Integer; const Text: WideString; TextFlags: Integer = 0); - - // Bit block transfers - procedure Copy(ASource: TFCustomCanvas; const ADestPos: TPoint); virtual; - procedure CopyRect(ASource: TFCustomCanvas; const ASourceRect: TRect; const ADestPos: TPoint); - procedure MaskedCopy(ASource, AMask: TFCustomCanvas; const ADestPos: TPoint); -{!!!: procedure MaskedCopyRect(ASource, AMask: TGfxCanvas; const ASourceRect: TRect; - const ADestPos: TPoint); virtual;} - procedure MaskedCopyRect(ASource, AMask: TFCustomCanvas; const ASourceRect: TRect; const AMaskPos, ADestPos: TPoint); - - // Image drawing - procedure DrawImage(AImage: TFCustomBitmap; const ADestPos: TPoint); - procedure DrawImageRect(AImage: TFCustomBitmap; ASourceRect: TRect; const ADestPos: TPoint); - - // Properties - property Width: Integer read FWidth; - property Height: Integer read FHeight; - property PixelFormat: TGfxPixelFormat read FPixelFormat; - property Matrix: TGfxMatrix read FMatrix write FMatrix; - property Handle: Cardinal read FHandle; - end; - - { TFCustomBitmap } - - TFCustomBitmap = class(TObject) - private - FWidth, FHeight: Integer; - FPixelFormat: TGfxPixelFormat; - FPalette: TGfxPalette; - procedure SetPalette(APalette: TGfxPalette); - protected - FHandle: Cardinal; - FStride: LongWord; - FData: Pointer; - public - constructor Create(AWidth, AHeight: Integer; APixelFormat: TGfxPixelFormat); virtual; - destructor Destroy; override; - procedure Lock(out AData: Pointer; out AStride: LongWord); virtual; abstract; - procedure Unlock; virtual; abstract; - procedure SetPixelsFromData(AData: Pointer; AStride: LongWord); - property Width: Integer read FWidth; - property Height: Integer read FHeight; - property PixelFormat: TGfxPixelFormat read FPixelFormat; - property Palette: TGfxPalette read FPalette write SetPalette; - property Handle: Cardinal read FHandle; - property Data: Pointer read FData; - property Stride: LongWord read FStride; - end; - - { TFCustomScreen } - - TFCustomScreen = class(TObject) - protected - procedure SetMousePos(const NewPos: TPoint); virtual; abstract; - function GetMousePos: TPoint; virtual; abstract; - public - constructor Create; virtual; - function CreateBitmapCanvas(AWidth, AHeight: Integer): TFCustomCanvas; virtual; abstract; - function CreateMonoBitmapCanvas(AWidth, AHeight: Integer): TFCustomCanvas; virtual; abstract; - property MousePos: TPoint read GetMousePos write SetMousePos; - end; - - { TFCustomApplication } - - TFCustomApplication = class(TComponent) - private - FOnIdle: TNotifyEvent; - FQuitWhenLastWindowCloses: Boolean; - protected - FDisplayName: String; - DoBreakRun: Boolean; - FTitle: String; - procedure SetTitle(const ATitle: String); - public - Forms: TList; - { Default methods } - constructor Create; virtual; overload; - destructor Destroy; override; - procedure AddWindow(AWindow: TFCustomWindow); virtual; - procedure RemoveWindow(AWindow: TFCustomWindow); virtual; - procedure Initialize(ADisplayName: String = ''); virtual; abstract; - procedure Run; virtual; - procedure Quit; virtual; abstract; - { Properties } - property OnIdle: TNotifyEvent read FOnIdle write FOnIdle; - property QuitWhenLastWindowCloses: Boolean read FQuitWhenLastWindowCloses write FQuitWhenLastWindowCloses; - property Title: String read FTitle write SetTitle; - end; - - - { TFCustomWindow } - - // Lifetime handling - TGfxCanCloseEvent = function(Sender: TObject): Boolean of object; - // Keyboard - TGfxKeyEvent = procedure(Sender: TObject; AKey: Word; AShift: TShiftState) of object; - TGfxKeyCharEvent = procedure(Sender: TObject; AKeyChar: Char) of object; - // Mouse - TGfxMouseButtonEvent = procedure(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint) of object; - TGfxMouseMoveEvent = procedure(Sender: TObject; AShift: TShiftState; const AMousePos: TPoint) of object; - TGfxMouseWheelEvent = procedure(Sender: TObject; AShift: TShiftState; AWheelDelta: Single; const AMousePos: TPoint) of object; - // Painting - TGfxPaintEvent = procedure(Sender: TObject; const ARect: TRect) of object; - - - TFCustomWindow = class(TObject) - private - FCursor: TFCursor; - FOnCreate: TNotifyEvent; - FOnCanClose: TGfxCanCloseEvent; - FOnClose: TNotifyEvent; - FOnFocusIn: TNotifyEvent; - FOnFocusOut: TNotifyEvent; - FOnHide: TNotifyEvent; - FOnKeyPressed: TGfxKeyEvent; - FOnKeyReleased: TGfxKeyEvent; - FOnKeyChar: TGfxKeyCharEvent; - FOnMouseEnter: TGfxMouseMoveEvent; - FOnMouseLeave: TNotifyEvent; - FOnMousePressed: TGfxMouseButtonEvent; - FOnMouseReleased: TGfxMouseButtonEvent; - FOnMouseMove: TGfxMouseMoveEvent; - FOnMouseWheel: TGfxMouseWheelEvent; - FOnPaint: TNotifyEvent; - FOnMove: TNotifyEvent; - FOnResize: TNotifyEvent; - FOnShow: TNotifyEvent; - FVisible: Boolean; - { Property setting methods mapped to other methods } - procedure SetClientHeight(const AValue: Integer); - procedure SetClientWidth(const AValue: Integer); - procedure SetCursor(ACursor: TFCursor); - procedure SetHeight(AHeight: Integer); - procedure SetLeft(const AValue: Integer); - procedure SetTop(const AValue: Integer); - procedure SetVisible(const AValue: Boolean); - procedure SetWidth(AWidth: Integer); - procedure SetWindowOptions(const AValue: TFWindowOptions); - protected - { Fields related to properties } - FParent: TFCustomWindow; - FCanvas: TFCustomCanvas; - FLeft: Integer; - FTop: Integer; - FWidth: Integer; - FHeight: Integer; - FClientWidth: Integer; - FClientHeight: Integer; - FWindowOptions: TFWindowOptions; - FMinSize, FMaxSize: TSize; - FFocusable: Boolean; - - { Fields of the child windows list } - FChildWindows: TList; - FFocusedWindow: TFCustomWindow; - - { Internal resource allocation methods } - procedure DoSetCursor; virtual; abstract; - procedure DoSetWindowOptions; virtual; abstract; - function GetHandle: PtrUInt; virtual; abstract; - procedure CreateWindow; virtual; abstract; - - { Event processing methods } - procedure EvCreate; virtual; abstract; - procedure EvFocusIn; virtual; abstract; - procedure EvFocusOut; virtual; abstract; - procedure EvHide; virtual; abstract; - procedure EvKeyPressed(AKey: Word); virtual; abstract; - procedure EvKeyReleased(AKey: Word); virtual; abstract; - procedure EvKeyChar(AKeyChar: Char); virtual; abstract; - procedure EvMouseEnter(const AMousePos: TPoint); virtual; abstract; - procedure EvMouseLeave; virtual; abstract; - procedure EvMousePressed(AButton: TMouseButton; const AMousePos: TPoint); virtual; abstract; - procedure EvMouseReleased(AButton: TMouseButton; const AMousePos: TPoint); virtual; abstract; - procedure EvMouseMove(const AMousePos: TPoint); virtual; abstract; - procedure EvMouseWheel(AWheelDelta: Single; const AMousePos: TPoint); virtual; abstract; - procedure EvPaint; virtual; abstract; - procedure EvMove; virtual; abstract; - procedure EvResize; virtual; abstract; - procedure EvShow; virtual; abstract; - public - { Constructors / Destructors } - constructor Create(AParent: TFCustomWindow; AWindowOptions: TFWindowOptions); virtual; - destructor Destroy; override; - { Widget controling methods } - function CanClose: Boolean; virtual; - function GetTitle: String; virtual; - procedure SetTitle(const ATitle: String); virtual; - procedure SetPosition(const APosition: TPoint); virtual; abstract; - procedure SetSize(const ASize: TSize); virtual; abstract; - procedure SetMinMaxSize(const AMinSize, AMaxSize: TSize); virtual; abstract; - procedure SetClientSize(const ASize: TSize); virtual; abstract; - procedure SetMinMaxClientSize(const AMinSize, AMaxSize: TSize); virtual; abstract; - procedure Show; virtual; abstract; - procedure Hide; virtual; abstract; - procedure Invalidate; virtual; abstract; - procedure CaptureMouse; virtual; abstract; - procedure ReleaseMouse; virtual; abstract; - { Event processing methods } - procedure ProcessEvent(AEvent: TFEvent); - { Methods of the child windows list } - function GetRootWindow: TFCustomWindow; - - { Properties } - property WindowOptions: TFWindowOptions read FWindowOptions write SetWindowOptions; - property Canvas: TFCustomCanvas read FCanvas; - property Handle: PtrUInt read GetHandle; - { Properties of the child windows list } - property ChildWindows: TList read FChildWindows; - property FocusedWindow: TFCustomWindow read FFocusedWindow write FFocusedWindow; - { Window state } - property ClientWidth: Integer read FClientWidth write SetClientWidth; - property ClientHeight: Integer read FClientHeight write SetClientHeight; - property Cursor: TFCursor read FCursor write SetCursor; - property Left: Integer read FLeft write SetLeft; - property Top: Integer read FTop write SetTop; - property Width: Integer read FWidth write SetWidth; - property Height: Integer read FHeight write SetHeight; - property Title: String read GetTitle write SetTitle; - property Parent: TFCustomWindow read FParent; - property Visible: Boolean read FVisible write SetVisible; - property Focusable: Boolean read FFocusable write FFocusable; - { Event handlers } - property OnCreate: TNotifyEvent read FOnCreate write FOnCreate; - property OnCanClose: TGfxCanCloseEvent read FOnCanClose write FOnCanClose; - property OnClose: TNotifyEvent read FOnClose write FOnClose; - property OnFocusIn: TNotifyEvent read FOnFocusIn write FOnFocusIn; - property OnFocusOut: TNotifyEvent read FOnFocusOut write FOnFocusOut; - property OnHide: TNotifyEvent read FOnHide write FOnHide; - property OnKeyPressed: TGfxKeyEvent read FOnKeyPressed write FOnKeyPressed; - property OnKeyReleased: TGfxKeyEvent read FOnKeyReleased write FOnKeyReleased; - property OnKeyChar: TGfxKeyCharEvent read FOnKeyChar write FOnKeyChar; - property OnMouseEnter: TGfxMouseMoveEvent read FOnMouseEnter write FOnMouseEnter; - property OnMouseLeave: TNotifyEvent read FOnMouseLeave write FOnMouseLeave; - property OnMousePressed: TGfxMouseButtonEvent read FOnMousePressed write FOnMousePressed; - property OnMouseReleased: TGfxMouseButtonEvent read FOnMouseReleased write FOnMouseReleased; - property OnMouseMove: TGfxMouseMoveEvent read FOnMouseMove write FOnMouseMove; - property OnMouseWheel: TGfxMouseWheelEvent read FOnMouseWheel write FOnMouseWheel; - property OnPaint: TNotifyEvent read FOnPaint write FOnPaint; - property OnMove: TNotifyEvent read FOnMove write FOnMove; - property OnResize: TNotifyEvent read FOnResize write FOnResize; - property OnShow: TNotifyEvent read FOnShow write FOnShow; - end; - -// Some helpers: - -// Sizes, points etc. -function Size(AWidth, AHeight: Integer): TSize; -function Size(ARect: TRect): TSize; -function PtInRect(const ARect: TRect; const APoint: TPoint): Boolean; - -{$ifdef fpc} -operator = (const ASize1, ASize2: TSize) b: Boolean; -operator + (const APoint1, APoint2: TPoint) p: TPoint; -operator + (const APoint: TPoint; ASize: TSize) p: TPoint; -operator + (const ASize: TSize; APoint: TPoint) s: TSize; -operator + (const ASize1, ASize2: TSize) s: TSize; -operator + (const APoint: TPoint; i: Integer) p: TPoint; -operator + (const ASize: TSize; i: Integer) s: TSize; -operator - (const APoint1, APoint2: TPoint) p: TPoint; -operator - (const APoint: TPoint; i: Integer) p: TPoint; -operator - (const ASize: TSize; const APoint: TPoint) s: TSize; -operator - (const ASize: TSize; i: Integer) s: TSize; - -// Colors -operator = (const AColor1, AColor2: TGfxColor) b: Boolean; -{$endif} -function GetAvgColor(const AColor1, AColor2: TGfxColor): TGfxColor; -function GetGfxColor(const ARed, AGreen, ABlue, AAlpha: Byte): TGfxColor; -function GfxColorToTColor(const AColor: TGfxColor): TColor; - - -// Keyboard -function KeycodeToText(Key: Word; ShiftState: TShiftState): String; - -implementation - -uses - CommandLineParams - ; - - -{ Exceptions } - -constructor EGfxUnsupportedPixelFormat.Create(const - APixelFormat: TGfxPixelFormat); -begin - inherited CreateFmt(SUnsupportedPixelFormat, - [FormatTypeBPPTable[APixelFormat.FormatType]]); -end; - -{ TFCustomFont } - -class function TFCustomFont.GetDefaultFontName(const AFontClass: TGfxFontClass): String; -const - FontNames: array[TGfxFontClass] of String = ( - 'times', 'helvetica', 'courier', 'dingbats'); -begin - Result := FontNames[AFontClass]; -end; - -{ TGfxPalette } - -destructor TGfxPalette.Destroy; -begin - if Assigned(FEntries) then - FreeMem(FEntries); - inherited Destroy; -end; - -procedure TGfxPalette.AddRef; -begin - Inc(FRefCount); -end; - -procedure TGfxPalette.Release; -begin - if FRefCount <= 0 then - Free - else - Dec(FRefCount); -end; - -constructor TGfxPalette.Create(AEntryCount: Integer; AEntries: PGfxColor); -begin - inherited Create; - FEntryCount := AEntryCount; - GetMem(FEntries, EntryCount * SizeOf(TGfxColor)); - if Assigned(AEntries) then - Move(AEntries^, FEntries^, EntryCount * SizeOf(TGfxColor)); -end; - -function TGfxPalette.GetEntry(AIndex: Integer): TGfxColor; -begin - if (AIndex >= 0) and (AIndex < EntryCount) then - Result := FEntries[AIndex] - else - Result := colBlack; -end; - - -{ TFCustomCanvas } - -constructor TFCustomCanvas.Create; -begin - inherited Create; - Matrix := GfxIdentityMatrix; - FColor := colBlack; -end; - -function TFCustomCanvas.Transform(APoint: TPoint): TPoint; -begin - Result.x := Matrix._00 * APoint.x + Matrix._20; - Result.y := Matrix._11 * APoint.y + Matrix._21; -end; - -function TFCustomCanvas.Transform(ARect: TRect): TRect; -begin - Result.Left := Matrix._00 * ARect.Left + Matrix._20; - Result.Top := Matrix._11 * ARect.Top + Matrix._21; - Result.Right := Matrix._00 * ARect.Right + Matrix._20; - Result.Bottom := Matrix._11 * ARect.Bottom + Matrix._21; -end; - -function TFCustomCanvas.ReverseTransform(APoint: TPoint): TPoint; -begin - Result.x := (APoint.x - Matrix._20) div Matrix._00; - Result.y := (APoint.y - Matrix._21) div Matrix._11; -end; - -function TFCustomCanvas.ReverseTransform(ARect: TRect): TRect; -begin - Result.Left := (ARect.Left - Matrix._20) div Matrix._00; - Result.Top := (ARect.Top - Matrix._21) div Matrix._11; - Result.Right := (ARect.Right - Matrix._20) div Matrix._00; - Result.Bottom := (ARect.Bottom - Matrix._21) div Matrix._11; -end; - -procedure TFCustomCanvas.AppendTranslation(ADelta: TPoint); -begin - // Append a translation to the existing transformation matrix - Inc(FMatrix._20, FMatrix._00 * ADelta.x); - Inc(FMatrix._21, FMatrix._11 * ADelta.y); -end; - -procedure TFCustomCanvas.EmptyClipRect; -begin - IntersectClipRect(Rect(0, 0, 0, 0)); -end; - -function TFCustomCanvas.ExcludeClipRect(const ARect: TRect): Boolean; -var - Rect: TRect; -begin - Rect := Transform(ARect); - if (Rect.Right > Rect.Left) and (Rect.Bottom > Rect.Top) then - Result := DoExcludeClipRect(Rect) - else - Result := False; -end; - -function TFCustomCanvas.IntersectClipRect(const ARect: TRect): Boolean; -var - Rect: TRect; -begin - Rect := Transform(ARect); - if (Rect.Right > Rect.Left) and (Rect.Bottom > Rect.Top) then - Result := DoIntersectClipRect(Rect) - else - Result := False; -end; - -function TFCustomCanvas.UnionClipRect(const ARect: TRect): Boolean; -var - Rect: TRect; -begin - Rect := Transform(ARect); - if (Rect.Right > Rect.Left) and (Rect.Bottom > Rect.Top) then - Result := DoUnionClipRect(Rect) - else - with GetClipRect do - Result := (Right > Left) and (Bottom > Top); -end; - -function TFCustomCanvas.GetClipRect: TRect; -begin - Result := ReverseTransform(DoGetClipRect); -end; - -function TFCustomCanvas.GetColor: TGfxColor; -begin - result := FColor; -end; - -procedure TFCustomCanvas.SetColor(AColor: TGfxColor); -begin - FColor := AColor; - DoSetColor(MapColor(AColor)); -end; - -procedure TFCustomCanvas.DrawArc(const ARect: TRect; StartAngle, EndAngle: Single); -begin - DoDrawArc(Transform(ARect), StartAngle, EndAngle); -end; - -procedure TFCustomCanvas.DrawCircle(const ARect: TRect); -begin - DoDrawCircle(Transform(ARect)); -end; - -procedure TFCustomCanvas.DrawLine(const AFrom, ATo: TPoint); -begin - DoDrawLine(Transform(AFrom), Transform(ATo)); -end; - -procedure TFCustomCanvas.DrawLine(const X1, Y1, X2, Y2: Integer); -begin - DrawLine(Point(X1, Y1), Point(X2, Y2)); -end; - -procedure TFCustomCanvas.DrawPolyLine(const Coords: array of TPoint); -var - i: Integer; -begin - for i := Low(Coords) to High(Coords) do - DrawLine(Coords[i], Coords[i + 1]); -end; - -procedure TFCustomCanvas.DoDrawRect(const ARect: TRect); -begin -{ DrawPolyLine( - [ARect.TopLeft, - Point(ARect.Right - 1, ARect.Top), - Point(ARect.Right - 1, ARect.Bottom - 1), - Point(ARect.Left, ARect.Bottom - 1), - ARect.TopLeft]);} - DoDrawLine(ARect.TopLeft, Point(ARect.Right - 1, ARect.Top)); - DoDrawLine(Point(ARect.Right - 1, ARect.Top), Point(ARect.Right - 1, ARect.Bottom - 1)); - DoDrawLine(Point(ARect.Right - 1, ARect.Bottom - 1), Point(ARect.Left, ARect.Bottom - 1)); - DoDrawLine(Point(ARect.Left, ARect.Bottom - 1), ARect.TopLeft); -end; - -procedure TFCustomCanvas.DrawRect(const ARect: TRect); -var - r: TRect; -begin - r := Transform(ARect); - if (r.Right > r.Left) and (r.Bottom > r.Top) then - DoDrawRect(r); -end; - -procedure TFCustomCanvas.DrawPoint(const APoint: TPoint); -begin - DoDrawPoint(Transform(APoint)); -end; - -procedure TFCustomCanvas.FillRect(const ARect: TRect); -var - r: TRect; -begin - r := Transform(ARect); - if (r.Right > r.Left) and (r.Bottom > r.Top) then - DoFillRect(r); -end; - -procedure TFCustomCanvas.FillTriangle(const P1, P2, P3: TPoint); -begin - DoFillTriangle(P1, P2, P3); -end; - -function TFCustomCanvas.TextExtent(const AText: String): TSize; -begin - Result.cx := TextWidth(AText); - Result.cy := FontCellHeight; -end; - -function TFCustomCanvas.TextWidth(const AText: String): Integer; -begin - Result := TextExtent(AText).cx; -end; - -procedure TFCustomCanvas.TextOut(const APosition: TPoint; const AText: String); -begin - DoTextOut(Transform(APosition), AText); -end; - -procedure TFCustomCanvas.Copy(ASource: TFCustomCanvas; const ADestPos: TPoint); -begin - ASSERT(Assigned(ASource)); - CopyRect(ASource, Rect(0, 0, ASource.Width, ASource.Height), ADestPos); -end; - -procedure TFCustomCanvas.CopyRect(ASource: TFCustomCanvas; const ASourceRect: TRect; - const ADestPos: TPoint); -var - SourceRect: TRect; -begin - SourceRect := ASource.Transform(ASourceRect); - with SourceRect do - if (Left >= Right) or (Top >= Bottom) then - exit; - - DoCopyRect(ASource, SourceRect, Transform(ADestPos)); -end; - -procedure TFCustomCanvas.MaskedCopy(ASource, AMask: TFCustomCanvas; - const ADestPos: TPoint); -begin - MaskedCopyRect(ASource, AMask, Rect(0, 0, ASource.Width, ASource.Height), - Point(0, 0), ADestPos); -end; - -procedure TFCustomCanvas.MaskedCopyRect(ASource, AMask: TFCustomCanvas; - const ASourceRect: TRect; const AMaskPos, ADestPos: TPoint); -begin - DoMaskedCopyRect(ASource, AMask, ASource.Transform(ASourceRect), - AMask.Transform(AMaskPos), Transform(ADestPos)); -end; - -procedure TFCustomCanvas.DrawImage(AImage: TFCustomBitmap; const ADestPos: TPoint); -begin - DrawImageRect(AImage, Rect(0, 0, AImage.Width, AImage.Height), ADestPos); -end; - -procedure TFCustomCanvas.DrawImageRect(AImage: TFCustomBitmap; ASourceRect: TRect; - const ADestPos: TPoint); -var - SourceRect: TRect; -begin - SourceRect := ASourceRect; -{ if SourceRect.Right > Width then - SourceRect.Right := Width; - if SourceRect.Bottom > Height then - SourceRect.Bottom := Height;} - - if (SourceRect.Right > SourceRect.Left) and - (SourceRect.Bottom > SourceRect.Top) then - DoDrawImageRect(AImage, SourceRect, Transform(ADestPos)); -end; - -{ TFCustomBitmap } - -destructor TFCustomBitmap.Destroy; -begin - if Assigned(Palette) then - Palette.Release; - inherited Destroy; -end; - -procedure TFCustomBitmap.SetPixelsFromData(AData: Pointer; AStride: LongWord); -var - DestData: Pointer; - DestStride, BytesPerScanline: LongWord; - y: Integer; -begin - DestStride := 0; // to remove compiler warning - DestData := nil; - if Height <= 0 then - exit; - - Lock(DestData, DestStride); - try - if DestStride = AStride then - Move(AData^, DestData^, AStride * Height) - else - begin - if DestStride > AStride then - BytesPerScanline := AStride - else - BytesPerScanline := DestStride; - - y := 0; - while True do - begin - Move(AData^, DestData^, BytesPerScanline); - Inc(y); - if y = Height then - break; - Inc(AData, AStride); - Inc(DestData, DestStride); - end; - end; - finally - Unlock; - end; -end; - -constructor TFCustomBitmap.Create(AWidth, AHeight: Integer; - APixelFormat: TGfxPixelFormat); -begin - FWidth := AWidth; - FHeight := AHeight; - FPixelFormat := APixelFormat; -end; - -procedure TFCustomBitmap.SetPalette(APalette: TGfxPalette); -begin - if APalette <> Palette then - begin - if Assigned(Palette) then - Palette.Release; - - FPalette := APalette; - - if Assigned(Palette) then - Palette.AddRef; - end; -end; - -{ TFCustomScreen } - -constructor TFCustomScreen.Create; -begin - inherited Create; - -end; - -{ TFCustomWindow } - -function TFCustomWindow.CanClose: Boolean; -begin - if Assigned(OnCanClose) then - Result := OnCanClose(Self) - else - Result := True; -end; - -function TFCustomWindow.GetTitle: String; -begin - -end; - -procedure TFCustomWindow.SetTitle(const ATitle: String); -begin - -end; - -procedure TFCustomWindow.ProcessEvent(AEvent: TFEvent); -begin - case AEvent.EventType of - etCreate: EvCreate(); - etCanClose: Exit; - etClose: Exit; - etFocusIn: EvFocusIn(); - etFocusOut: EvFocusOut(); - etHide: EvHide(); - etKeyPressed: EvKeyPressed(AEvent.Key); - etKeyReleased: EvKeyReleased(AEvent.Key); - etKeyChar: EvKeyChar(AEvent.KeyChar); - etMouseEnter: EvMouseEnter(AEvent.MousePos); - etMouseLeave: EvMouseLeave(); - etMousePressed: EvMousePressed(AEvent.MouseButton, AEvent.MousePos); - etMouseReleased: EvMouseReleased(AEvent.MouseButton, AEvent.MousePos); - etMouseMove: EvMouseMove(AEvent.MousePos); - etMouseWheel: EvMouseWheel(AEvent.WheelDelta, AEvent.MousePos); - etPaint: EvPaint(); - etMove: EvMove(); - etResize: EvResize(); - etShow: EvShow(); - end; -end; - -constructor TFCustomWindow.Create(AParent: TFCustomWindow; - AWindowOptions: TFWindowOptions); -begin - inherited Create; - - FWindowOptions := AWindowOptions; - FParent := AParent; - - FChildWindows := TList.Create; - - FFocusedWindow := Self; - - if AParent <> nil then AParent.ChildWindows.Add(Self); -end; - -destructor TFCustomWindow.Destroy; -begin - FChildWindows.Free; - - inherited Destroy; -end; - -procedure TFCustomWindow.SetWidth(AWidth: Integer); -begin - SetSize(Size(AWidth, Height)); -end; - -procedure TFCustomWindow.SetLeft(const AValue: Integer); -begin - SetPosition(Point(AValue, FTop)); -end; - -procedure TFCustomWindow.SetClientHeight(const AValue: Integer); -begin - SetClientSize(Size(Width, AValue)); -end; - -procedure TFCustomWindow.SetClientWidth(const AValue: Integer); -begin - SetClientSize(Size(AValue, Height)); -end; - -procedure TFCustomWindow.SetTop(const AValue: Integer); -begin - SetPosition(Point(FLeft, AValue)); -end; - -procedure TFCustomWindow.SetVisible(const AValue: Boolean); -begin - if FVisible = AValue then exit; - - if AValue then Show - else Hide; -end; - -procedure TFCustomWindow.SetHeight(AHeight: Integer); -begin - SetSize(Size(Width, AHeight)); -end; - -procedure TFCustomWindow.SetCursor(ACursor: TFCursor); -begin - if ACursor <> Cursor then - begin - FCursor := ACursor; - DoSetCursor; - end; -end; - -procedure TFCustomWindow.SetWindowOptions(const AValue: TFWindowOptions); -begin - if FWindowOptions = AValue then exit; - FWindowOptions := AValue; - DoSetWindowOptions; -end; - -{ Finds the top window througth recursion } -function TFCustomWindow.GetRootWindow: TFCustomWindow; -begin - if Assigned(Parent) then Result := Parent.GetRootWindow - else Result := Self; -end; - -{ Global functions } - -{ Sizes, points etc. } - -function Size(AWidth, AHeight: Integer): TSize; -begin - Result.cx := AWidth; - Result.cy := AHeight; -end; - -function Size(ARect: TRect): TSize; -begin - Result.cx := ARect.Right - ARect.Left; - Result.cy := ARect.Bottom - ARect.Top; -end; - -function PtInRect(const ARect: TRect; const APoint: TPoint): Boolean; -begin - with ARect, APoint do - Result := (x >= Left) and (y >= Top) and (x < Right) and (y < Bottom); -end; - -{ Only Free Pascal supports operator overloading at the moment } - -{$ifdef fpc} - -operator = (const ASize1, ASize2: TSize) b: Boolean; -begin - b := (ASize1.cx = ASize2.cx) and (ASize1.cy = ASize2.cy); -end; - -operator + (const APoint1, APoint2: TPoint) p: TPoint; -begin - p.x := APoint1.x + APoint2.x; - p.y := APoint1.y + APoint2.y; -end; - -operator + (const APoint: TPoint; ASize: TSize) p: TPoint; -begin - p.x := APoint.x + ASize.cx; - p.y := APoint.y + ASize.cy; -end; - -operator + (const ASize: TSize; APoint: TPoint) s: TSize; -begin - s.cx := ASize.cx + APoint.x; - s.cy := ASize.cy + APoint.y; -end; - -operator + (const ASize1, ASize2: TSize) s: TSize; -begin - s.cx := ASize1.cx + ASize2.cx; - s.cy := ASize1.cy + ASize2.cy; -end; - -operator + (const APoint: TPoint; i: Integer) p: TPoint; -begin - p.x := APoint.x + i; - p.y := APoint.y + i; -end; - -operator + (const ASize: TSize; i: Integer) s: TSize; -begin - s.cx := ASize.cx + i; - s.cy := ASize.cy + i; -end; - -operator - (const APoint1, APoint2: TPoint) p: TPoint; -begin - p.x := APoint1.x - APoint2.x; - p.y := APoint1.y - APoint2.y; -end; - -operator - (const APoint: TPoint; i: Integer) p: TPoint; -begin - p.x := APoint.x - i; - p.y := APoint.y - i; -end; - -operator - (const ASize: TSize; const APoint: TPoint) s: TSize; -begin - s.cx := ASize.cx - APoint.x; - s.cy := ASize.cy - APoint.y; -end; - -operator - (const ASize: TSize; i: Integer) s: TSize; -begin - s.cx := ASize.cx - i; - s.cy := ASize.cy - i; -end; - - -{ Color functions } - -operator = (const AColor1, AColor2: TGfxColor) b: Boolean; -begin - b := (AColor1.Red = AColor2.Red) and (AColor1.Green = AColor2.Green) and - (AColor1.Blue = AColor2.Blue) and (AColor1.Alpha = AColor2.Alpha); -end; -{$endif} - -function GetAvgColor(const AColor1, AColor2: TGfxColor): TGfxColor; -begin - Result.Red := AColor1.Red + (AColor2.Red - AColor1.Red) div 2; - Result.Green := AColor1.Green + (AColor2.Green - AColor1.Green) div 2; - Result.Blue := AColor1.Blue + (AColor2.Blue - AColor1.Blue) div 2; - Result.Alpha := AColor1.Alpha + (AColor2.Alpha - AColor1.Alpha) div 2; -end; - -function GetGfxColor(const ARed, AGreen, ABlue, AAlpha: Byte): TGfxColor; -begin - Result.Alpha := AAlpha; - Result.Red := ARed; - Result.Green := AGreen; - Result.Blue := ABlue; -end; - -function GfxColorToTColor(const AColor: TGfxColor): TColor; -begin - Result := AColor.Red or (AColor.Green shl 8) or (AColor.Blue shl 16); -end; - - -{ Keyboard functions } - -function KeycodeToText(Key: Word; ShiftState: TShiftState): String; - - function GetASCIIText: String; - var - c: Char; - begin - result := ''; - c := Chr(Key and $ff); - case c of - #13: Result := Result + 'Enter'; - #127: Result := Result + 'Del'; - '+': Result := Result + 'Plus' - else - Result := Result + c; - end; - end; - -var - s: String; -begin - SetLength(Result, 0); - - if ssShift in ShiftState then - Result := 'Shift+'; - if ssCtrl in ShiftState then - Result := 'Ctrl+'; - if ssAlt in ShiftState then - Result := 'Alt+'; - - if (Key > Ord(' ')) and (Key < 255) then - begin - Result := Result + GetASCIIText; - exit; - end; - - case Key of - keyNul: s := 'Null'; - keyBackSpace: s := 'Backspace'; - keyTab: s := 'Tab'; - keyLinefeed: s := 'Linefeed'; - keyReturn: s := 'Enter'; - keyEscape: s := 'Esc'; - Ord(' '): s := 'Space'; - keyDelete: s := 'Del'; - keyVoid: s := 'Void'; - keyBreak: s := 'Break'; - keyScrollForw: s := 'ScrollForw'; - keyScrollBack: s := 'ScrollBack'; - keyBoot: s := 'Boot'; - keyCompose: s := 'Compose'; - keySAK: s := 'SAK'; - keyUndo: s := 'Undo'; - keyRedo: s := 'Redo'; - keyMenu: s := 'Menu'; - keyCancel: s := 'Cancel'; - keyPrintScreen: s := 'PrtScr'; - keyExecute: s := 'Exec'; - keyFind: s := 'Find'; - keyBegin: s := 'Begin'; - keyClear: s := 'Clear'; - keyInsert: s := 'Ins'; - keySelect: s := 'Select'; - keyMacro: s := 'Macro'; - keyHelp: s := 'Help'; - keyDo: s := 'Do'; - keyPause: s := 'Pause'; - keySysRq: s := 'SysRq'; - keyModeSwitch: s := 'ModeSw'; - keyUp: s := 'Up'; - keyDown: s := 'Down'; - keyLeft: s := 'Left'; - keyRight: s := 'Right'; - keyPrior: s := 'PgUp'; - keyNext: s := 'PgDown'; - keyHome: s := 'Home'; - keyEnd: s := 'End'; - keyF0..keyF64: s := 'F' + IntToStr(Key - keyF0); - keyP0..keyP9: s := 'KP' + Chr(Key - keyP0 + Ord('0')); - keyPA..keyPF: s := 'KP' + Chr(Key - keyPA + Ord('A')); - keyPPlus, keyPMinus, keyPSlash, keyPStar, keyPEqual, keyPSeparator, - keyPDecimal, keyPParenLeft, keyPParenRight, keyPSpace, keyPEnter, - keyPTab: s := 'KP' + GetASCIIText; - keyPPlusMinus: s := 'KPPlusMinus'; - keyPBegin: s := 'KPBegin'; - keyPF1..keyPF9: s := 'KPF' + IntToStr(Key - keyPF1); - keyShiftL: s := 'ShiftL'; - keyShiftR: s := 'ShiftR'; - keyCtrlL: s := 'CtrlL'; - keyCtrlR: s := 'CtrlR'; - keyAltL: s := 'AltL'; - keyAltR: s := 'AltR'; - keyMetaL: s := 'MetaL'; - keyMetaR: s := 'MetaR'; - keySuperL: s := 'SuperL'; - keySuperR: s := 'SuperR'; - keyHyperL: s := 'HyperL'; - keyHyperR: s := 'HyperR'; - keyAltGr: s := 'AltGr'; - keyCaps: s := 'Caps'; - keyNum: s := 'Num'; - keyScroll: s := 'Scroll'; - keyShiftLock: s := 'ShiftLock'; - keyCtrlLock: s := 'CtrlLock'; - keyAltLock: s := 'AltLock'; - keyMetaLock: s := 'MetaLock'; - keySuperLock: s := 'SuperLock'; - keyHyperLock: s := 'HyperLock'; - keyAltGrLock: s := 'AltGrLock'; - keyCapsLock: s := 'CapsLock'; - keyNumLock: s := 'NumLock'; - keyScrollLock: s := 'ScrollLock'; - keyDeadRing: s := 'DeadRing'; - keyDeadCaron: s := 'DeadCaron'; - keyDeadOgonek: s := 'DeadOgonek'; - keyDeadIota: s := 'DeadIota'; - keyDeadDoubleAcute: s := 'DeadDoubleAcute'; - keyDeadBreve: s := 'DeadBreve'; - keyDeadAboveDot: s := 'DeadAboveDot'; - keyDeadBelowDot: s := 'DeadBelowDot'; - keyDeadVoicedSound: s := 'DeadVoicedSound'; - keyDeadSemiVoicedSound: s := 'DeadSemiVoicedSound'; - keyDeadAcute: s := 'DeadAcute'; - keyDeadCedilla: s := 'DeadCedilla'; - keyDeadCircumflex: s := 'DeadCircumflex'; - keyDeadDiaeresis: s := 'DeadDiaeresis'; - keyDeadGrave: s := 'DeadGrave'; - keyDeadTilde: s := 'DeadTilde'; - keyDeadMacron: s := 'DeadMacron'; - - keyEcuSign: s := 'Ecu'; - keyColonSign: s := 'Colon'; - keyCruzeiroSign: s := 'Cruzeiro'; - keyFFrancSign: s := 'FFranc'; - keyLiraSign: s := 'Lira'; - keyMillSign: s := 'Mill'; - keyNairaSign: s := 'Naira'; - keyPesetaSign: s := 'Peseta'; - keyRupeeSign: s := 'Rupee'; - keyWonSign: s := 'Won'; - keyNewSheqelSign: s := 'NewShequel'; - keyDongSign: s := 'Dong'; - keyEuroSign: s := 'Euro'; - else - s := '#' + IntToHex(Key, 4); - end; - Result := Result + s; -end; - -{ TFCustomApplication } - -procedure TFCustomApplication.SetTitle(const ATitle: String); -begin - if ATitle <> FTitle then FTitle := ATitle; -end; - -constructor TFCustomApplication.Create; -begin - inherited Create(nil); - - if gCommandLineParams.IsParam('display') then - FDisplayName := gCommandLineParams.GetParam('display') - else - FDisplayName := ''; - - Forms := TList.Create; - - FQuitWhenLastWindowCloses := True; -end; - -destructor TFCustomApplication.Destroy; -begin - Forms.Free; - inherited Destroy; -end; - -procedure TFCustomApplication.AddWindow(AWindow: TFCustomWindow); -begin -{$IFDEF VerboseFPGUI} - WriteLn('[TFCustomApplication.AddWindow] Window Title: ', AWindow.Title); -{$ENDIF} - - if Forms.IndexOf(AWindow) = -1 then - Forms.Add(AWindow); -end; - -procedure TFCustomApplication.RemoveWindow(AWindow: TFCustomWindow); -begin -{$IFDEF VerboseFPGUI} - WriteLn('[TFCustomApplication.RemoveWindow] Window Title: ', AWindow.Title); -{$ENDIF} - - if (Assigned(Forms) and Assigned(AWindow)) then Forms.Remove(AWindow); -end; - -procedure TFCustomApplication.Run; -begin - DoBreakRun := False; - - if gCommandLineParams.IsParam('?') or gCommandLineParams.IsParam('help') then - begin - writeln(' '); - writeln(' The following parameters are supported by fpGUI applications.'); - writeln(' '); - writeln(' -? Shows this help'); - writeln(' -display fpGUI/X11 only: sets the display to use'); - writeln(' -style Overrides the default (auto detected) GUI style'); - writeln(' '); - DoBreakRun := True; - end; -end; - -{procedure TFCustomApplication.CreateForm(AForm: TFCustomForm); -var - form: PForm; - Filename: String; - TextStream, BinStream: TStream; -begin - form := @Reference; - form^ := TFCustomForm(InstanceClass.Create(Self)); - - Filename := LowerCase(Copy(InstanceClass.ClassName, 2, 255)) + '.frm'; - - TextStream := TFileStream.Create(Filename, fmOpenRead); - BinStream := TMemoryStream.Create; - ObjectTextToBinary(TextStream, BinStream); - TextStream.Free; - - BinStream.Position := 0; - BinStream.ReadComponent(Form^); - BinStream.Free; - - Form^.Show; -end;} - -end. - diff --git a/gfx/keys.inc b/gfx/keys.inc deleted file mode 100644 index 2d4eeb9f..00000000 --- a/gfx/keys.inc +++ /dev/null @@ -1,270 +0,0 @@ -{ - fpGFX - Free Pascal Graphics Library - Copyright (C) 2000 - 2001 by - Areca Systems GmbH / Sebastian Guenther, sg@freepascal.org - Copyright (C) 2006 by Graeme Geldenhuys - member of the fpGFX development team. - - fpGFX Keyboard definitions - - See the file COPYING.modifiedLGPL, included in this distribution, - for details about the copyright. - - 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. - - **********************************************************************} - -{ - We use GGI's key definitions; the names just - have been somewhat pascalified... - GGI info at <http://www.ggi-project.org> - GII info at <http://www.ggi-project.org/packages/libgii.html> -} - -const - - // ASCII keys - - keyNul = $00; - keyBackSpace = $08; - keyTab = $09; - keyLinefeed = $0a; - keyReturn = $0d; - keyEscape = $1b; - keyDelete = $7f; - - // special keys - - keyVoid = $e000; - keyBreak = $e005; - keyScrollForw = $e00a; - keyScrollBack = $e00b; - keyBoot = $e00c; - keyCompose = $e00e; - keySAK = $e00f; - keyUndo = $e017; - keyRedo = $e018; - keyMenu = $e019; - keyCancel = $e01a; - keyPrintScreen = $e01b; - keyExecute = $e01c; - keyFind = $e01e; - keyBegin = $e01f; - keyClear = $e020; - keyInsert = $e022; - keySelect = $e023; - keyMacro = $e026; - keyHelp = $e027; - keyDo = $e028; - keyPause = $e029; - keyStop = keyPause; - keySysRq = $e02a; - keyModeSwitch = $e02b; - keyUp = $e032; - keyDown = $e033; - keyLeft = $e034; - keyRight = $e035; - keyPrior = $e036; - keyPageUp = keyPrior; - keyNext = $e037; - keyPageDown = keyNext; - keyHome = $e038; - keyEnd = $e039; - - - // function keys - - keyF0 = $e100; - keyF1 = $e101; - keyF2 = $e102; - keyF3 = $e103; - keyF4 = $e104; - keyF5 = $e105; - keyF6 = $e106; - keyF7 = $e107; - keyF8 = $e108; - keyF9 = $e109; - keyF10 = $e10a; - keyF11 = $e10b; - keyF12 = $e10c; - keyF13 = $e10d; - keyF14 = $e10e; - keyF15 = $e10f; - keyF16 = $e110; - keyF17 = $e111; - keyF18 = $e112; - keyF19 = $e113; - keyF20 = $e114; - keyF21 = $e115; - keyF22 = $e116; - keyF23 = $e117; - keyF24 = $e118; - keyF25 = $e119; - keyF26 = $e11a; - keyF27 = $e11b; - keyF28 = $e11c; - keyF29 = $e11d; - keyF30 = $e11e; - keyF31 = $e11f; - keyF32 = $e120; - keyF33 = $e121; - keyF34 = $e122; - keyF35 = $e123; - keyF36 = $e124; - keyF37 = $e125; - keyF38 = $e126; - keyF39 = $e127; - keyF40 = $e128; - keyF41 = $e129; - keyF42 = $e12a; - keyF43 = $e12b; - keyF44 = $e12c; - keyF45 = $e12d; - keyF46 = $e12e; - keyF47 = $e12f; - keyF48 = $e130; - keyF49 = $e131; - keyF50 = $e132; - keyF51 = $e133; - keyF52 = $e134; - keyF53 = $e135; - keyF54 = $e136; - keyF55 = $e137; - keyF56 = $e138; - keyF57 = $e139; - keyF58 = $e13a; - keyF59 = $e13b; - keyF60 = $e13c; - keyF61 = $e13d; - keyF62 = $e13e; - keyF63 = $e13f; - keyF64 = $e140; - - - // keys on the numeric keypad - keyP0 = $e230; - keyP1 = $e231; - keyP2 = $e232; - keyP3 = $e233; - keyP4 = $e234; - keyP5 = $e235; - keyP6 = $e236; - keyP7 = $e237; - keyP8 = $e238; - keyP9 = $e239; - keyPA = $e241; - keyPB = $e242; - keyPC = $e243; - keyPD = $e244; - keyPE = $e245; - keyPF = $e246; - keyPPlus = $e200 + Ord('+'); - keyPMinus = $e200 + Ord('-'); - keyPSlash = $e200 + Ord('/'); - keyPAsterisk = $e200 + Ord('*'); - keyPStar = keyPAsterisk; - keyPEqual = $e200 + Ord('='); - keyPSeparator = $e200 + Ord(','); - keyPDecimal = $e200 + Ord('.'); - keyPParenLeft = $e200 + Ord('('); - keyPParenRight = $e200 + Ord(')'); - keyPSpace = $e200 + Ord(' '); - keyPEnter = $e20d; - keyPTab = $e208; - keyPPlusMinus = $e280; - keyPBegin = $e281; - keyPF1 = $e291; - keyPF2 = $e292; - keyPF3 = $e293; - keyPF4 = $e294; - keyPF5 = $e295; - keyPF6 = $e296; - keyPF7 = $e297; - keyPF8 = $e298; - keyPF9 = $e299; - - - // modifier keys - - keyShift = $e300; - keyCtrl = $e301; - keyAlt = $e302; - keyMeta = $e303; - keySuper = $e304; - keyHyper = $e305; - keyAltGr = $e306; - keyCaps = $e307; - keyNum = $e308; - keyScroll = $e309; - - - // modifier _labels_ - - keyShiftL = $e300; - keyShiftR = $e340; - keyCtrlL = $e301; - keyCtrlR = $e341; - keyAltL = $e302; - keyAltR = $e342; - keyMetaL = $e303; - keyMetaR = $e343; - keySuperL = $e304; - keySuperR = $e344; - keyHyperL = $e305; - keyHyperR = $e345; - keyShiftLock = $e380; - keyCtrlLock = $e381; - keyAltLock = $e382; - keyMetaLock = $e383; - keySuperLock = $e384; - keyHyperLock = $e385; - keyAltGrLock = $e386; - keyCapsLock = $e387; - keyNumLock = $e388; - keyScrollLock = $e389; - - // Dead keys - keyDeadRing = $e400; - keyDeadCaron = $e401; - keyDeadOgonek = $e402; - keyDeadIota = $e403; - keyDeadDoubleAcute = $e404; - keyDeadBreve = $e405; - keyDeadAboveDot = $e406; - keyDeadBelowDot = $e407; - keyDeadVoicedSound = $e408; - keyDeadSemiVoicedSound = $e409; - - - keyDeadAcute = $e4b4; - keyDeadCedilla = $e4b8; - keyDeadCircumflex = $e45e; - keyDeadDiaeresis = $e4a8; - keyDeadGrave = $e460; - keyDeadTilde = $e47e; - keyDeadMacron = $e4af; - - // miscellaneous - keyNIL = $ffff; // used to indicate "not mapped yet" - - - // currencies (NOTE: These values are not defined in GGI/GII! - // !!!: Check if GII has got currency codes in the meantime - keyEcuSign = $e500; - keyColonSign = $e501; - keyCruzeiroSign = $e502; - keyFFrancSign = $e503; - keyLiraSign = $e504; - keyMillSign = $e505; - keyNairaSign = $e506; - keyPesetaSign = $e507; - keyRupeeSign = $e508; - keyWonSign = $e509; - keyNewSheqelSign = $e50a; - keyDongSign = $e50b; - keyEuroSign = $e50c; - - - diff --git a/gfx/schar16.pas b/gfx/schar16.pas deleted file mode 100644 index 156004ba..00000000 --- a/gfx/schar16.pas +++ /dev/null @@ -1,339 +0,0 @@ -{ schar16.pas: Function for handling 16 bit unicode in normal 8 bit ansi strings - File maintainer: nvitya@freemail.hu - -History: -} - -unit schar16; - -{$ifdef FPC} -{$mode objfpc}{$H+} -{$endif} - -interface - -uses - Classes, SysUtils; - -const - u8escchar : char = '^'; - u8escclose : char = ';'; - -type - String16 = string; - String8 = string; - - Char16 = packed record - char1 : char; - char2 : char; - end; - -function Str8to16(s : String8) : string16; // = u8 -function Str16to8(s : String16) : string8; // = u16u8 - -function u8(s : String8) : string16; // decodes escaped text -function u8u16(s : String8) : string16; // same as u8 -function u8noesc(s : String8) : string16; // inserts #0-s, doesn't use escapes - -function u16u8(s : string16) : string8; // escapes only 256..65535 -function u16u8safe(s : string16) : string8; // escapes 0.31 and 255..65535 -function u16u8trunc(s : string16) : string8; // truncates hi byte, doesn't use escapes ('^' -> '^'), try handle code pages -// this function could cause information loss - -function Length16(s : String16) : integer; -procedure SetLength16(var s : String16; len : integer); - -function Pos16(const s : string16; const searched : string16) : integer; -function UpCase16(const s : string16) : string16; -function Upper16(const s : string16) : string16; - -function Copy16(s : String16; ind,len : integer) : String16; -procedure Insert16(s : String16; var dest : string16; ind : integer); -procedure Delete16(var s : String16; ind, count : integer); - -procedure AddChar16(var s : String16; ch16 : Char16); overload; -procedure AddChar16(var s : String16; w : word); overload; - -implementation - -uses UnitKeys; - -function u8(s : String8) : string16; -var - n : integer; - ccode : word; - c : char; -begin - // 'asdf^123^452^354;78; - result := ''; - n := 1; - while (n <= length(s)) do - begin - if s[n] = u8escchar then - begin - inc(n); - if (n <= length(s)) and (s[n] = u8escchar) then - begin - result := result + u8escchar + #0; - inc(n); - continue; - end; - - ccode := 0; - while (n <= length(s)) do - begin - c := s[n]; - if (c >= '0') and (c <= '9') then ccode := ccode * 10 + (ord(c)-ord('0')) - else - break; - inc(n); - end; - result := result + chr(lo(ccode)) + chr(hi(ccode)); - - if (n <= length(s)) and (s[n] = u8escclose) then inc(n); - end - else - begin - result := result + s[n] + #0; - inc(n); - end; - end; -end; - -function u8u16(s : String8) : string16; // same as u8 -begin - result := u8(s); -end; - -function u16u8safe(s : string16) : string8; -var - ccode : word; - n : integer; - uni : boolean; -begin - result := ''; - uni := false; - n := 1; - while n < length(s) do - begin - ccode := ord(s[n]) + (ord(s[n+1]) shl 8); - if (ccode < 32) or (ccode > 254) then - begin - result := result + u8escchar + IntToStr(ccode); - uni := true; - end - else - begin - if ccode = ord(u8escchar) then result := result + u8escchar + u8escchar - else - begin - if uni and (ccode >= ord('0')) and (ccode <= ord('9')) then result := result + u8escclose; - result := result + chr(ccode); - end; - uni := false; - end; - inc(n,2); - end; -end; - -function u16u8(s : string16) : string8; -var - ccode : word; - n : integer; - uni : boolean; -begin - result := ''; - uni := false; - n := 1; - while n < length(s) do - begin - ccode := ord(s[n]) + (ord(s[n+1]) shl 8); - if (ccode > 255) then - begin - result := result + u8escchar + IntToStr(ccode); - uni := true; - end - else - begin - if ccode = ord(u8escchar) then result := result + u8escchar + u8escchar - else - begin - if uni and (ccode >= ord('0')) and (ccode <= ord('9')) then result := result + u8escclose; - result := result + chr(ccode); - end; - uni := false; - end; - inc(n,2); - end; -end; - -function u16u8trunc(s : string16) : string8; -var - n : integer; - i : integer; - len : integer; - ct,c : char; -begin - SetLength(Result,length16(s)); - i := 1; - len := length16(s); - for n := 1 to len do - begin - ct := s[i+1]; - c := s[i]; - // some hungarian translation: - if ct = #1 then - begin - c := TranslateChar(ct,c); - end; - Result[n] := c; - inc(i,2); - end; -end; - -function u8noesc(s: String8): string16; -var - n : integer; - i : integer; - len : integer; -begin - SetLength16(Result,length(s)); - i := 1; - len := length(s); - for n := 1 to len do - begin - Result[i] := s[n]; - inc(i); - Result[i] := #0; - inc(i); - end; -end; - -function Str8to16(s : String8) : string16; -begin - result := u8(s); -end; - -function Str16to8(s : String16) : string8; -begin - result := u16u8(s); -end; - -{ -function Str8to16(s : String8) : string16; -var - n : integer; - i : integer; - len : integer; -begin - SetLength16(Result,length(s)); - i := 1; - len := length(s); - for n := 1 to len do - begin - Result[i] := s[n]; - inc(i); - Result[i] := #0; - inc(i); - end; -end; - -function Str16to8(s : String8) : string8; -var - n : integer; - i : integer; - len : integer; - ct,c : char; -begin - SetLength(Result,length16(s)); - i := 1; - len := length16(s); - for n := 1 to len do - begin - ct := s[i+1]; - c := s[i]; - // some hungarian translation: - if ct = #1 then - begin - c := TranslateChar(ct,c); - end; - Result[n] := c; - inc(i,2); - end; -end; -} - -procedure SetLength16(var s : String16; len : integer); -begin - if len >= 0 then SetLength(s,len shl 1); -end; - -function Length16(s : String16) : integer; -begin - Result := Length(s) shr 1; -end; - -function Pos16(const s : string16; const searched : string16) : integer; -var - n: integer; -begin - result := 0; - if length16(s) < 1 then Exit; - for n := 1 to Length16(searched)-Length16(s) do - begin - if CompareMem(@s[1], @searched[n*2-1], Length16(s)) then - begin - result := n; - Exit; - end; - end; -end; - -function UpCase16(const s : string16) : string16; -begin - if length(s) < 2 then Exit; - if s[2] = #0 then Result := UpCase(s[1])+#0 - else - begin - result := chr(ord(s[1]) and $FE) + s[2]; - end; -end; - -function Upper16(const s : string16) : string16; -var - n : integer; -begin - result := ''; - for n := 1 to length16(s) do - begin - result := result + UpCase16(s[n*2-1]+s[n*2]); - end; -end; - -function Copy16(s : String16; ind,len : integer) : String16; -begin - result := copy(s,1 + ((ind-1) shl 1), len shl 1); -end; - -procedure Insert16(s : String16; var dest : string16; ind : integer); -begin - Insert(s,dest,1 + ((ind-1) shl 1)); -end; - -procedure Delete16(var s : String16; ind, count : integer); -begin - Delete(s,1 + ((ind-1) shl 1), count shl 1); -end; - -procedure AddChar16(var s : String16; ch16 : Char16); -begin - s := s + ch16.char1 + ch16.char2; -end; - -procedure AddChar16(var s : String16; w : word); -begin - s := s + chr(lo(w)) + chr(hi(w)); -end; - -end. - diff --git a/gfx/template/Makefile b/gfx/template/Makefile deleted file mode 100644 index a89c9e5c..00000000 --- a/gfx/template/Makefile +++ /dev/null @@ -1,1249 +0,0 @@ -# -# Makefile generated by fpcmake v1.00 [2000/12/14] -# - -defaultrule: all - -##################################################################### -# Autodetect OS (Linux or Dos or Windows NT) -# define inUnix when running under Unix (Linux,FreeBSD) -# define inWinNT when running under WinNT -##################################################################### - -# We need only / in the path -override PATH:=$(subst \,/,$(PATH)) - -# Search for PWD and determine also if we are under linux -PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH))))) -ifeq ($(PWD),) -PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH))))) -ifeq ($(PWD),) -nopwd: - @echo You need the GNU utils package to use this Makefile! - @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip - @exit -else -inUnix=1 -endif -else -PWD:=$(firstword $(PWD)) -endif - -# Detect NT - NT sets OS to Windows_NT -# Detect OS/2 - OS/2 has OS2_SHELL defined -ifndef inUnix -ifeq ($(OS),Windows_NT) -inWinNT=1 -else -ifdef OS2_SHELL -inOS2=1 -endif -endif -endif - -# The extension of executables -ifdef inUnix -SRCEXEEXT= -else -SRCEXEEXT=.exe -endif - -# The path which is searched separated by spaces -ifdef inUnix -SEARCHPATH=$(subst :, ,$(PATH)) -else -SEARCHPATH=$(subst ;, ,$(PATH)) -endif - -# Base dir -ifdef PWD -BASEDIR:=$(shell $(PWD)) -else -BASEDIR=. -endif - -##################################################################### -# FPC version/target Detection -##################################################################### - -# What compiler to use ? -ifndef FPC -# Compatibility with old makefiles -ifdef PP -FPC=$(PP) -else -FPC=ppc386 -endif -endif -override FPC:=$(subst $(SRCEXEEXT),,$(FPC)) -override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT) - -# Target OS -ifndef OS_TARGET -OS_TARGET:=$(shell $(FPC) -iTO) -endif - -# Source OS -ifndef OS_SOURCE -OS_SOURCE:=$(shell $(FPC) -iSO) -endif - -# Target CPU -ifndef CPU_TARGET -CPU_TARGET:=$(shell $(FPC) -iTP) -endif - -# Source CPU -ifndef CPU_SOURCE -CPU_SOURCE:=$(shell $(FPC) -iSP) -endif - -# FPC version -ifndef FPC_VERSION -FPC_VERSION:=$(shell $(FPC) -iV) -endif - -export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION FPCOPT - -##################################################################### -# FPCDIR Setting -##################################################################### - -# Test FPCDIR to look if the RTL dir exists -ifdef FPCDIR -override FPCDIR:=$(subst \,/,$(FPCDIR)) -ifeq ($(wildcard $(FPCDIR)/rtl),) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=wrong -endif -endif -else -override FPCDIR=wrong -endif - -# Default FPCDIR -ifeq ($(FPCDIR),wrong) -override FPCDIR=../../../.. -ifeq ($(wildcard $(FPCDIR)/rtl),) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=wrong -endif -endif -endif - -# Detect FPCDIR -ifeq ($(FPCDIR),wrong) -ifdef inUnix -override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=/usr/lib/fpc/$(FPC_VERSION) -endif -else -override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH)))))) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(FPCDIR)/rtl),) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(FPCDIR)/rtl),) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=c:/pp -endif -endif -endif -endif -endif -endif - -ifndef PACKAGESDIR -PACKAGESDIR=$(FPCDIR)/packages -endif -ifndef TOOLKITSDIR -TOOLKITSDIR= -endif -ifndef COMPONENTSDIR -COMPONENTSDIR= -endif - -# Create units dir -ifneq ($(FPCDIR),.) -UNITSDIR=$(FPCDIR)/units/$(OS_TARGET) -endif - -##################################################################### -# User Settings -##################################################################### - - -# Targets - -override UNITOBJECTS+=gfx_xxx -override RSTOBJECTS+=gfx_xxx - -# Clean - - -# Install - -ZIPTARGET=install - -# Defaults - -override NEEDOPT=-S2h - -# Directories - -override NEEDUNITDIR=.. - -# Packages - -override PACKAGES+=rtl - -# Libraries - -LIBNAME=fpgfx_xxx - -# Info - -INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall - -##################################################################### -# Shell tools -##################################################################### - -# echo -ifndef ECHO -ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=echo -ECHOE:=echo -else -ECHO:=$(firstword $(ECHO)) -ECHOE=$(ECHO) -E -endif -else -ECHO:=$(firstword $(ECHO)) -ECHOE=$(ECHO) -E -endif -endif - -# To copy pograms -ifndef COPY -COPY:=cp -fp -endif - -# Copy a whole tree -ifndef COPYTREE -COPYTREE:=cp -rfp -endif - -# To move pograms -ifndef MOVE -MOVE:=mv -f -endif - -# Check delete program -ifndef DEL -DEL:=rm -f -endif - -# Check deltree program -ifndef DELTREE -DELTREE:=rm -rf -endif - -# To install files -ifndef INSTALL -ifdef inUnix -INSTALL:=install -c -m 644 -else -INSTALL:=$(COPY) -endif -endif - -# To install programs -ifndef INSTALLEXE -ifdef inUnix -INSTALLEXE:=install -c -m 755 -else -INSTALLEXE:=$(COPY) -endif -endif - -# To make a directory. -ifndef MKDIR -ifdef inUnix -MKDIR:=install -m 755 -d -else -MKDIR:=ginstall -m 755 -d -endif -endif - -export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR - -##################################################################### -# Default Tools -##################################################################### - -# assembler, redefine it if cross compiling -ifndef AS -AS=as -endif - -# linker, but probably not used -ifndef LD -LD=ld -endif - -# ppas.bat / ppas.sh -ifdef inUnix -PPAS=ppas.sh -else -ifdef inOS2 -PPAS=ppas.cmd -else -PPAS=ppas.bat -endif -endif - -# ldconfig to rebuild .so cache -ifdef inUnix -LDCONFIG=ldconfig -else -LDCONFIG= -endif - -# ppumove -ifndef PPUMOVE -PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(PPUMOVE),) -PPUMOVE= -else -PPUMOVE:=$(firstword $(PPUMOVE)) -endif -endif -export PPUMOVE - -# ppufiles -ifndef PPUFILES -PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(PPUFILES),) -PPUFILES= -else -PPUFILES:=$(firstword $(PPUFILES)) -endif -endif -export PPUFILES - -# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase -# upx uses that one itself (PFV) -ifndef UPXPROG -ifeq ($(OS_TARGET),go32v2) -UPXPROG:=1 -endif -ifeq ($(OS_TARGET),win32) -UPXPROG:=1 -endif -ifdef UPXPROG -UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(UPXPROG),) -UPXPROG= -else -UPXPROG:=$(firstword $(UPXPROG)) -endif -else -UPXPROG= -endif -endif -export UPXPROG - -# ZipProg, you can't use Zip as the var name (PFV) -ifndef ZIPPROG -ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ZIPPROG),) -ZIPPROG= -else -ZIPPROG:=$(firstword $(ZIPPROG)) -endif -endif -export ZIPPROG - -ZIPOPT=-9 -ZIPEXT=.zip - -# Tar -ifndef TARPROG -TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(TARPROG),) -TARPROG= -else -TARPROG:=$(firstword $(TARPROG)) -endif -endif -export TARPROG - -ifeq ($(USETAR),bz2) -TAROPT=vI -TAREXT=.tar.bz2 -else -TAROPT=vz -TAREXT=.tar.gz -endif - -##################################################################### -# Default extensions -##################################################################### - -# Default needed extensions (Go32v2,Linux) -LOADEREXT=.as -EXEEXT=.exe -PPLEXT=.ppl -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.so -RSTEXT=.rst -FPCMADE=fpcmade - -# Go32v1 -ifeq ($(OS_TARGET),go32v1) -PPUEXT=.pp1 -OEXT=.o1 -ASMEXT=.s1 -SMARTEXT=.sl1 -STATICLIBEXT=.a1 -SHAREDLIBEXT=.so1 -FPCMADE=fpcmade.v1 -endif - -# Go32v2 -ifeq ($(OS_TARGET),go32v2) -FPCMADE=fpcmade.dos -endif - -# Linux -ifeq ($(OS_TARGET),linux) -EXEEXT= -HASSHAREDLIB=1 -FPCMADE=fpcmade.lnx -endif - -# Linux -ifeq ($(OS_TARGET),freebsd) -EXEEXT= -HASSHAREDLIB=1 -FPCMADE=fpcmade.freebsd -endif - -# Win32 -ifeq ($(OS_TARGET),win32) -PPUEXT=.ppw -OEXT=.ow -ASMEXT=.sw -SMARTEXT=.slw -STATICLIBEXT=.aw -SHAREDLIBEXT=.dll -FPCMADE=fpcmade.w32 -endif - -# OS/2 -ifeq ($(OS_TARGET),os2) -PPUEXT=.ppo -ASMEXT=.so2 -OEXT=.oo2 -SMARTEXT=.so -STATICLIBEXT=.ao2 -SHAREDLIBEXT=.dll -FPCMADE=fpcmade.os2 -endif - -# library prefix -LIBPREFIX=lib -ifeq ($(OS_TARGET),go32v2) -LIBPREFIX= -endif -ifeq ($(OS_TARGET),go32v1) -LIBPREFIX= -endif - -# determine which .pas extension is used -ifndef PASEXT -ifdef EXEOBJECTS -override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS))))) -else -override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS))))) -endif -ifeq ($(TESTPAS),) -PASEXT=.pp -else -PASEXT=.pas -endif -endif - - -# Check if the dirs really exists, else turn it off -ifeq ($(wildcard $(UNITSDIR)),) -UNITSDIR= -endif -ifeq ($(wildcard $(TOOLKITSDIR)),) -TOOLKITSDIR= -endif -ifeq ($(wildcard $(PACKAGESDIR)),) -PACKAGESDIR= -endif -ifeq ($(wildcard $(COMPONENTSDIR)),) -COMPONENTSDIR= -endif - - -# PACKAGESDIR packages - -PACKAGERTL=1 - -ifdef PACKAGERTL -ifneq ($(wildcard $(FPCDIR)/rtl),) -ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),) -PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET) -else -PACKAGEDIR_RTL=$(FPCDIR)/rtl -endif -ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),) -override COMPILEPACKAGES+=package_rtl -package_rtl: - $(MAKE) -C $(PACKAGEDIR_RTL) all -endif -UNITDIR_RTL=$(PACKAGEDIR_RTL) -else -PACKAGEDIR_RTL= -ifneq ($(wildcard $(UNITSDIR)/rtl),) -ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),) -UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET) -else -UNITDIR_RTL=$(UNITSDIR)/rtl -endif -else -UNITDIR_RTL= -endif -endif -ifdef UNITDIR_RTL -override NEEDUNITDIR+=$(UNITDIR_RTL) -endif -endif - - -##################################################################### -# Default Directories -##################################################################### - -# Linux and freebsd use unix dirs with /usr/bin, /usr/lib -# When zipping use the target as default, when normal install then -# use the source os as default -ifdef ZIPNAME -# Zipinstall -ifeq ($(OS_TARGET),linux) -UNIXINSTALLDIR=1 -endif -ifeq ($(OS_TARGET),freebsd) -UNIXINSTALLDIR=1 -endif -else -# Normal install -ifeq ($(OS_SOURCE),linux) -UNIXINSTALLDIR=1 -endif -ifeq ($(OS_SOURCE),freebsd) -UNIXINSTALLDIR=1 -endif -endif - -# set the prefix directory where to install everything -ifndef PREFIXINSTALLDIR -ifdef UNIXINSTALLDIR -PREFIXINSTALLDIR=/usr -else -PREFIXINSTALLDIR=/pp -endif -endif -export PREFIXINSTALLDIR - -# Where to place the resulting zip files -ifndef DESTZIPDIR -DESTZIPDIR:=$(BASEDIR) -endif -export DESTZIPDIR - -##################################################################### -# Install Directories -##################################################################### - -# set the base directory where to install everything -ifndef BASEINSTALLDIR -ifdef UNIXINSTALLDIR -BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION) -else -BASEINSTALLDIR=$(PREFIXINSTALLDIR) -endif -endif - -# set the directory where to install the binaries -ifndef BININSTALLDIR -ifdef UNIXINSTALLDIR -BININSTALLDIR=$(PREFIXINSTALLDIR)/bin -else -BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET) -endif -endif - -# set the directory where to install the units. -ifndef UNITINSTALLDIR -UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET) -ifdef UNITSUBDIR -UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR) -endif -endif - -# Where to install shared libraries -ifndef LIBINSTALLDIR -ifdef UNIXINSTALLDIR -LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib -else -LIBINSTALLDIR=$(UNITINSTALLDIR) -endif -endif - -# Where the source files will be stored -ifndef SOURCEINSTALLDIR -ifdef UNIXINSTALLDIR -SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION) -else -SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source -endif -ifdef SOURCESUBDIR -SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR) -endif -endif - -# Where the doc files will be stored -ifndef DOCINSTALLDIR -ifdef UNIXINSTALLDIR -DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION) -else -DOCINSTALLDIR=$(BASEINSTALLDIR)/doc -endif -endif - -# Where to install the examples, under linux we use the doc dir -# because the copytree command will create a subdir itself -ifndef EXAMPLEINSTALLDIR -ifdef UNIXINSTALLDIR -EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples -else -EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples -endif -ifdef EXAMPLESUBDIR -EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR) -endif -endif - -# Where the some extra (data)files will be stored -ifndef DATAINSTALLDIR -DATAINSTALLDIR=$(BASEINSTALLDIR) -endif - -##################################################################### -# Redirection -##################################################################### - -ifndef REDIRFILE -REDIRFILE=log -endif - -ifdef REDIR -ifndef inUnix -override FPC=redir -eo $(FPC) -endif -# set the verbosity to max -override FPCOPT+=-va -override REDIR:= >> $(REDIRFILE) -endif - - -##################################################################### -# Compiler Command Line -##################################################################### - -# Load commandline OPTDEF and add FPC_CPU define -override FPCOPTDEF:=-d$(CPU_TARGET) - -# Load commandline OPT and add target and unit dir to be sure -ifneq ($(OS_TARGET),$(OS_SOURCE)) -override FPCOPT+=-T$(OS_TARGET) -endif - -# User dirs should be first, so they are looked at first -ifdef UNITDIR -override FPCOPT+=$(addprefix -Fu,$(UNITDIR)) -endif -ifdef LIBDIR -override FPCOPT+=$(addprefix -Fl,$(LIBDIR)) -endif -ifdef OBJDIR -override FPCOPT+=$(addprefix -Fo,$(OBJDIR)) -endif -ifdef INCDIR -override FPCOPT+=$(addprefix -Fi,$(INCDIR)) -endif - -# Smartlinking -ifdef LINKSMART -override FPCOPT+=-XX -endif - -# Smartlinking creation -ifdef CREATESMART -override FPCOPT+=-CX -endif - -# Debug -ifdef DEBUG -override FPCOPT+=-gl -dDEBUG -endif - -# Release mode (strip, optimize and don't load ppc386.cfg) -# 0.99.12b has a bug in the optimizer so don't use it by default -ifdef RELEASE -ifeq ($(FPC_VERSION),0.99.12) -override FPCOPT+=-Xs -OGp3 -n -else -override FPCOPT+=-Xs -OG2p3 -n -endif -endif - -# Strip -ifdef STRIP -override FPCOPT+=-Xs -endif - -# Optimizer -ifdef OPTIMIZE -override FPCOPT+=-OG2p3 -endif - -# Verbose settings (warning,note,info) -ifdef VERBOSE -override FPCOPT+=-vwni -endif - -ifdef NEEDOPT -override FPCOPT+=$(NEEDOPT) -endif - -ifdef NEEDUNITDIR -override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR)) -endif - -ifdef UNITSDIR -override FPCOPT+=-Fu$(UNITSDIR) -endif - -# Target dirs and the prefix to use for clean/install -ifdef TARGETDIR -override FPCOPT+=-FE$(TARGETDIR) -ifeq ($(TARGETDIR),.) -override TARGETDIRPREFIX= -else -override TARGETDIRPREFIX=$(TARGETDIR)/ -endif -endif -ifdef UNITTARGETDIR -override FPCOPT+=-FU$(UNITTARGETDIR) -ifeq ($(UNITTARGETDIR),.) -override UNITTARGETDIRPREFIX= -else -override UNITTARGETDIRPREFIX=$(TARGETDIR)/ -endif -else -ifdef TARGETDIR -override UNITTARGETDIR=$(TARGETDIR) -override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX) -endif -endif - -# Add commandline options last so they can override -ifdef OPT -override FPCOPT+=$(OPT) -endif - -# Add defines from FPCOPTDEF to FPCOPT -ifdef FPCOPTDEF -override FPCOPT+=$(FPCOPTDEF) -endif - -# Error file ? -ifdef ERRORFILE -override FPCOPT+=-Fr$(ERRORFILE) -endif - -# Was a config file specified ? -ifdef CFGFILE -override FPCOPT+=@$(CFGFILE) -endif - -# For win32 the options are passed using the environment FPCEXTCMD -ifeq ($(OS_SOURCE),win32) -override FPCEXTCMD:=$(FPCOPT) -override FPCOPT:=!FPCEXTCMD -export FPCEXTCMD -endif - -# Compiler commandline -override COMPILER:=$(FPC) $(FPCOPT) - -# also call ppas if with command option -s -# but only if the OS_SOURCE and OS_TARGE are equal -ifeq (,$(findstring -s ,$(COMPILER))) -EXECPPAS= -else -ifeq ($(OS_SOURCE),$(OS_TARGET)) -EXECPPAS:=@$(PPAS) -endif -endif - -##################################################################### -# Standard rules -##################################################################### - -all: fpc_all - -debug: fpc_debug - -smart: fpc_smart - -shared: fpc_shared - -showinstall: fpc_showinstall - -install: fpc_install - -sourceinstall: fpc_sourceinstall - -exampleinstall: fpc_exampleinstall - -zipinstall: fpc_zipinstall - -zipsourceinstall: fpc_zipsourceinstall - -zipexampleinstall: fpc_zipexampleinstall - -clean: fpc_clean - -distclean: fpc_distclean - -cleanall: fpc_cleanall - -info: fpc_info - -.PHONY: all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info - -##################################################################### -# Units -##################################################################### - -.PHONY: fpc_units - -override ALLTARGET+=fpc_units - -override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS)) -override INSTALLPPUFILES+=$(UNITPPUFILES) -override CLEANPPUFILES+=$(UNITPPUFILES) - -fpc_units: $(UNITPPUFILES) - -##################################################################### -# Resource strings -##################################################################### - -ifdef RSTOBJECTS -override RSTFILES=$(addsuffix $(RSTEXT),$(RSTOBJECTS)) - -override CLEANRSTFILES+=$(RSTFILES) -endif - -##################################################################### -# General compile rules -##################################################################### - -.PHONY: fpc_packages fpc_all fpc_debug - -$(FPCMADE): $(ALLTARGET) - @$(ECHO) Compiled > $(FPCMADE) - -fpc_packages: $(COMPILEPACKAGES) - -fpc_all: fpc_packages $(FPCMADE) - -fpc_debug: - $(MAKE) all DEBUG=1 - -# Search paths for .ppu if targetdir is set -ifdef UNITTARGETDIR -vpath %$(PPUEXT) $(UNITTARGETDIR) -endif - -# General compile rules, available for both possible PASEXT - -.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp - -%$(PPUEXT): %.pp - $(COMPILER) $< $(REDIR) - $(EXECPPAS) - -%$(PPUEXT): %.pas - $(COMPILER) $< $(REDIR) - $(EXECPPAS) - -%$(EXEEXT): %.pp - $(COMPILER) $< $(REDIR) - $(EXECPPAS) - -%$(EXEEXT): %.pas - $(COMPILER) $< $(REDIR) - $(EXECPPAS) - -##################################################################### -# Library -##################################################################### - -.PHONY: fpc_smart fpc_shared - -ifdef LIBVERSION -LIBFULLNAME=$(LIBNAME).$(LIBVERSION) -else -LIBFULLNAME=$(LIBNAME) -endif - -# Default sharedlib units are all unit objects -ifndef SHAREDLIBUNITOBJECTS -SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS) -endif - -fpc_smart: - $(MAKE) all LINKSMART=1 CREATESMART=1 - -fpc_shared: all -ifdef HASSHAREDLIB -ifndef LIBNAME - @$(ECHO) "LIBNAME not set" -else - $(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME) -endif -else - @$(ECHO) "Shared Libraries not supported" -endif - -##################################################################### -# Install rules -##################################################################### - -.PHONY: fpc_showinstall fpc_install - -ifdef EXTRAINSTALLUNITS -override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS)) -endif - -ifdef INSTALLPPUFILES -override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES)) -ifdef PPUFILES -INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)) -else -INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))) -endif -override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES)) -endif - -ifdef INSTALLEXEFILES -override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES)) -endif - -fpc_showinstall: $(SHOWINSTALLTARGET) -ifdef INSTALLEXEFILES - @$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES)) -endif -ifdef INSTALLPPUFILES - @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES)) -ifneq ($(INSTALLPPULINKFILES),) - @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES)) -endif -ifneq ($(wildcard $(LIBFULLNAME)),) - @$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME) -ifdef HASSHAREDLIB - @$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME) -endif -endif -endif -ifdef EXTRAINSTALLFILES - @$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES)) -endif - -fpc_install: $(INSTALLTARGET) -# Create UnitInstallFiles -ifdef INSTALLEXEFILES - $(MKDIR) $(BININSTALLDIR) -# Compress the exes if upx is defined -ifdef UPXPROG - -$(UPXPROG) $(INSTALLEXEFILES) -endif - $(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR) -endif -ifdef INSTALLPPUFILES - $(MKDIR) $(UNITINSTALLDIR) - $(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR) -ifneq ($(INSTALLPPULINKFILES),) - $(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR) -endif -ifneq ($(wildcard $(LIBFULLNAME)),) - $(MKDIR) $(LIBINSTALLDIR) - $(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR) -ifdef inUnix - ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME) -endif -endif -endif -ifdef EXTRAINSTALLFILES - $(MKDIR) $(DATAINSTALLDIR) - $(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR) -endif - -##################################################################### -# SourceInstall rules -##################################################################### - -.PHONY: fpc_sourceinstall - -ifndef SOURCETOPDIR -SOURCETOPDIR=$(BASEDIR) -endif - -fpc_sourceinstall: clean - $(MKDIR) $(SOURCEINSTALLDIR) - $(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR) - -##################################################################### -# exampleinstall rules -##################################################################### - -.PHONY: fpc_exampleinstall - -fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS)) -ifdef EXAMPLESOURCEFILES - $(MKDIR) $(EXAMPLEINSTALLDIR) - $(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR) -endif -ifdef EXAMPLEDIROBJECTS -ifndef EXAMPLESOURCEFILES - $(MKDIR) $(EXAMPLEINSTALLDIR) -endif - $(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR) -endif - -##################################################################### -# Zip -##################################################################### - -.PHONY: fpc_zipinstall - -# Create suffix to add -ifndef PACKAGESUFFIX -PACKAGESUFFIX=$(OS_TARGET) -ifeq ($(OS_TARGET),go32v2) -PACKAGESUFFIX=go32 -endif -ifeq ($(OS_TARGET),win32) -PACKAGESUFFIX=w32 -endif -endif - -# Temporary path to pack a file -ifndef PACKDIR -ifndef inUnix -PACKDIR=$(BASEDIR)/pack_tmp -else -PACKDIR=/tmp/fpc-pack -endif -endif - -# Maybe create default zipname from packagename -ifndef ZIPNAME -ifdef PACKAGENAME -ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX) -endif -endif - -# Use tar by default under linux -ifndef USEZIP -ifdef inUnix -USETAR=1 -endif -endif - -fpc_zipinstall: -ifndef ZIPNAME - @$(ECHO) "Please specify ZIPNAME!" - @exit 1 -else - $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR) -ifdef USETAR - $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) - cd $(PACKDIR) ; $(TARPROG) cf$(TAROPT) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR) -else - $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) - cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR) -endif - $(DELTREE) $(PACKDIR) -endif - -.PHONY: fpc_zipsourceinstall - -fpc_zipsourceinstall: - $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src - -.PHONY: fpc_zipexampleinstall - -fpc_zipexampleinstall: - $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm - -##################################################################### -# Clean rules -##################################################################### - -.PHONY: fpc_clean fpc_cleanall fpc_distclean - -ifdef EXEFILES -override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES)) -endif - -ifdef EXTRACLEANUNITS -override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS)) -endif - -ifdef CLEANPPUFILES -override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES)) -# Get the .o and .a files created for the units -ifdef PPUFILES -CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES)) -else -CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))) -endif -override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)) -endif - -fpc_clean: $(CLEANTARGET) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif -ifdef CLEANPPUFILES - -$(DEL) $(CLEANPPUFILES) -endif -ifneq ($(CLEANPPULINKFILES),) - -$(DEL) $(CLEANPPULINKFILES) -endif -ifdef CLEANRSTFILES - -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES)) -endif -ifdef EXTRACLEANFILES - -$(DEL) $(EXTRACLEANFILES) -endif -ifdef LIBNAME - -$(DEL) $(LIBNAME) $(LIBFULLNAME) -endif - -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE) - -fpc_distclean: fpc_clean - -# Also run clean first if targetdir is set. Unittargetdir is always -# set if targetdir or unittargetdir is specified -ifdef UNITTARGETDIR -TARGETDIRCLEAN=fpc_clean -endif - -fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif - -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT) - -$(DELTREE) *$(SMARTEXT) - -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE) - -##################################################################### -# Info rules -##################################################################### - -.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \ - fpc_dirinfo - -fpc_info: $(INFOTARGET) - -fpc_infocfg: - @$(ECHO) - @$(ECHO) == Configuration info == - @$(ECHO) - @$(ECHO) FPC....... $(FPC) - @$(ECHO) Version... $(FPC_VERSION) - @$(ECHO) CPU....... $(CPU_TARGET) - @$(ECHO) Source.... $(OS_SOURCE) - @$(ECHO) Target.... $(OS_TARGET) - @$(ECHO) - -fpc_infoobjects: - @$(ECHO) - @$(ECHO) == Object info == - @$(ECHO) - @$(ECHO) LoaderObjects..... $(LOADEROBJECTS) - @$(ECHO) UnitObjects....... $(UNITOBJECTS) - @$(ECHO) ExeObjects........ $(EXEOBJECTS) - @$(ECHO) - @$(ECHO) ExtraCleanUnits... $(EXTRACLEANUNITS) - @$(ECHO) ExtraCleanFiles... $(EXTRACLEANFILES) - @$(ECHO) - @$(ECHO) ExtraInstallUnits. $(EXTRAINSTALLUNITS) - @$(ECHO) ExtraInstallFiles. $(EXTRAINSTALLFILES) - @$(ECHO) - -fpc_infoinstall: - @$(ECHO) - @$(ECHO) == Install info == - @$(ECHO) -ifdef DATE - @$(ECHO) DateStr.............. $(DATESTR) -endif -ifdef PACKAGEPREFIX - @$(ECHO) PackagePrefix........ $(PACKAGEPREFIX) -endif -ifdef PACKAGENAME - @$(ECHO) PackageName.......... $(PACKAGENAME) -endif - @$(ECHO) PackageSuffix........ $(PACKAGESUFFIX) - @$(ECHO) - @$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR) - @$(ECHO) BinInstallDir........ $(BININSTALLDIR) - @$(ECHO) LibInstallDir........ $(LIBINSTALLDIR) - @$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR) - @$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR) - @$(ECHO) DocInstallDir........ $(DOCINSTALLDIR) - @$(ECHO) DataInstallDir....... $(DATAINSTALLDIR) - @$(ECHO) - @$(ECHO) DestZipDir........... $(DESTZIPDIR) - @$(ECHO) ZipName.............. $(ZIPNAME) - @$(ECHO) - -##################################################################### -# Local Makefile -##################################################################### - -ifneq ($(wildcard fpcmake.loc),) -include fpcmake.loc -endif - diff --git a/gfx/template/Makefile.fpc b/gfx/template/Makefile.fpc deleted file mode 100644 index 85bbc17e..00000000 --- a/gfx/template/Makefile.fpc +++ /dev/null @@ -1,22 +0,0 @@ -# -# Makefile.fpc for fpGFX target template -# - -[targets] -units=gfx_xxx -# do not compile gfximpl for this dummy target -rst=gfx_xxx - -[require] -options=-S2h -packages= - -[libs] -libname=fpgfx_xxx - -[install] -subdir= - -[dirs] -fpcdir=../../../.. -unitdir=.. diff --git a/gfx/template/gfx_xxx.pas b/gfx/template/gfx_xxx.pas deleted file mode 100644 index 257be415..00000000 --- a/gfx/template/gfx_xxx.pas +++ /dev/null @@ -1,170 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - GFX_xxx - Template for new targets - - Copyright (C) 2006 - 2007 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. -} -unit GFX_xxx; - -{$ifdef fpc} - {$mode delphi}{$H+} -{$endif} - -interface - -uses - SysUtils, Classes, - GfxBase; - - -type - - ExxxError = class(EGfxError); - - { TxxxFont } - - TxxxFont = class(TFCustomFont) - public - class function GetDefaultFontName(const AFontClass: TGfxFontClass): String; override; - constructor Create(const Descriptor: String); - destructor Destroy; override; - end; - - - { TxxxCanvas } - - TxxxCanvas = class(TFCustomCanvas) - protected - function DoExcludeClipRect(const ARect: TRect): Boolean; override; - function DoIntersectClipRect(const ARect: TRect): Boolean; override; - function DoUnionClipRect(const ARect: TRect): Boolean; override; - function DoGetClipRect: TRect; override; - procedure DoDrawArc(const ARect: TRect; StartAngle, EndAngle: Single); override; - procedure DoDrawCircle(const ARect: TRect); override; - procedure DoDrawLine(const AFrom, ATo: TPoint); override; - procedure DoDrawPoint(const APoint: TPoint); override; - procedure DoFillRect(const ARect: TRect); override; - procedure DoTextOut(const APosition: TPoint; const AText: String); override; - procedure DoCopyRect(ASource: TFCustomCanvas; const ASourceRect: TRect; const ADestPos: TPoint); override; - procedure DoMaskedCopyRect(ASource, AMask: TFCustomCanvas; const ASourceRect: TRect; const AMaskPos, ADestPos: TPoint); override; - procedure DoDrawImageRect(AImage: TFCustomBitmap; ASourceRect: TRect; const ADestPos: TPoint); override; - public - constructor Create(AHandle: HDC); - destructor Destroy; override; - function MapColor(const AColor: TGfxColor): TGfxPixel; override; - function FontCellHeight: Integer; override; - function TextExtent(const AText: String): TSize; override; - procedure SaveState; override; - procedure RestoreState; override; - procedure EmptyClipRect; override; - procedure DoSetColor(AColor: TGfxPixel); override; - procedure SetFont(AFont: TFCustomFont); override; - procedure SetLineStyle(ALineStyle: TGfxLineStyle); override; - end; - - - TxxxWindowCanvas = class(TxxxCanvas) - public - constructor Create(AWnd: HWND); - destructor Destroy; override; - end; - - - TxxxBitmapCanvas = class(TxxxCanvas) - public - constructor Create(ABitmap: HBITMAP; AWidth, AHeight: Integer); - destructor Destroy; override; - end; - - { TxxxBitmap } - - TxxxBitmap = class(TFCustomBitmap) - private - IsLocked: Boolean; - public - constructor Create(AWidth, AHeight: Integer; APixelFormat: TGfxPixelFormat); override; - destructor Destroy; override; - procedure Lock(out AData: Pointer; out AStride: LongWord); override; - procedure Unlock; override; - end; - - { TxxxScreen } - - TxxxScreen = class(TFCustomScreen) - public - constructor Create; override; - end; - - - { TxxxApplication } - - TxxxApplication = class(TFCustomApplication) - private - public - { default methods } - constructor Create; override; - destructor Destroy; override; - procedure AddWindow(AWindow: TFCustomWindow); override; - procedure Initialize(ADisplayName: String = ''); override; - procedure Run; override; - procedure Quit; override; - end; - - { TxxxWindow } - - TxxxWindow = class(TFCustomWindow) - protected - function GetTitle: String; override; - procedure SetTitle(const ATitle: String); override; - procedure DoSetCursor; override; - function GetHandle: PtrUInt; override; - public - { Constructors / Destructors } - constructor Create(AParent: TFCustomWindow; AWindowOptions: TFWindowOptions); override; - destructor Destroy; override; - { Widget controling methods } - procedure SetPosition(const APosition: TPoint); override; - procedure SetSize(const ASize: TSize); override; - procedure SetMinMaxSize(const AMinSize, AMaxSize: TSize); override; - procedure SetClientSize(const ASize: TSize); override; - procedure SetMinMaxClientSize(const AMinSize, AMaxSize: TSize); override; - procedure Show; override; - procedure Invalidate; override; - procedure CaptureMouse; override; - procedure ReleaseMouse; override; - { Event processing methods } - procedure EvCreate; override; - procedure EvFocusIn; override; - procedure EvFocusOut; override; - procedure EvHide; override; - procedure EvKeyPressed(AKey: Word); override; - procedure EvKeyReleased(AKey: Word); override; - procedure EvKeyChar(AKeyChar: Char); override; - procedure EvMouseEnter(const AMousePos: TPoint); override; - procedure EvMouseLeave; override; - procedure EvMousePressed(AButton: TMouseButton; const AMousePos: TPoint); override; - procedure EvMouseReleased(AButton: TMouseButton; const AMousePos: TPoint); override; - procedure EvMouseMove(const AMousePos: TPoint); override; - procedure EvMouseWheel(AWheelDelta: Single; const AMousePos: TPoint); override; - procedure EvPaint; override; - procedure EvMove; override; - procedure EvResize; override; - procedure EvShow; override; - end; - - -implementation - -uses fpgfx; - -end. - diff --git a/gfx/template/gfxinterface.pas b/gfx/template/gfxinterface.pas deleted file mode 100644 index 0f5374b8..00000000 --- a/gfx/template/gfxinterface.pas +++ /dev/null @@ -1,39 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - GFXInterface - Default target selection unit - - Copyright (C) 2000 - 2006 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. -} -unit GFXInterface; - -interface - -uses GFX_xxx; - -type - - TDefFont = TxxxFont; - - TDefCanvas = TxxxCanvas; - - TDefBitmap = TxxxBitmap; - - TDefScreen = TxxxScreen; - - TDefApplication = TxxxApplication; - - TDefWindow = TxxxWindow; - -implementation - -end. - diff --git a/gfx/unitkeys.pas b/gfx/unitkeys.pas deleted file mode 100644 index 439f7c38..00000000 --- a/gfx/unitkeys.pas +++ /dev/null @@ -1,347 +0,0 @@ -{ unitkeys.pas: some unicode translations - File maintainer: nvitya@freemail.hu - -History: -} - -unit unitkeys; - -{$ifdef FPC} - {$mode objfpc}{$H+} -{$endif} - -interface - -uses - Classes, SysUtils; - -function TranslateChar(page, ch : char) : char; - -// This conversion was taken from the OppenOffice 1.0.1 source code. -procedure KeySymToUnicode(ks : longword; res : PWord); - -implementation - -type - unichar = word; - -function TranslateChar(page, ch : char) : char; -begin - result := ch; - // some simple hungarian translation> - if ord(page) = 1 then - begin - case ord(ch) of - $50 : result := chr($D5); - $51 : result := chr($F5); - - $70 : result := chr($DB); - $71 : result := chr($FB); - end; - //writeln(ord(ch),' -> ',result); - end; -end; - -const - -// Latin-1 Byte 3 = $00 - keymap00 : array[32..255] of unichar = ( - $0020, $0021, $0022, $0023, $0024, $0025, $0026, $0027, - $0028, $0029, $002a, $002b, $002c, $002d, $002e, $002f, - $0030, $0031, $0032, $0033, $0034, $0035, $0036, $0037, - $0038, $0039, $003a, $003b, $003c, $003d, $003e, $003f, - $0040, $0041, $0042, $0043, $0044, $0045, $0046, $0047, - $0048, $0049, $004a, $004b, $004c, $004d, $004e, $004f, - $0050, $0051, $0052, $0053, $0054, $0055, $0056, $0057, - $0058, $0059, $005a, $005b, $005c, $005d, $005e, $005f, - $0060, $0061, $0062, $0063, $0064, $0065, $0066, $0067, - $0068, $0069, $006a, $006b, $006c, $006d, $006e, $006f, - $0070, $0071, $0072, $0073, $0074, $0075, $0076, $0077, - $0078, $0079, $007a, $007b, $007c, $007d, $007e, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $00a0, $00a1, $00a2, $00a3, $00a4, $00a5, $00a6, $00a7, - $00a8, $00a9, $00aa, $00ab, $00ac, $00ad, $00ae, $00af, - $00b0, $00b1, $00b2, $00b3, $00b4, $00b5, $00b6, $00b7, - $00b8, $00b9, $00ba, $00bb, $00bc, $00bd, $00be, $00bf, - $00c0, $00c1, $00c2, $00c3, $00c4, $00c5, $00c6, $00c7, - $00c8, $00c9, $00ca, $00cb, $00cc, $00cd, $00ce, $00cf, - $00d0, $00d1, $00d2, $00d3, $00d4, $00d5, $00d6, $00d7, - $00d8, $00d9, $00da, $00db, $00dc, $00dd, $00de, $00df, - $00e0, $00e1, $00e2, $00e3, $00e4, $00e5, $00e6, $00e7, - $00e8, $00e9, $00ea, $00eb, $00ec, $00ed, $00ee, $00ef, - $00f0, $00f1, $00f2, $00f3, $00f4, $00f5, $00f6, $00f7, - $00f8, $00f9, $00fa, $00fb, $00fc, $00fd, $00fe, $00ff - ); - -// Latin-2 Byte 3 = $01 - keymap01 : array[161..255] of unichar = ( - $0104, $02d8, $0141, $0000, $013d, $015a, $0000, $0000, - $0160, $015e, $0164, $0179, $0000, $017d, $017b, $0000, - $0105, $02db, $0142, $0000, $013e, $015b, $02c7, $0000, - $0161, $015f, $0165, $017a, $02dd, $017e, $017c, $0154, - $0000, $0000, $0102, $0000, $0139, $0106, $0000, $010c, - $0000, $0118, $0000, $011a, $0000, $0000, $010e, $0110, - $0143, $0147, $0000, $0000, $0150, $0000, $0000, $0158, - $016e, $0000, $0170, $0000, $0000, $0162, $0000, $0155, - $0000, $0000, $0103, $0000, $013a, $0107, $0000, $010d, - $0000, $0119, $0000, $011b, $0000, $0000, $010f, $0111, - $0144, $0148, $0000, $0000, $0151, $0000, $0000, $0159, - $016f, $0000, $0171, $0000, $0000, $0163, $02d9 ); - -// Latin-3 Byte 3 = $02 - keymap02 : array[161..254] of unichar = ( - $0126, $0000, $0000, $0000, $0000, $0124, $0000, $0000, - $0130, $0000, $011e, $0134, $0000, $0000, $0000, $0000, - $0127, $0000, $0000, $0000, $0000, $0125, $0000, $0000, - $0131, $0000, $011f, $0135, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $010a, $0108, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0120, $0000, $0000, $011c, - $0000, $0000, $0000, $0000, $016c, $015c, $0000, $0000, - $0000, $0000, $0000, $0000, $010b, $0109, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0121, $0000, $0000, $011d, - $0000, $0000, $0000, $0000, $016d, $015d ); - -// Latin-4 Byte 3 = $03 - keymap03 : array[162..254] of unichar = ( - $0138, $0156, $0000, $0128, $013b, $0000, $0000, $0000, - $0112, $0122, $0166, $0000, $0000, $0000, $0000, $0000, - $0000, $0157, $0000, $0129, $013c, $0000, $0000, $0000, - $0113, $0123, $0167, $014a, $0000, $014b, $0100, $0000, - $0000, $0000, $0000, $0000, $0000, $012e, $0000, $0000, - $0000, $0000, $0116, $0000, $0000, $012a, $0000, $0145, - $014c, $0136, $0000, $0000, $0000, $0000, $0000, $0172, - $0000, $0000, $0000, $0168, $016a, $0000, $0101, $0000, - $0000, $0000, $0000, $0000, $0000, $012f, $0000, $0000, - $0000, $0000, $0117, $0000, $0000, $012b, $0000, $0146, - $014d, $0137, $0000, $0000, $0000, $0000, $0000, $0173, - $0000, $0000, $0000, $0169, $016b ); - -// Kana Byte 3 = $04 - keymap04 : array[126..223] of unichar = ( - $203e, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $3002, $300c, $300d, $3001, $30fb, - $30f2, $30a1, $30a3, $30a5, $30a7, $30a9, $30e3, $30e5, - $30e7, $30c3, $30fc, $30a2, $30a4, $30a6, $30a8, $30aa, - $30ab, $30ad, $30af, $30b1, $30b3, $30b5, $30b7, $30b9, - $30bb, $30bd, $30bf, $30c1, $30c4, $30c6, $30c8, $30ca, - $30cb, $30cc, $30cd, $30ce, $30cf, $30d2, $30d5, $30d8, - $30db, $30de, $30df, $30e0, $30e1, $30e2, $30e4, $30e6, - $30e8, $30e9, $30ea, $30eb, $30ec, $30ed, $30ef, $30f3, - $309b, $309c ); - -// Arabic Byte 3 = $05 - keymap05 : array[172..242] of unichar = ( - $060c, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $061b, - $0000, $0000, $0000, $061f, $0000, $0621, $0622, $0623, - $0624, $0625, $0626, $0627, $0628, $0629, $062a, $062b, - $062c, $062d, $062e, $062f, $0630, $0631, $0632, $0633, - $0634, $0635, $0636, $0637, $0638, $0639, $063a, $0000, - $0000, $0000, $0000, $0000, $0640, $0641, $0642, $0643, - $0644, $0645, $0646, $0647, $0648, $0649, $064a, $064b, - $064c, $064d, $064e, $064f, $0650, $0651, $0652 ); - -// Cyrillic Byte 3 = $06 - keymap06 : array[161..255] of unichar = ( - $0452, $0453, $0451, $0454, $0455, $0456, $0457, $0458, - $0459, $045a, $045b, $045c, $0000, $045e, $045f, $2116, - $0402, $0403, $0401, $0404, $0405, $0406, $0407, $0408, - $0409, $040a, $040b, $040c, $0000, $040e, $040f, $044e, - $0430, $0431, $0446, $0434, $0435, $0444, $0433, $0445, - $0438, $0439, $043a, $043b, $043c, $043d, $043e, $043f, - $044f, $0440, $0441, $0442, $0443, $0436, $0432, $044c, - $044b, $0437, $0448, $044d, $0449, $0447, $044a, $042e, - $0410, $0411, $0426, $0414, $0415, $0424, $0413, $0425, - $0418, $0419, $041a, $041b, $041c, $041d, $041e, $041f, - $042f, $0420, $0421, $0422, $0423, $0416, $0412, $042c, - $042b, $0417, $0428, $042d, $0429, $0427, $042a ); - -// Greek Byte 3 = $07 - keymap07 : array[161..249] of unichar = ( - $0386, $0388, $0389, $038a, $03aa, $0000, $038c, $038e, - $03ab, $0000, $038f, $0000, $0000, $0385, $2015, $0000, - $03ac, $03ad, $03ae, $03af, $03ca, $0390, $03cc, $03cd, - $03cb, $03b0, $03ce, $0000, $0000, $0000, $0000, $0000, - $0391, $0392, $0393, $0394, $0395, $0396, $0397, $0398, - $0399, $039a, $039b, $039c, $039d, $039e, $039f, $03a0, - $03a1, $03a3, $0000, $03a4, $03a5, $03a6, $03a7, $03a8, - $03a9, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $03b1, $03b2, $03b3, $03b4, $03b5, $03b6, $03b7, $03b8, - $03b9, $03ba, $03bb, $03bc, $03bd, $03be, $03bf, $03c0, - $03c1, $03c3, $03c2, $03c4, $03c5, $03c6, $03c7, $03c8, - $03c9 ); - -// Technical Byte 3 = $08 - keymap08 : array[161..254] of unichar = ( - $23b7, $250c, $2500, $2320, $2321, $2502, $23a1, $23a3, - $23a4, $23a6, $239b, $239d, $239e, $23a0, $23a8, $23ac, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $2264, $2260, $2265, $222b, $2234, - $221d, $221e, $0000, $0000, $2207, $0000, $0000, $223c, - $2243, $0000, $0000, $0000, $21d4, $21d2, $2261, $0000, - $0000, $0000, $0000, $0000, $0000, $221a, $0000, $0000, - $0000, $2282, $2283, $2229, $222a, $2227, $2228, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $2202, $0000, - $0000, $0000, $0000, $0000, $0000, $0192, $0000, $0000, - $0000, $0000, $2190, $2191, $2192, $2193 ); - -// Special Byte 3 = $09 - keymap09 : array[224..248] of unichar = ( - $25c6, $2592, $2409, $240c, $240d, $240a, $0000, $0000, - $2424, $240b, $2518, $2510, $250c, $2514, $253c, $23ba, - $23bb, $2500, $23bc, $23bd, $251c, $2524, $2534, $252c, - $2502 ); - -// Publishing Byte 3 = $0a = 10 - keymap10 : array[161..254] of unichar = ( - $2003, $2002, $2004, $2005, $2007, $2008, $2009, $200a, - $2014, $2013, $0000, $0000, $0000, $2026, $2025, $2153, - $2154, $2155, $2156, $2157, $2158, $2159, $215a, $2105, - $0000, $0000, $2012, $2329, $0000, $232a, $0000, $0000, - $0000, $0000, $215b, $215c, $215d, $215e, $0000, $0000, - $2122, $2613, $0000, $25c1, $25b7, $25cb, $25af, $2018, - $2019, $201c, $201d, $211e, $0000, $2032, $2033, $0000, - $271d, $0000, $25ac, $25c0, $25b6, $25cf, $25ae, $25e6, - $25ab, $25ad, $25b3, $25bd, $2606, $2022, $25aa, $25b2, - $25bc, $261c, $261e, $2663, $2666, $2665, $0000, $2720, - $2020, $2021, $2713, $2717, $266f, $266d, $2642, $2640, - $260e, $2315, $2117, $2038, $201a, $201e ); - -// APL Byte 3 = $0b = 11 - keymap11 : array[163..252] of unichar = ( - $003c, $0000, $0000, $003e, $0000, $2228, $2227, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $00af, $0000, $22a5, - $2229, $230a, $0000, $005f, $0000, $0000, $0000, $2218, - $0000, $2395, $0000, $22a4, $25cb, $0000, $0000, $0000, - $2308, $0000, $0000, $222a, $0000, $2283, $0000, $2282, - $0000, $22a2, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $22a3 ); - -// Hebrew Byte 3 = $0c = 12 - keymap12 : array[223..250] of unichar = ( - $2017, $05d0, $05d1, $05d2, $05d3, $05d4, $05d5, $05d6, - $05d7, $05d8, $05d9, $05da, $05db, $05dc, $05dd, $05de, - $05df, $05e0, $05e1, $05e2, $05e3, $05e4, $05e5, $05e6, - $05e7, $05e8, $05e9, $05ea ); - -// Thai Byte 3 = $0d = 13 - keymap13 : array[161..249] of unichar = ( - $0e01, $0e02, $0e03, $0e04, $0e05, $0e06, $0e07, $0e08, - $0e09, $0e0a, $0e0b, $0e0c, $0e0d, $0e0e, $0e0f, $0e10, - $0e11, $0e12, $0e13, $0e14, $0e15, $0e16, $0e17, $0e18, - $0e19, $0e1a, $0e1b, $0e1c, $0e1d, $0e1e, $0e1f, $0e20, - $0e21, $0e22, $0e23, $0e24, $0e25, $0e26, $0e27, $0e28, - $0e29, $0e2a, $0e2b, $0e2c, $0e2d, $0e2e, $0e2f, $0e30, - $0e31, $0e32, $0e33, $0e34, $0e35, $0e36, $0e37, $0e38, - $0e39, $0e3a, $0000, $0000, $0000, $0000, $0e3f, $0e40, - $0e41, $0e42, $0e43, $0e44, $0e45, $0e46, $0e47, $0e48, - $0e49, $0e4a, $0e4b, $0e4c, $0e4d, $0000, $0000, $0e50, - $0e51, $0e52, $0e53, $0e54, $0e55, $0e56, $0e57, $0e58, - $0e59 ); - -// Korean Byte 3 = $0e = 14 - keymap14 : array[161..255] of unichar = ( - $3131, $3132, $3133, $3134, $3135, $3136, $3137, $3138, - $3139, $313a, $313b, $313c, $313d, $313e, $313f, $3140, - $3141, $3142, $3143, $3144, $3145, $3146, $3147, $3148, - $3149, $314a, $314b, $314c, $314d, $314e, $314f, $3150, - $3151, $3152, $3153, $3154, $3155, $3156, $3157, $3158, - $3159, $315a, $315b, $315c, $315d, $315e, $315f, $3160, - $3161, $3162, $3163, $11a8, $11a9, $11aa, $11ab, $11ac, - $11ad, $11ae, $11af, $11b0, $11b1, $11b2, $11b3, $11b4, - $11b5, $11b6, $11b7, $11b8, $11b9, $11ba, $11bb, $11bc, - $11bd, $11be, $11bf, $11c0, $11c1, $11c2, $316d, $3171, - $3178, $317f, $3181, $3184, $3186, $318d, $318e, $11eb, - $11f0, $11f9, $0000, $0000, $0000, $0000, $20a9 ); - -// missing: -// Latin-8 Byte 3 = $12 = 18 - -// Latin-9 Byte 3 = $13 = 19 - keymap19 : array[188..190] of unichar = ( - $0152, $0153, $0178 ); - -// missing: -// Armenian Byte 3 = $14 = 20 -// Georgian Byte 3 = $15 = 21 -// Azeri Byte 3 = $16 = 22 -// Vietnamese Byte 3 = $1e = 30 - -// Currency Byte 3 = $20 = 32 - keymap32 : array[160..172] of unichar = ( - $20a0, $20a1, $20a2, $20a3, $20a4, $20a5, $20a6, $20a7, - $20a8, $0000, $20aa, $20ab, $20ac ); - -// Keyboard (Keypad mappings) Byte 3 = $ff = 255 - keymap255 : array[128..189] of unichar = ( - $0020, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $FF0D, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, - $0000, $0000, $002a, $002b, $002c, $002d, $002e, $002f, - $0030, $0031, $0032, $0033, $0034, $0035, $0036, $0037, - $0038, $0039, $0000, $0000, $0000, $003d ); - -type - keymap = array[0..255] of word; - mapptr = ^keymap; - -procedure TranslateCode(var res : word; ccode : byte; map : mapptr; lowind,highind : byte); -begin - //writeln('code: ',ccode,' low: ',lowind,' high: ',highind); - if (ccode >= lowind) and (ccode <= highind) then res := map^[ccode-lowind]; -end; - -procedure KeySymToUnicode(ks : longword; res : PWord); -var - table : byte; - ccode : byte; -begin - table := ((ks and $0000FF00) shr 8); - ccode := ks and $ff; - res^ := ks and $FFFF; - case table of - 00 : TranslateCode(res^, ccode, @keymap00, low(keymap00), high(keymap00) ); - 01 : TranslateCode(res^, ccode, @keymap01, low(keymap01), high(keymap01) ); - 02 : TranslateCode(res^, ccode, @keymap02, low(keymap01), high(keymap02) ); - 03 : TranslateCode(res^, ccode, @keymap03, low(keymap01), high(keymap03) ); - 04 : TranslateCode(res^, ccode, @keymap04, low(keymap01), high(keymap04) ); - 05 : TranslateCode(res^, ccode, @keymap05, low(keymap01), high(keymap05) ); - 06 : TranslateCode(res^, ccode, @keymap06, low(keymap01), high(keymap06) ); - 07 : TranslateCode(res^, ccode, @keymap07, low(keymap01), high(keymap07) ); - 08 : TranslateCode(res^, ccode, @keymap08, low(keymap01), high(keymap08) ); - 09 : TranslateCode(res^, ccode, @keymap09, low(keymap01), high(keymap09) ); - - 10 : TranslateCode(res^, ccode, @keymap10, low(keymap10), high(keymap10) ); - 11 : TranslateCode(res^, ccode, @keymap11, low(keymap11), high(keymap11) ); - 12 : TranslateCode(res^, ccode, @keymap12, low(keymap12), high(keymap12) ); - 13 : TranslateCode(res^, ccode, @keymap13, low(keymap13), high(keymap13) ); - 14 : TranslateCode(res^, ccode, @keymap14, low(keymap14), high(keymap14) ); -// 15 : TranslateCode(res^, ccode, @keymap15, low(keymap15), high(keymap15) ); -// 16 : TranslateCode(res^, ccode, @keymap16, low(keymap16), high(keymap16) ); -// 17 : TranslateCode(res^, ccode, @keymap17, low(keymap17), high(keymap17) ); -// 18 : TranslateCode(res^, ccode, @keymap18, low(keymap18), high(keymap18) ); - 19 : TranslateCode(res^, ccode, @keymap19, low(keymap19), high(keymap19) ); - - 32 : TranslateCode(res^, ccode, @keymap32, low(keymap32), high(keymap32) ); - - 255 : TranslateCode(res^, ccode, @keymap255, low(keymap255), high(keymap255) ); - end; -end; - -end. diff --git a/gfx/x11/Makefile b/gfx/x11/Makefile deleted file mode 100644 index a4d1387d..00000000 --- a/gfx/x11/Makefile +++ /dev/null @@ -1,1985 +0,0 @@ -# -# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/08/28] -# -default: all -MAKEFILETARGETS=i386-linux -BSDs = freebsd netbsd openbsd darwin -UNIXs = linux $(BSDs) solaris qnx -LIMIT83fs = go32v2 os2 emx watcom -FORCE: -.PHONY: FORCE -override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH))) -ifneq ($(findstring darwin,$(OSTYPE)),) -inUnix=1 #darwin -SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH))) -else -ifeq ($(findstring ;,$(PATH)),) -inUnix=1 -SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH))) -else -SEARCHPATH:=$(subst ;, ,$(PATH)) -endif -endif -SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE)))) -PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH)))) -ifeq ($(PWD),) -PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH)))) -ifeq ($(PWD),) -$(error You need the GNU utils package to use this Makefile) -else -PWD:=$(firstword $(PWD)) -SRCEXEEXT= -endif -else -PWD:=$(firstword $(PWD)) -SRCEXEEXT=.exe -endif -ifndef inUnix -ifeq ($(OS),Windows_NT) -inWinNT=1 -else -ifdef OS2_SHELL -inOS2=1 -endif -endif -else -ifneq ($(findstring cygdrive,$(PATH)),) -inCygWin=1 -endif -endif -ifdef inUnix -SRCBATCHEXT=.sh -else -ifdef inOS2 -SRCBATCHEXT=.cmd -else -SRCBATCHEXT=.bat -endif -endif -ifdef inUnix -PATHSEP=/ -else -PATHSEP:=$(subst /,\,/) -ifdef inCygWin -PATHSEP=/ -endif -endif -ifdef PWD -BASEDIR:=$(subst \,/,$(shell $(PWD))) -ifdef inCygWin -ifneq ($(findstring /cygdrive/,$(BASEDIR)),) -BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR)) -BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR))) -BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR)) -endif -endif -else -BASEDIR=. -endif -ifdef inOS2 -ifndef ECHO -ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO=echo -else -ECHO:=$(firstword $(ECHO)) -endif -else -ECHO:=$(firstword $(ECHO)) -endif -endif -export ECHO -endif -override DEFAULT_FPCDIR=/opt/fpc/src -ifndef FPC -ifdef PP -FPC=$(PP) -endif -endif -ifndef FPC -FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH)))) -ifneq ($(FPCPROG),) -FPCPROG:=$(firstword $(FPCPROG)) -FPC:=$(shell $(FPCPROG) -PB) -ifneq ($(findstring Error,$(FPC)),) -override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH))))) -endif -else -override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH))))) -endif -endif -override FPC:=$(subst $(SRCEXEEXT),,$(FPC)) -override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT) -FOUNDFPC:=$(strip $(wildcard $(FPC))) -ifeq ($(FOUNDFPC),) -FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH)))) -ifeq ($(FOUNDFPC),) -$(error Compiler $(FPC) not found) -endif -endif -ifndef FPC_COMPILERINFO -FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO) -endif -ifndef FPC_VERSION -FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO)) -endif -export FPC FPC_VERSION FPC_COMPILERINFO -unexport CHECKDEPEND ALLDEPENDENCIES -ifndef CPU_TARGET -ifdef CPU_TARGET_DEFAULT -CPU_TARGET=$(CPU_TARGET_DEFAULT) -endif -endif -ifndef OS_TARGET -ifdef OS_TARGET_DEFAULT -OS_TARGET=$(OS_TARGET_DEFAULT) -endif -endif -ifneq ($(words $(FPC_COMPILERINFO)),5) -FPC_COMPILERINFO+=$(shell $(FPC) -iSP) -FPC_COMPILERINFO+=$(shell $(FPC) -iTP) -FPC_COMPILERINFO+=$(shell $(FPC) -iSO) -FPC_COMPILERINFO+=$(shell $(FPC) -iTO) -endif -ifndef CPU_SOURCE -CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO)) -endif -ifndef CPU_TARGET -CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO)) -endif -ifndef OS_SOURCE -OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO)) -endif -ifndef OS_TARGET -OS_TARGET:=$(word 5,$(FPC_COMPILERINFO)) -endif -FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET) -FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE) -ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) -TARGETSUFFIX=$(OS_TARGET) -SOURCESUFFIX=$(OS_SOURCE) -else -TARGETSUFFIX=$(FULL_TARGET) -SOURCESUFFIX=$(FULL_SOURCE) -endif -ifneq ($(FULL_TARGET),$(FULL_SOURCE)) -CROSSCOMPILE=1 -endif -ifeq ($(findstring makefile,$(MAKECMDGOALS)),) -ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),) -$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first) -endif -endif -ifneq ($(findstring $(OS_TARGET),$(BSDs)),) -BSDhier=1 -endif -ifeq ($(OS_TARGET),linux) -linuxHier=1 -endif -export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE -ifdef FPCDIR -override FPCDIR:=$(subst \,/,$(FPCDIR)) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=wrong -endif -else -override FPCDIR=wrong -endif -ifdef DEFAULT_FPCDIR -ifeq ($(FPCDIR),wrong) -override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR)) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=wrong -endif -endif -endif -ifeq ($(FPCDIR),wrong) -ifdef inUnix -override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=/usr/lib/fpc/$(FPC_VERSION) -endif -else -override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH)))))) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR:=$(BASEDIR) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=c:/pp -endif -endif -endif -endif -endif -ifndef CROSSBINDIR -CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX)) -endif -ifndef BINUTILSPREFIX -ifndef CROSSBINDIR -ifdef CROSSCOMPILE -BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)- -endif -endif -endif -UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX)) -ifeq ($(UNITSDIR),) -UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET)) -endif -PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra) -override PACKAGE_NAME=fpgfx -override PACKAGE_VERSION=0.2 -ifeq ($(FULL_TARGET),i386-linux) -override TARGET_UNITS+=gfx_x11 gfximpl -endif -override INSTALL_FPCPACKAGE=y -ifeq ($(FULL_TARGET),i386-linux) -override COMPILER_OPTIONS+=-S2h -endif -ifeq ($(FULL_TARGET),i386-linux) -override COMPILER_UNITDIR+=.. ../emulayer -endif -ifeq ($(FULL_TARGET),i386-linux) -override COMPILER_UNITTARGETDIR+=../units -endif -ifdef REQUIRE_UNITSDIR -override UNITSDIR+=$(REQUIRE_UNITSDIR) -endif -ifdef REQUIRE_PACKAGESDIR -override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR) -endif -ifdef ZIPINSTALL -ifneq ($(findstring $(OS_TARGET),$(UNIXs)),) -UNIXHier=1 -endif -else -ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),) -UNIXHier=1 -endif -endif -ifndef INSTALL_PREFIX -ifdef PREFIX -INSTALL_PREFIX=$(PREFIX) -endif -endif -ifndef INSTALL_PREFIX -ifdef UNIXHier -INSTALL_PREFIX=/usr/local -else -ifdef INSTALL_FPCPACKAGE -INSTALL_BASEDIR:=/pp -else -INSTALL_BASEDIR:=/$(PACKAGE_NAME) -endif -endif -endif -export INSTALL_PREFIX -ifdef INSTALL_FPCSUBDIR -export INSTALL_FPCSUBDIR -endif -ifndef DIST_DESTDIR -DIST_DESTDIR:=$(BASEDIR) -endif -export DIST_DESTDIR -ifndef COMPILER_UNITTARGETDIR -ifdef PACKAGEDIR_MAIN -COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX) -else -COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX) -endif -endif -ifndef COMPILER_TARGETDIR -COMPILER_TARGETDIR=. -endif -ifndef INSTALL_BASEDIR -ifdef UNIXHier -ifdef INSTALL_FPCPACKAGE -INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION) -else -INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME) -endif -else -INSTALL_BASEDIR:=$(INSTALL_PREFIX) -endif -endif -ifndef INSTALL_BINDIR -ifdef UNIXHier -INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin -else -INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin -ifdef INSTALL_FPCPACKAGE -ifdef CROSSCOMPILE -ifdef CROSSINSTALL -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX) -else -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX) -endif -else -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX) -endif -endif -endif -endif -ifndef INSTALL_UNITDIR -INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX) -ifdef INSTALL_FPCPACKAGE -ifdef PACKAGE_NAME -INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME) -endif -endif -endif -ifndef INSTALL_LIBDIR -ifdef UNIXHier -INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib -else -INSTALL_LIBDIR:=$(INSTALL_UNITDIR) -endif -endif -ifndef INSTALL_SOURCEDIR -ifdef UNIXHier -ifdef BSDhier -SRCPREFIXDIR=share/src -else -ifdef linuxHier -SRCPREFIXDIR=share/src -else -SRCPREFIXDIR=src -endif -endif -ifdef INSTALL_FPCPACKAGE -ifdef INSTALL_FPCSUBDIR -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME) -else -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -endif -else -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -else -ifdef INSTALL_FPCPACKAGE -ifdef INSTALL_FPCSUBDIR -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME) -else -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME) -endif -else -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source -endif -endif -endif -ifndef INSTALL_DOCDIR -ifdef UNIXHier -ifdef BSDhier -DOCPREFIXDIR=share/doc -else -ifdef linuxHier -DOCPREFIXDIR=share/doc -else -DOCPREFIXDIR=doc -endif -endif -ifdef INSTALL_FPCPACKAGE -INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -else -INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -else -ifdef INSTALL_FPCPACKAGE -INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME) -else -INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc -endif -endif -endif -ifndef INSTALL_EXAMPLEDIR -ifdef UNIXHier -ifdef INSTALL_FPCPACKAGE -ifdef BSDhier -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -else -ifdef linuxHier -INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples -else -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME) -endif -endif -else -ifdef BSDhier -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -else -ifdef linuxHier -INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -else -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -endif -endif -else -ifdef INSTALL_FPCPACKAGE -INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME) -else -INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples -endif -endif -endif -ifndef INSTALL_DATADIR -INSTALL_DATADIR=$(INSTALL_BASEDIR) -endif -ifndef INSTALL_SHAREDDIR -INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib -endif -ifdef CROSSCOMPILE -ifndef CROSSBINDIR -CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX)) -ifeq ($(CROSSBINDIR),) -CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE)) -endif -endif -else -CROSSBINDIR= -endif -ifeq ($(OS_SOURCE),linux) -ifndef GCCLIBDIR -ifeq ($(CPU_TARGET),i386) -ifneq ($(findstring x86_64,$(shell uname -a)),) -ifeq ($(BINUTILSPREFIX),) -GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`) -endif -endif -endif -ifeq ($(CPU_TARGET),powerpc64) -ifeq ($(BINUTILSPREFIX),) -GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`) -endif -endif -endif -ifndef GCCLIBDIR -CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH)))) -ifneq ($(CROSSGCC),) -GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`) -endif -endif -ifndef OTHERLIBDIR -OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }') -endif -endif -ifdef inUnix -ifeq ($(OS_SOURCE),netbsd) -OTHERLIBDIR+=/usr/pkg/lib -endif -export GCCLIBDIR OTHERLIB -endif -BATCHEXT=.bat -LOADEREXT=.as -EXEEXT=.exe -PPLEXT=.ppl -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.so -SHAREDLIBPREFIX=libfp -STATICLIBPREFIX=libp -IMPORTLIBPREFIX=libimp -RSTEXT=.rst -ifeq ($(findstring 1.0.,$(FPC_VERSION)),) -ifeq ($(OS_TARGET),go32v1) -STATICLIBPREFIX= -SHORTSUFFIX=v1 -endif -ifeq ($(OS_TARGET),go32v2) -STATICLIBPREFIX= -SHORTSUFFIX=dos -endif -ifeq ($(OS_TARGET),watcom) -STATICLIBPREFIX= -OEXT=.obj -ASMEXT=.asm -SHAREDLIBEXT=.dll -SHORTSUFFIX=wat -endif -ifeq ($(OS_TARGET),linux) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=lnx -endif -ifeq ($(OS_TARGET),freebsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=fbs -endif -ifeq ($(OS_TARGET),netbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=nbs -endif -ifeq ($(OS_TARGET),openbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=obs -endif -ifeq ($(OS_TARGET),win32) -SHAREDLIBEXT=.dll -SHORTSUFFIX=w32 -endif -ifeq ($(OS_TARGET),os2) -BATCHEXT=.cmd -AOUTEXT=.out -STATICLIBPREFIX= -SHAREDLIBEXT=.dll -SHORTSUFFIX=os2 -ECHO=echo -endif -ifeq ($(OS_TARGET),emx) -BATCHEXT=.cmd -AOUTEXT=.out -STATICLIBPREFIX= -SHAREDLIBEXT=.dll -SHORTSUFFIX=emx -ECHO=echo -endif -ifeq ($(OS_TARGET),amiga) -EXEEXT= -SHAREDLIBEXT=.library -SHORTSUFFIX=amg -endif -ifeq ($(OS_TARGET),morphos) -EXEEXT= -SHAREDLIBEXT=.library -SHORTSUFFIX=mos -endif -ifeq ($(OS_TARGET),atari) -EXEEXT=.ttp -SHORTSUFFIX=ata -endif -ifeq ($(OS_TARGET),beos) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=be -endif -ifeq ($(OS_TARGET),solaris) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=sun -endif -ifeq ($(OS_TARGET),qnx) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=qnx -endif -ifeq ($(OS_TARGET),netware) -EXEEXT=.nlm -STATICLIBPREFIX= -SHORTSUFFIX=nw -endif -ifeq ($(OS_TARGET),netwlibc) -EXEEXT=.nlm -STATICLIBPREFIX= -SHORTSUFFIX=nwl -endif -ifeq ($(OS_TARGET),macos) -BATCHEXT= -EXEEXT= -DEBUGSYMEXT=.xcoff -SHORTSUFFIX=mac -endif -ifeq ($(OS_TARGET),darwin) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=dwn -endif -ifeq ($(OS_TARGET),gba) -EXEEXT=.gba -SHAREDLIBEXT=.so -SHORTSUFFIX=gba -endif -else -ifeq ($(OS_TARGET),go32v1) -PPUEXT=.pp1 -OEXT=.o1 -ASMEXT=.s1 -SMARTEXT=.sl1 -STATICLIBEXT=.a1 -SHAREDLIBEXT=.so1 -STATICLIBPREFIX= -SHORTSUFFIX=v1 -endif -ifeq ($(OS_TARGET),go32v2) -STATICLIBPREFIX= -SHORTSUFFIX=dos -endif -ifeq ($(OS_TARGET),watcom) -STATICLIBPREFIX= -SHORTSUFFIX=wat -endif -ifeq ($(OS_TARGET),linux) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=lnx -endif -ifeq ($(OS_TARGET),freebsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=fbs -endif -ifeq ($(OS_TARGET),netbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=nbs -endif -ifeq ($(OS_TARGET),openbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=obs -endif -ifeq ($(OS_TARGET),win32) -PPUEXT=.ppw -OEXT=.ow -ASMEXT=.sw -SMARTEXT=.slw -STATICLIBEXT=.aw -SHAREDLIBEXT=.dll -SHORTSUFFIX=w32 -endif -ifeq ($(OS_TARGET),os2) -BATCHEXT=.cmd -PPUEXT=.ppo -ASMEXT=.so2 -OEXT=.oo2 -AOUTEXT=.out -SMARTEXT=.sl2 -STATICLIBPREFIX= -STATICLIBEXT=.ao2 -SHAREDLIBEXT=.dll -SHORTSUFFIX=os2 -ECHO=echo -endif -ifeq ($(OS_TARGET),amiga) -EXEEXT= -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.library -SHORTSUFFIX=amg -endif -ifeq ($(OS_TARGET),atari) -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT=.ttp -SHORTSUFFIX=ata -endif -ifeq ($(OS_TARGET),beos) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=be -endif -ifeq ($(OS_TARGET),solaris) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=sun -endif -ifeq ($(OS_TARGET),qnx) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=qnx -endif -ifeq ($(OS_TARGET),netware) -STATICLIBPREFIX= -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.nlm -EXEEXT=.nlm -SHORTSUFFIX=nw -endif -ifeq ($(OS_TARGET),netwlibc) -STATICLIBPREFIX= -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.nlm -EXEEXT=.nlm -SHORTSUFFIX=nwl -endif -ifeq ($(OS_TARGET),macos) -BATCHEXT= -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -DEBUGSYMEXT=.xcoff -SHORTSUFFIX=mac -endif -endif -ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) -FPCMADE=fpcmade.$(SHORTSUFFIX) -ZIPSUFFIX=$(SHORTSUFFIX) -ZIPCROSSPREFIX= -ZIPSOURCESUFFIX=src -ZIPEXAMPLESUFFIX=exm -else -FPCMADE=fpcmade.$(TARGETSUFFIX) -ZIPSOURCESUFFIX=.source -ZIPEXAMPLESUFFIX=.examples -ifdef CROSSCOMPILE -ZIPSUFFIX=.$(SOURCESUFFIX) -ZIPCROSSPREFIX=$(TARGETSUFFIX)- -else -ZIPSUFFIX=.$(TARGETSUFFIX) -ZIPCROSSPREFIX= -endif -endif -ifndef ECHO -ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO= __missing_command_ECHO -else -ECHO:=$(firstword $(ECHO)) -endif -else -ECHO:=$(firstword $(ECHO)) -endif -endif -export ECHO -ifndef DATE -DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(DATE),) -DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(DATE),) -DATE= __missing_command_DATE -else -DATE:=$(firstword $(DATE)) -endif -else -DATE:=$(firstword $(DATE)) -endif -endif -export DATE -ifndef GINSTALL -GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(GINSTALL),) -GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(GINSTALL),) -GINSTALL= __missing_command_GINSTALL -else -GINSTALL:=$(firstword $(GINSTALL)) -endif -else -GINSTALL:=$(firstword $(GINSTALL)) -endif -endif -export GINSTALL -ifndef CPPROG -CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(CPPROG),) -CPPROG= __missing_command_CPPROG -else -CPPROG:=$(firstword $(CPPROG)) -endif -endif -export CPPROG -ifndef RMPROG -RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(RMPROG),) -RMPROG= __missing_command_RMPROG -else -RMPROG:=$(firstword $(RMPROG)) -endif -endif -export RMPROG -ifndef MVPROG -MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MVPROG),) -MVPROG= __missing_command_MVPROG -else -MVPROG:=$(firstword $(MVPROG)) -endif -endif -export MVPROG -ifndef MKDIRPROG -MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MKDIRPROG),) -MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MKDIRPROG),) -MKDIRPROG= __missing_command_MKDIRPROG -else -MKDIRPROG:=$(firstword $(MKDIRPROG)) -endif -else -MKDIRPROG:=$(firstword $(MKDIRPROG)) -endif -endif -export MKDIRPROG -ifndef ECHOREDIR -ifndef inUnix -ECHOREDIR=echo -else -ECHOREDIR=$(ECHO) -endif -endif -ifndef COPY -COPY:=$(CPPROG) -fp -endif -ifndef COPYTREE -COPYTREE:=$(CPPROG) -Rfp -endif -ifndef MKDIRTREE -MKDIRTREE:=$(MKDIRPROG) -p -endif -ifndef MOVE -MOVE:=$(MVPROG) -f -endif -ifndef DEL -DEL:=$(RMPROG) -f -endif -ifndef DELTREE -DELTREE:=$(RMPROG) -rf -endif -ifndef INSTALL -ifdef inUnix -INSTALL:=$(GINSTALL) -c -m 644 -else -INSTALL:=$(COPY) -endif -endif -ifndef INSTALLEXE -ifdef inUnix -INSTALLEXE:=$(GINSTALL) -c -m 755 -else -INSTALLEXE:=$(COPY) -endif -endif -ifndef MKDIR -MKDIR:=$(GINSTALL) -m 755 -d -endif -export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR -ifndef PPUMOVE -PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(PPUMOVE),) -PPUMOVE= __missing_command_PPUMOVE -else -PPUMOVE:=$(firstword $(PPUMOVE)) -endif -endif -export PPUMOVE -ifndef FPCMAKE -FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(FPCMAKE),) -FPCMAKE= __missing_command_FPCMAKE -else -FPCMAKE:=$(firstword $(FPCMAKE)) -endif -endif -export FPCMAKE -ifndef ZIPPROG -ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ZIPPROG),) -ZIPPROG= __missing_command_ZIPPROG -else -ZIPPROG:=$(firstword $(ZIPPROG)) -endif -endif -export ZIPPROG -ifndef TARPROG -TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(TARPROG),) -TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(TARPROG),) -TARPROG= __missing_command_TARPROG -else -TARPROG:=$(firstword $(TARPROG)) -endif -else -TARPROG:=$(firstword $(TARPROG)) -endif -endif -export TARPROG -ASNAME=$(BINUTILSPREFIX)as -LDNAME=$(BINUTILSPREFIX)ld -ARNAME=$(BINUTILSPREFIX)ar -RCNAME=$(BINUTILSPREFIX)rc -ifneq ($(findstring 1.0.,$(FPC_VERSION)),) -ifeq ($(OS_TARGET),win32) -ifeq ($(CROSSBINDIR),) -ASNAME=asw -LDNAME=ldw -ARNAME=arw -endif -endif -endif -ifndef ASPROG -ifdef CROSSBINDIR -ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT) -else -ASPROG=$(ASNAME) -endif -endif -ifndef LDPROG -ifdef CROSSBINDIR -LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT) -else -LDPROG=$(LDNAME) -endif -endif -ifndef RCPROG -ifdef CROSSBINDIR -RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT) -else -RCPROG=$(RCNAME) -endif -endif -ifndef ARPROG -ifdef CROSSBINDIR -ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT) -else -ARPROG=$(ARNAME) -endif -endif -AS=$(ASPROG) -LD=$(LDPROG) -RC=$(RCPROG) -AR=$(ARPROG) -PPAS=ppas$(SRCBATCHEXT) -ifdef inUnix -LDCONFIG=ldconfig -else -LDCONFIG= -endif -ifdef DATE -DATESTR:=$(shell $(DATE) +%Y%m%d) -else -DATESTR= -endif -ifndef UPXPROG -ifeq ($(OS_TARGET),go32v2) -UPXPROG:=1 -endif -ifeq ($(OS_TARGET),win32) -UPXPROG:=1 -endif -ifdef UPXPROG -UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(UPXPROG),) -UPXPROG= -else -UPXPROG:=$(firstword $(UPXPROG)) -endif -else -UPXPROG= -endif -endif -export UPXPROG -ZIPOPT=-9 -ZIPEXT=.zip -ifeq ($(USETAR),bz2) -TAROPT=vj -TAREXT=.tar.bz2 -else -TAROPT=vz -TAREXT=.tar.gz -endif -override REQUIRE_PACKAGES=rtl fcl -ifeq ($(FULL_TARGET),i386-linux) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_HASH=1 -REQUIRE_PACKAGES_PASZLIB=1 -REQUIRE_PACKAGES_NETDB=1 -REQUIRE_PACKAGES_LIBASYNC=1 -REQUIRE_PACKAGES_PTHREADS=1 -REQUIRE_PACKAGES_FCL=1 -REQUIRE_PACKAGES_PASJPEG=1 -REQUIRE_PACKAGES_IBASE=1 -REQUIRE_PACKAGES_POSTGRES=1 -REQUIRE_PACKAGES_MYSQL=1 -REQUIRE_PACKAGES_ODBC=1 -REQUIRE_PACKAGES_ORACLE=1 -REQUIRE_PACKAGES_SQLITE=1 -endif -ifdef REQUIRE_PACKAGES_RTL -PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_RTL),) -ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),) -UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX) -else -UNITDIR_RTL=$(PACKAGEDIR_RTL) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_RTL)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE) -endif -else -PACKAGEDIR_RTL= -UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_RTL),) -UNITDIR_RTL:=$(firstword $(UNITDIR_RTL)) -else -UNITDIR_RTL= -endif -endif -ifdef UNITDIR_RTL -override COMPILER_UNITDIR+=$(UNITDIR_RTL) -endif -endif -ifdef REQUIRE_PACKAGES_HASH -PACKAGEDIR_HASH:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /hash/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_HASH),) -ifneq ($(wildcard $(PACKAGEDIR_HASH)/units/$(TARGETSUFFIX)),) -UNITDIR_HASH=$(PACKAGEDIR_HASH)/units/$(TARGETSUFFIX) -else -UNITDIR_HASH=$(PACKAGEDIR_HASH) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_HASH)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_HASH) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_HASH)/$(FPCMADE) -endif -else -PACKAGEDIR_HASH= -UNITDIR_HASH:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /hash/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_HASH),) -UNITDIR_HASH:=$(firstword $(UNITDIR_HASH)) -else -UNITDIR_HASH= -endif -endif -ifdef UNITDIR_HASH -override COMPILER_UNITDIR+=$(UNITDIR_HASH) -endif -endif -ifdef REQUIRE_PACKAGES_PASZLIB -PACKAGEDIR_PASZLIB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_PASZLIB),) -ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)/units/$(TARGETSUFFIX)),) -UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)/units/$(TARGETSUFFIX) -else -UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_PASZLIB)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_PASZLIB) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_PASZLIB)/$(FPCMADE) -endif -else -PACKAGEDIR_PASZLIB= -UNITDIR_PASZLIB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_PASZLIB),) -UNITDIR_PASZLIB:=$(firstword $(UNITDIR_PASZLIB)) -else -UNITDIR_PASZLIB= -endif -endif -ifdef UNITDIR_PASZLIB -override COMPILER_UNITDIR+=$(UNITDIR_PASZLIB) -endif -endif -ifdef REQUIRE_PACKAGES_NETDB -PACKAGEDIR_NETDB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /netdb/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_NETDB),) -ifneq ($(wildcard $(PACKAGEDIR_NETDB)/units/$(TARGETSUFFIX)),) -UNITDIR_NETDB=$(PACKAGEDIR_NETDB)/units/$(TARGETSUFFIX) -else -UNITDIR_NETDB=$(PACKAGEDIR_NETDB) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_NETDB)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_NETDB) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_NETDB)/$(FPCMADE) -endif -else -PACKAGEDIR_NETDB= -UNITDIR_NETDB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /netdb/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_NETDB),) -UNITDIR_NETDB:=$(firstword $(UNITDIR_NETDB)) -else -UNITDIR_NETDB= -endif -endif -ifdef UNITDIR_NETDB -override COMPILER_UNITDIR+=$(UNITDIR_NETDB) -endif -endif -ifdef REQUIRE_PACKAGES_LIBASYNC -PACKAGEDIR_LIBASYNC:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /libasync/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_LIBASYNC),) -ifneq ($(wildcard $(PACKAGEDIR_LIBASYNC)/units/$(TARGETSUFFIX)),) -UNITDIR_LIBASYNC=$(PACKAGEDIR_LIBASYNC)/units/$(TARGETSUFFIX) -else -UNITDIR_LIBASYNC=$(PACKAGEDIR_LIBASYNC) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_LIBASYNC)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_LIBASYNC) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_LIBASYNC)/$(FPCMADE) -endif -else -PACKAGEDIR_LIBASYNC= -UNITDIR_LIBASYNC:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /libasync/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_LIBASYNC),) -UNITDIR_LIBASYNC:=$(firstword $(UNITDIR_LIBASYNC)) -else -UNITDIR_LIBASYNC= -endif -endif -ifdef UNITDIR_LIBASYNC -override COMPILER_UNITDIR+=$(UNITDIR_LIBASYNC) -endif -endif -ifdef REQUIRE_PACKAGES_PTHREADS -PACKAGEDIR_PTHREADS:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /pthreads/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_PTHREADS),) -ifneq ($(wildcard $(PACKAGEDIR_PTHREADS)/units/$(TARGETSUFFIX)),) -UNITDIR_PTHREADS=$(PACKAGEDIR_PTHREADS)/units/$(TARGETSUFFIX) -else -UNITDIR_PTHREADS=$(PACKAGEDIR_PTHREADS) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_PTHREADS)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_PTHREADS) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_PTHREADS)/$(FPCMADE) -endif -else -PACKAGEDIR_PTHREADS= -UNITDIR_PTHREADS:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /pthreads/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_PTHREADS),) -UNITDIR_PTHREADS:=$(firstword $(UNITDIR_PTHREADS)) -else -UNITDIR_PTHREADS= -endif -endif -ifdef UNITDIR_PTHREADS -override COMPILER_UNITDIR+=$(UNITDIR_PTHREADS) -endif -endif -ifdef REQUIRE_PACKAGES_FCL -PACKAGEDIR_FCL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_FCL),) -ifneq ($(wildcard $(PACKAGEDIR_FCL)/units/$(TARGETSUFFIX)),) -UNITDIR_FCL=$(PACKAGEDIR_FCL)/units/$(TARGETSUFFIX) -else -UNITDIR_FCL=$(PACKAGEDIR_FCL) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_FCL)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_FCL) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL)/$(FPCMADE) -endif -else -PACKAGEDIR_FCL= -UNITDIR_FCL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_FCL),) -UNITDIR_FCL:=$(firstword $(UNITDIR_FCL)) -else -UNITDIR_FCL= -endif -endif -ifdef UNITDIR_FCL -override COMPILER_UNITDIR+=$(UNITDIR_FCL) -endif -endif -ifdef REQUIRE_PACKAGES_PASJPEG -PACKAGEDIR_PASJPEG:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /pasjpeg/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_PASJPEG),) -ifneq ($(wildcard $(PACKAGEDIR_PASJPEG)/units/$(TARGETSUFFIX)),) -UNITDIR_PASJPEG=$(PACKAGEDIR_PASJPEG)/units/$(TARGETSUFFIX) -else -UNITDIR_PASJPEG=$(PACKAGEDIR_PASJPEG) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_PASJPEG)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_PASJPEG) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_PASJPEG)/$(FPCMADE) -endif -else -PACKAGEDIR_PASJPEG= -UNITDIR_PASJPEG:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /pasjpeg/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_PASJPEG),) -UNITDIR_PASJPEG:=$(firstword $(UNITDIR_PASJPEG)) -else -UNITDIR_PASJPEG= -endif -endif -ifdef UNITDIR_PASJPEG -override COMPILER_UNITDIR+=$(UNITDIR_PASJPEG) -endif -endif -ifdef REQUIRE_PACKAGES_IBASE -PACKAGEDIR_IBASE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /ibase/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_IBASE),) -ifneq ($(wildcard $(PACKAGEDIR_IBASE)/units/$(TARGETSUFFIX)),) -UNITDIR_IBASE=$(PACKAGEDIR_IBASE)/units/$(TARGETSUFFIX) -else -UNITDIR_IBASE=$(PACKAGEDIR_IBASE) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_IBASE)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_IBASE) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_IBASE)/$(FPCMADE) -endif -else -PACKAGEDIR_IBASE= -UNITDIR_IBASE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /ibase/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_IBASE),) -UNITDIR_IBASE:=$(firstword $(UNITDIR_IBASE)) -else -UNITDIR_IBASE= -endif -endif -ifdef UNITDIR_IBASE -override COMPILER_UNITDIR+=$(UNITDIR_IBASE) -endif -endif -ifdef REQUIRE_PACKAGES_POSTGRES -PACKAGEDIR_POSTGRES:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /postgres/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_POSTGRES),) -ifneq ($(wildcard $(PACKAGEDIR_POSTGRES)/units/$(TARGETSUFFIX)),) -UNITDIR_POSTGRES=$(PACKAGEDIR_POSTGRES)/units/$(TARGETSUFFIX) -else -UNITDIR_POSTGRES=$(PACKAGEDIR_POSTGRES) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_POSTGRES)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_POSTGRES) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_POSTGRES)/$(FPCMADE) -endif -else -PACKAGEDIR_POSTGRES= -UNITDIR_POSTGRES:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /postgres/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_POSTGRES),) -UNITDIR_POSTGRES:=$(firstword $(UNITDIR_POSTGRES)) -else -UNITDIR_POSTGRES= -endif -endif -ifdef UNITDIR_POSTGRES -override COMPILER_UNITDIR+=$(UNITDIR_POSTGRES) -endif -endif -ifdef REQUIRE_PACKAGES_MYSQL -PACKAGEDIR_MYSQL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /mysql/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_MYSQL),) -ifneq ($(wildcard $(PACKAGEDIR_MYSQL)/units/$(TARGETSUFFIX)),) -UNITDIR_MYSQL=$(PACKAGEDIR_MYSQL)/units/$(TARGETSUFFIX) -else -UNITDIR_MYSQL=$(PACKAGEDIR_MYSQL) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_MYSQL)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_MYSQL) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_MYSQL)/$(FPCMADE) -endif -else -PACKAGEDIR_MYSQL= -UNITDIR_MYSQL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /mysql/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_MYSQL),) -UNITDIR_MYSQL:=$(firstword $(UNITDIR_MYSQL)) -else -UNITDIR_MYSQL= -endif -endif -ifdef UNITDIR_MYSQL -override COMPILER_UNITDIR+=$(UNITDIR_MYSQL) -endif -endif -ifdef REQUIRE_PACKAGES_ODBC -PACKAGEDIR_ODBC:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /odbc/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_ODBC),) -ifneq ($(wildcard $(PACKAGEDIR_ODBC)/units/$(TARGETSUFFIX)),) -UNITDIR_ODBC=$(PACKAGEDIR_ODBC)/units/$(TARGETSUFFIX) -else -UNITDIR_ODBC=$(PACKAGEDIR_ODBC) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_ODBC)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_ODBC) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_ODBC)/$(FPCMADE) -endif -else -PACKAGEDIR_ODBC= -UNITDIR_ODBC:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /odbc/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_ODBC),) -UNITDIR_ODBC:=$(firstword $(UNITDIR_ODBC)) -else -UNITDIR_ODBC= -endif -endif -ifdef UNITDIR_ODBC -override COMPILER_UNITDIR+=$(UNITDIR_ODBC) -endif -endif -ifdef REQUIRE_PACKAGES_ORACLE -PACKAGEDIR_ORACLE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /oracle/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_ORACLE),) -ifneq ($(wildcard $(PACKAGEDIR_ORACLE)/units/$(TARGETSUFFIX)),) -UNITDIR_ORACLE=$(PACKAGEDIR_ORACLE)/units/$(TARGETSUFFIX) -else -UNITDIR_ORACLE=$(PACKAGEDIR_ORACLE) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_ORACLE)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_ORACLE) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_ORACLE)/$(FPCMADE) -endif -else -PACKAGEDIR_ORACLE= -UNITDIR_ORACLE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /oracle/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_ORACLE),) -UNITDIR_ORACLE:=$(firstword $(UNITDIR_ORACLE)) -else -UNITDIR_ORACLE= -endif -endif -ifdef UNITDIR_ORACLE -override COMPILER_UNITDIR+=$(UNITDIR_ORACLE) -endif -endif -ifdef REQUIRE_PACKAGES_SQLITE -PACKAGEDIR_SQLITE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /sqlite/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_SQLITE),) -ifneq ($(wildcard $(PACKAGEDIR_SQLITE)/units/$(TARGETSUFFIX)),) -UNITDIR_SQLITE=$(PACKAGEDIR_SQLITE)/units/$(TARGETSUFFIX) -else -UNITDIR_SQLITE=$(PACKAGEDIR_SQLITE) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_SQLITE)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_SQLITE) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_SQLITE)/$(FPCMADE) -endif -else -PACKAGEDIR_SQLITE= -UNITDIR_SQLITE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /sqlite/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_SQLITE),) -UNITDIR_SQLITE:=$(firstword $(UNITDIR_SQLITE)) -else -UNITDIR_SQLITE= -endif -endif -ifdef UNITDIR_SQLITE -override COMPILER_UNITDIR+=$(UNITDIR_SQLITE) -endif -endif -ifndef NOCPUDEF -override FPCOPTDEF=$(CPU_TARGET) -endif -ifneq ($(OS_TARGET),$(OS_SOURCE)) -override FPCOPT+=-T$(OS_TARGET) -endif -ifneq ($(CPU_TARGET),$(CPU_SOURCE)) -override FPCOPT+=-P$(CPU_TARGET) -endif -ifeq ($(OS_SOURCE),openbsd) -override FPCOPT+=-FD$(NEW_BINUTILS_PATH) -endif -ifndef CROSSBOOTSTRAP -ifneq ($(BINUTILSPREFIX),) -override FPCOPT+=-XP$(BINUTILSPREFIX) -Xc -endif -ifneq ($(BINUTILSPREFIX),) -override FPCOPT+=-Xr$(RLINKPATH) -endif -endif -ifdef UNITDIR -override FPCOPT+=$(addprefix -Fu,$(UNITDIR)) -endif -ifdef LIBDIR -override FPCOPT+=$(addprefix -Fl,$(LIBDIR)) -endif -ifdef OBJDIR -override FPCOPT+=$(addprefix -Fo,$(OBJDIR)) -endif -ifdef INCDIR -override FPCOPT+=$(addprefix -Fi,$(INCDIR)) -endif -ifdef LINKSMART -override FPCOPT+=-XX -endif -ifdef CREATESMART -override FPCOPT+=-CX -endif -ifdef DEBUG -override FPCOPT+=-gl -override FPCOPTDEF+=DEBUG -endif -ifdef RELEASE -ifneq ($(findstring 2.0.,$(FPC_VERSION)),) -ifeq ($(CPU_TARGET),i386) -FPCCPUOPT:=-OG2p3 -endif -ifeq ($(CPU_TARGET),powerpc) -FPCCPUOPT:=-O1r -endif -else -FPCCPUOPT:=-O1r -endif -override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n -override FPCOPTDEF+=RELEASE -endif -ifdef STRIP -override FPCOPT+=-Xs -endif -ifdef OPTIMIZE -override FPCOPT+=-O2 -endif -ifdef VERBOSE -override FPCOPT+=-vwni -endif -ifdef COMPILER_OPTIONS -override FPCOPT+=$(COMPILER_OPTIONS) -endif -ifdef COMPILER_UNITDIR -override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR)) -endif -ifdef COMPILER_LIBRARYDIR -override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR)) -endif -ifdef COMPILER_OBJECTDIR -override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR)) -endif -ifdef COMPILER_INCLUDEDIR -override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR)) -endif -ifdef CROSSBINDIR -override FPCOPT+=-FD$(CROSSBINDIR) -endif -ifdef COMPILER_TARGETDIR -override FPCOPT+=-FE$(COMPILER_TARGETDIR) -ifeq ($(COMPILER_TARGETDIR),.) -override TARGETDIRPREFIX= -else -override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/ -endif -endif -ifdef COMPILER_UNITTARGETDIR -override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR) -ifeq ($(COMPILER_UNITTARGETDIR),.) -override UNITTARGETDIRPREFIX= -else -override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/ -endif -else -ifdef COMPILER_TARGETDIR -override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR) -override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX) -endif -endif -ifdef CREATESHARED -override FPCOPT+=-Cg -ifeq ($(CPU_TARGET),i386) -override FPCOPT+=-Aas -endif -endif -ifdef LINKSHARED -endif -ifdef GCCLIBDIR -override FPCOPT+=-Fl$(GCCLIBDIR) -endif -ifdef OTHERLIBDIR -override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR)) -endif -ifdef OPT -override FPCOPT+=$(OPT) -endif -ifdef FPCOPTDEF -override FPCOPT+=$(addprefix -d,$(FPCOPTDEF)) -endif -ifdef CFGFILE -override FPCOPT+=@$(CFGFILE) -endif -ifdef USEENV -override FPCEXTCMD:=$(FPCOPT) -override FPCOPT:=!FPCEXTCMD -export FPCEXTCMD -endif -override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET) -override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE) -ifneq ($(AFULL_TARGET),$(AFULL_SOURCE)) -override ACROSSCOMPILE=1 -endif -ifdef ACROSSCOMPILE -override FPCOPT+=$(CROSSOPT) -endif -override COMPILER:=$(FPC) $(FPCOPT) -ifeq (,$(findstring -s ,$(COMPILER))) -EXECPPAS= -else -ifeq ($(FULL_SOURCE),$(FULL_TARGET)) -EXECPPAS:=@$(PPAS) -endif -endif -.PHONY: fpc_units -ifneq ($(TARGET_UNITS),) -override ALLTARGET+=fpc_units -override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS)) -override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS)) -override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES) -override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES) -endif -fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES) -ifdef TARGET_RSTS -override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS)) -override CLEANRSTFILES+=$(RSTFILES) -endif -.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared -$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET) - @$(ECHOREDIR) Compiled > $(FPCMADE) -fpc_all: $(FPCMADE) -fpc_smart: - $(MAKE) all LINKSMART=1 CREATESMART=1 -fpc_debug: - $(MAKE) all DEBUG=1 -fpc_release: - $(MAKE) all RELEASE=1 -.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res -$(COMPILER_UNITTARGETDIR): - $(MKDIRTREE) $(COMPILER_UNITTARGETDIR) -$(COMPILER_TARGETDIR): - $(MKDIRTREE) $(COMPILER_TARGETDIR) -%$(PPUEXT): %.pp - $(COMPILER) $< - $(EXECPPAS) -%$(PPUEXT): %.pas - $(COMPILER) $< - $(EXECPPAS) -%$(EXEEXT): %.pp - $(COMPILER) $< - $(EXECPPAS) -%$(EXEEXT): %.pas - $(COMPILER) $< - $(EXECPPAS) -%$(EXEEXT): %.lpr - $(COMPILER) $< - $(EXECPPAS) -%$(EXEEXT): %.dpr - $(COMPILER) $< - $(EXECPPAS) -%.res: %.rc - windres -i $< -o $@ -vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR) -vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR) -vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR) -vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR) -vpath %$(OEXT) $(COMPILER_UNITTARGETDIR) -vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR) -.PHONY: fpc_shared -override INSTALLTARGET+=fpc_shared_install -ifndef SHARED_LIBVERSION -SHARED_LIBVERSION=$(FPC_VERSION) -endif -ifndef SHARED_LIBNAME -SHARED_LIBNAME=$(PACKAGE_NAME) -endif -ifndef SHARED_FULLNAME -SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT) -endif -ifndef SHARED_LIBUNITS -SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS) -override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS)) -endif -fpc_shared: -ifdef HASSHAREDLIB - $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1 -ifneq ($(SHARED_BUILD),n) - $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR) -endif -else - @$(ECHO) Shared Libraries not supported -endif -fpc_shared_install: -ifneq ($(SHARED_BUILD),n) -ifneq ($(SHARED_LIBUNITS),) -ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),) - $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR) -endif -endif -endif -.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall -ifdef INSTALL_UNITS -override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS)) -endif -ifdef INSTALL_BUILDUNIT -override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES)) -endif -ifdef INSTALLPPUFILES -override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) -ifneq ($(UNITTARGETDIRPREFIX),) -override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES))) -override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES)))) -endif -override INSTALL_CREATEPACKAGEFPC=1 -endif -ifdef INSTALLEXEFILES -ifneq ($(TARGETDIRPREFIX),) -override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES))) -endif -endif -fpc_install: all $(INSTALLTARGET) -ifdef INSTALLEXEFILES - $(MKDIR) $(INSTALL_BINDIR) -ifdef UPXPROG - -$(UPXPROG) $(INSTALLEXEFILES) -endif - $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR) -endif -ifdef INSTALL_CREATEPACKAGEFPC -ifdef FPCMAKE -ifdef PACKAGE_VERSION -ifneq ($(wildcard Makefile.fpc),) - $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc - $(MKDIR) $(INSTALL_UNITDIR) - $(INSTALL) Package.fpc $(INSTALL_UNITDIR) -endif -endif -endif -endif -ifdef INSTALLPPUFILES - $(MKDIR) $(INSTALL_UNITDIR) - $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR) -ifneq ($(INSTALLPPULINKFILES),) - $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR) -endif -ifneq ($(wildcard $(LIB_FULLNAME)),) - $(MKDIR) $(INSTALL_LIBDIR) - $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR) -ifdef inUnix - ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME) -endif -endif -endif -ifdef INSTALL_FILES - $(MKDIR) $(INSTALL_DATADIR) - $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR) -endif -fpc_sourceinstall: distclean - $(MKDIR) $(INSTALL_SOURCEDIR) - $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR) -fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS)) -ifdef HASEXAMPLES - $(MKDIR) $(INSTALL_EXAMPLEDIR) -endif -ifdef EXAMPLESOURCEFILES - $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR) -endif -ifdef TARGET_EXAMPLEDIRS - $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR) -endif -.PHONY: fpc_distinstall -fpc_distinstall: install exampleinstall -.PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall -ifndef PACKDIR -ifndef inUnix -PACKDIR=$(BASEDIR)/../fpc-pack -else -PACKDIR=/tmp/fpc-pack -endif -endif -ifndef ZIPNAME -ifdef DIST_ZIPNAME -ZIPNAME=$(DIST_ZIPNAME) -else -ZIPNAME=$(PACKAGE_NAME) -endif -endif -ifndef FULLZIPNAME -FULLZIPNAME=$(ZIPCROSSPREFIX)$(ZIPPREFIX)$(ZIPNAME)$(ZIPSUFFIX) -endif -ifndef ZIPTARGET -ifdef DIST_ZIPTARGET -ZIPTARGET=DIST_ZIPTARGET -else -ZIPTARGET=install -endif -endif -ifndef USEZIP -ifdef inUnix -USETAR=1 -endif -endif -ifndef inUnix -USEZIPWRAPPER=1 -endif -ifdef USEZIPWRAPPER -ZIPPATHSEP=$(PATHSEP) -ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(SRCBATCHEXT)) -else -ZIPPATHSEP=/ -endif -ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR)) -ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR)) -ifdef USETAR -ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(TAREXT) -ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) * -else -ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(ZIPEXT) -ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) * -endif -fpc_zipinstall: - $(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1 - $(MKDIR) $(DIST_DESTDIR) - $(DEL) $(ZIPDESTFILE) -ifdef USEZIPWRAPPER -ifneq ($(ECHOREDIR),echo) - $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPER) - $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER) - $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRAPPER) -else - echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER) - echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER) - echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER) -endif -ifdef inUnix - /bin/sh $(ZIPWRAPPER) -else - $(ZIPWRAPPER) -endif - $(DEL) $(ZIPWRAPPER) -else - $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE) -endif - $(DELTREE) $(PACKDIR) -fpc_zipsourceinstall: - $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=$(ZIPSOURCESUFFIX) -fpc_zipexampleinstall: -ifdef HASEXAMPLES - $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=$(ZIPEXAMPLESUFFIX) -endif -fpc_zipdistinstall: - $(MAKE) fpc_zipinstall ZIPTARGET=distinstall -.PHONY: fpc_clean fpc_cleanall fpc_distclean -ifdef EXEFILES -override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES)) -endif -ifdef CLEAN_UNITS -override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS)) -endif -ifdef CLEANPPUFILES -override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) -ifdef DEBUGSYMEXT -override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES)) -endif -override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES)) -override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))) -endif -fpc_clean: $(CLEANTARGET) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif -ifdef CLEANPPUFILES - -$(DEL) $(CLEANPPUFILES) -endif -ifneq ($(CLEANPPULINKFILES),) - -$(DEL) $(CLEANPPULINKFILES) -endif -ifdef CLEANRSTFILES - -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES)) -endif -ifdef CLEAN_FILES - -$(DEL) $(CLEAN_FILES) -endif -ifdef LIB_NAME - -$(DEL) $(LIB_NAME) $(LIB_FULLNAME) -endif - -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE) - -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT) -fpc_cleanall: $(CLEANTARGET) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif -ifdef COMPILER_UNITTARGETDIR -ifdef CLEANPPUFILES - -$(DEL) $(CLEANPPUFILES) -endif -ifneq ($(CLEANPPULINKFILES),) - -$(DEL) $(CLEANPPULINKFILES) -endif -ifdef CLEANRSTFILES - -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES)) -endif -endif - -$(DELTREE) units - -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT) -ifneq ($(PPUEXT),.ppu) - -$(DEL) *.o *.ppu *.a -endif - -$(DELTREE) *$(SMARTEXT) - -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE) - -$(DEL) *_ppas$(BATCHEXT) -ifdef AOUTEXT - -$(DEL) *$(AOUTEXT) -endif -ifdef DEBUGSYMEXT - -$(DEL) *$(DEBUGSYMEXT) -endif -fpc_distclean: cleanall -.PHONY: fpc_baseinfo -override INFORULES+=fpc_baseinfo -fpc_baseinfo: - @$(ECHO) - @$(ECHO) == Package info == - @$(ECHO) Package Name..... $(PACKAGE_NAME) - @$(ECHO) Package Version.. $(PACKAGE_VERSION) - @$(ECHO) - @$(ECHO) == Configuration info == - @$(ECHO) - @$(ECHO) FPC.......... $(FPC) - @$(ECHO) FPC Version.. $(FPC_VERSION) - @$(ECHO) Source CPU... $(CPU_SOURCE) - @$(ECHO) Target CPU... $(CPU_TARGET) - @$(ECHO) Source OS.... $(OS_SOURCE) - @$(ECHO) Target OS.... $(OS_TARGET) - @$(ECHO) Full Source.. $(FULL_SOURCE) - @$(ECHO) Full Target.. $(FULL_TARGET) - @$(ECHO) SourceSuffix. $(SOURCESUFFIX) - @$(ECHO) TargetSuffix. $(TARGETSUFFIX) - @$(ECHO) - @$(ECHO) == Directory info == - @$(ECHO) - @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES) - @$(ECHO) - @$(ECHO) Basedir......... $(BASEDIR) - @$(ECHO) FPCDir.......... $(FPCDIR) - @$(ECHO) CrossBinDir..... $(CROSSBINDIR) - @$(ECHO) UnitsDir........ $(UNITSDIR) - @$(ECHO) PackagesDir..... $(PACKAGESDIR) - @$(ECHO) - @$(ECHO) GCC library..... $(GCCLIBDIR) - @$(ECHO) Other library... $(OTHERLIBDIR) - @$(ECHO) - @$(ECHO) == Tools info == - @$(ECHO) - @$(ECHO) As........ $(AS) - @$(ECHO) Ld........ $(LD) - @$(ECHO) Ar........ $(AR) - @$(ECHO) Rc........ $(RC) - @$(ECHO) - @$(ECHO) Mv........ $(MVPROG) - @$(ECHO) Cp........ $(CPPROG) - @$(ECHO) Rm........ $(RMPROG) - @$(ECHO) GInstall.. $(GINSTALL) - @$(ECHO) Echo...... $(ECHO) - @$(ECHO) Shell..... $(SHELL) - @$(ECHO) Date...... $(DATE) - @$(ECHO) FPCMake... $(FPCMAKE) - @$(ECHO) PPUMove... $(PPUMOVE) - @$(ECHO) Upx....... $(UPXPROG) - @$(ECHO) Zip....... $(ZIPPROG) - @$(ECHO) - @$(ECHO) == Object info == - @$(ECHO) - @$(ECHO) Target Loaders........ $(TARGET_LOADERS) - @$(ECHO) Target Units.......... $(TARGET_UNITS) - @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS) - @$(ECHO) Target Programs....... $(TARGET_PROGRAMS) - @$(ECHO) Target Dirs........... $(TARGET_DIRS) - @$(ECHO) Target Examples....... $(TARGET_EXAMPLES) - @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS) - @$(ECHO) - @$(ECHO) Clean Units......... $(CLEAN_UNITS) - @$(ECHO) Clean Files......... $(CLEAN_FILES) - @$(ECHO) - @$(ECHO) Install Units....... $(INSTALL_UNITS) - @$(ECHO) Install Files....... $(INSTALL_FILES) - @$(ECHO) - @$(ECHO) == Install info == - @$(ECHO) - @$(ECHO) DateStr.............. $(DATESTR) - @$(ECHO) ZipName.............. $(ZIPNAME) - @$(ECHO) ZipPrefix............ $(ZIPPREFIX) - @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX) - @$(ECHO) ZipSuffix............ $(ZIPSUFFIX) - @$(ECHO) FullZipName.......... $(FULLZIPNAME) - @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE) - @$(ECHO) - @$(ECHO) Install base dir..... $(INSTALL_BASEDIR) - @$(ECHO) Install binary dir... $(INSTALL_BINDIR) - @$(ECHO) Install library dir.. $(INSTALL_LIBDIR) - @$(ECHO) Install units dir.... $(INSTALL_UNITDIR) - @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR) - @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR) - @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR) - @$(ECHO) Install data dir..... $(INSTALL_DATADIR) - @$(ECHO) - @$(ECHO) Dist destination dir. $(DIST_DESTDIR) - @$(ECHO) Dist zip name........ $(DIST_ZIPNAME) - @$(ECHO) -.PHONY: fpc_info -fpc_info: $(INFORULES) -.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \ - fpc_makefile_dirs -fpc_makefile: - $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc -fpc_makefile_sub1: -ifdef TARGET_DIRS - $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS)) -endif -ifdef TARGET_EXAMPLEDIRS - $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS)) -endif -fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS)) -fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2 -fpc_makefiles: fpc_makefile fpc_makefile_dirs -all: fpc_all -debug: fpc_debug -smart: fpc_smart -release: fpc_release -units: fpc_units -examples: -shared: fpc_shared -install: fpc_install -sourceinstall: fpc_sourceinstall -exampleinstall: fpc_exampleinstall -distinstall: fpc_distinstall -zipinstall: fpc_zipinstall -zipsourceinstall: fpc_zipsourceinstall -zipexampleinstall: fpc_zipexampleinstall -zipdistinstall: fpc_zipdistinstall -clean: fpc_clean -distclean: fpc_distclean -cleanall: fpc_cleanall -info: fpc_info -makefiles: fpc_makefiles -.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles -ifneq ($(wildcard fpcmake.loc),) -include fpcmake.loc -endif diff --git a/gfx/x11/Makefile.fpc b/gfx/x11/Makefile.fpc deleted file mode 100644 index dcc60812..00000000 --- a/gfx/x11/Makefile.fpc +++ /dev/null @@ -1,27 +0,0 @@ -# -# Makefile.fpc for fpGFX X11 target -# - -[package] -name=fpgfx -version=0.3 - -[require] -packages=fcl -unitdir=.. ../emulayer - -[target] -units=gfx_x11 gfxinterface -rst=gfx_x11 - -[compiler] -unitdir=.. ../emulayer -unittargetdir=../units -options=-S2h - -[install] -fpcpackage=y - -[default] -fpcdir=/opt/fpc/src - diff --git a/gfx/x11/build.sh b/gfx/x11/build.sh deleted file mode 100755 index 43f0e876..00000000 --- a/gfx/x11/build.sh +++ /dev/null @@ -1,3 +0,0 @@ - -ppc386 -S2cgi -O1 -gl -vewnhi -l -Fu../ -Fu. -FUlib/i386-linux/ fpgfxpackage.pas - diff --git a/gfx/x11/fpgfxpackage.lpk b/gfx/x11/fpgfxpackage.lpk deleted file mode 100644 index fc7f3ad9..00000000 --- a/gfx/x11/fpgfxpackage.lpk +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version="1.0"?> -<CONFIG> - <Package Version="2"> - <Name Value="fpgfxpackage"/> - <Author Value="Graeme Geldenhuys"/> - <CompilerOptions> - <Version Value="5"/> - <SearchPaths> - <OtherUnitFiles Value="../"/> - <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> - </SearchPaths> - <CodeGeneration> - <Generate Value="Faster"/> - </CodeGeneration> - <Other> - <CompilerPath Value="$(CompPath)"/> - </Other> - </CompilerOptions> - <Description Value="Free Pascal GFX Library - [Linux] -"/> - <License Value="Modified LGPL -"/> - <Version Minor="4"/> - <Files Count="9"> - <Item1> - <Filename Value="../gfxbase.pas"/> - <UnitName Value="GfxBase"/> - </Item1> - <Item2> - <Filename Value="gfx_x11.pas"/> - <UnitName Value="GFX_X11"/> - </Item2> - <Item3> - <Filename Value="gfxinterface.pas"/> - <UnitName Value="gfxinterface"/> - </Item3> - <Item4> - <Filename Value="../schar16.pas"/> - <UnitName Value="schar16"/> - </Item4> - <Item5> - <Filename Value="../unitkeys.pas"/> - <UnitName Value="unitkeys"/> - </Item5> - <Item6> - <Filename Value="../fpgfx.pas"/> - <UnitName Value="fpgfx"/> - </Item6> - <Item7> - <Filename Value="../gelimage.pas"/> - <UnitName Value="GELImage"/> - </Item7> - <Item8> - <Filename Value="../commandlineparams.pas"/> - <UnitName Value="CommandLineParams"/> - </Item8> - <Item9> - <Filename Value="../fputf8utils.pas"/> - <UnitName Value="fpUTF8Utils"/> - </Item9> - </Files> - <LazDoc Paths="../../docs/xml/gfx/"/> - <RequiredPkgs Count="1"> - <Item1> - <PackageName Value="FCL"/> - <MinVersion Major="1" Valid="True"/> - </Item1> - </RequiredPkgs> - <UsageOptions> - <UnitPath Value="$(PkgOutDir)/"/> - </UsageOptions> - <PublishOptions> - <Version Value="2"/> - <IgnoreBinaries Value="False"/> - </PublishOptions> - </Package> -</CONFIG> diff --git a/gfx/x11/fpgfxpackage.pas b/gfx/x11/fpgfxpackage.pas deleted file mode 100644 index e3e60e76..00000000 --- a/gfx/x11/fpgfxpackage.pas +++ /dev/null @@ -1,15 +0,0 @@ -{ This file was automatically created by Lazarus. Do not edit! -This source is only used to compile and install the package. - } - -unit fpgfxpackage; - -interface - -uses - GfxBase, GFX_X11, gfxinterface, schar16, unitkeys, fpgfx, GELImage, - CommandLineParams, fpUTF8Utils; - -implementation - -end. diff --git a/gfx/x11/gfx_x11.pas b/gfx/x11/gfx_x11.pas deleted file mode 100644 index 37674396..00000000 --- a/gfx/x11/gfx_x11.pas +++ /dev/null @@ -1,2037 +0,0 @@ -{ - fpGUI - Free Pascal Graphical User Interface - - GFX_X11 - X11/XLib target implementation - - Copyright (C) 2006 - 2007 See the file AUTHORS, included in this - distribution, for details of the copyright. - - See the file COPYING.modifiedLGPL, included in this distribution, - for details about the copyright. - - 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. -} -unit GFX_X11; - -{$IFDEF Debug} - {$ASSERTIONS On} -{$ENDIF} - -{$ifdef fpc} - {$mode objfpc}{$H+} -{$endif} - - -interface - -uses - SysUtils, Classes, ctypes, // FPC units - X, XLib, XUtil, // X11 units - unitxft, // Xft font support - GfxBase; // fpGFX units - - -resourcestring - // X11 exception strings - SGCCreationFailed = 'Creation of X11 graphics context failed'; - SXCanvasInvalidFontClass = 'Tried to set font of class "%s" into X11 context; only TXFont is allowed.'; - SOpenDisplayFailed = 'Opening of display "%s" failed'; - SWindowCreationFailed = 'Creation of X11 window failed'; - SWindowUnsupportedPixelFormat = 'Window uses unsupported pixel format: %d bits per pixel'; - SNoDefaultFont = 'Unable to load default font'; - SIncompatibleCanvasForBlitting = 'Cannot blit from %s to %s'; - - -type - EX11Error = class(EGfxError); - TX11Canvas = class; - TX11Application = class; - - // Returns True if it 'ate' the event - TX11EventFilter = function (const AEvent: TXEvent): Boolean of object; - - - { This will hide the actual font implementation form the rest of GFX/X11 } - - { TX11FontResourceImpl } - - TX11FontResourceImpl = class(TObject) - private - FFontData: PXftFont; - public - constructor Create(const Descriptor: String); - destructor Destroy; override; - function GetAscent: integer; - function GetDescent: integer; - function GetHeight: integer; - property FontData: PXftFont read FFontData; - end; - - - { TX11Font } - - TX11Font = class(TFCustomFont) - private - FFontStruct: TX11FontResourceImpl; - public - constructor Create(const Descriptor: String); - destructor Destroy; override; - class function GetDefaultFontName(const AFontClass: TGfxFontClass): String; override; - property FontStruct: TX11FontResourceImpl read FFontStruct; - end; - - - PX11CanvasState = ^TX11CanvasState; - TX11CanvasState = record - Prev: PX11CanvasState; - Matrix: TGfxMatrix; - Region: TRegion; - Color: TGfxPixel; - Font: TFCustomFont; - end; - - - { TX11Canvas } - - TX11Canvas = class(TFCustomCanvas) - private - FGC: TGC; - FVisual: PVisual; - FRegion: TRegion; - FDefaultFont: TX11FontResourceImpl; - FFontStruct: TX11FontResourceImpl; - FXftDraw: PXftDraw; - FStateStackpointer: PX11CanvasState; - FColormap: TColormap; - FCurColor: TGfxPixel; - FFont: TFCustomFont; - procedure Resized(NewWidth, NewHeight: Integer); - protected - function DoExcludeClipRect(const ARect: TRect): Boolean; override; - function DoIntersectClipRect(const ARect: TRect): Boolean; override; - function DoUnionClipRect(const ARect: TRect): Boolean; override; - function DoGetClipRect: TRect; override; - procedure DoDrawArc(const ARect: TRect; StartAngle, EndAngle: Single); override; - procedure DoDrawCircle(const ARect: TRect); override; - procedure DoDrawLine(const AFrom, ATo: TPoint); override; - procedure DoDrawRect(const ARect: TRect); override; - procedure DoDrawPoint(const APoint: TPoint); override; - procedure DoFillRect(const ARect: TRect); override; - procedure DoFillTriangle(const P1, P2, P3: TPoint); override; - procedure DoTextOut(const APosition: TPoint; const AText: String); override; - procedure DoCopyRect(ASource: TFCustomCanvas; const ASourceRect: TRect; const ADestPos: TPoint); override; - procedure DoMaskedCopyRect(ASource, AMask: TFCustomCanvas; const ASourceRect: TRect; const AMaskPos, ADestPos: TPoint); override; - procedure DoDrawImageRect(AImage: TFCustomBitmap; ASourceRect: TRect; const ADestPos: TPoint); override; - public - constructor Create(AColormap: TColormap; AXDrawable: X.TDrawable; ADefaultFont: TX11FontResourceImpl); - destructor Destroy; override; - function MapColor(const AColor: TGfxColor): TGfxPixel; override; - function FontCellHeight: Integer; override; - function TextExtent(const AText: String): TSize; override; - procedure SaveState; override; - procedure RestoreState; override; - procedure EmptyClipRect; override; - procedure DoSetColor(AColor: TGfxPixel); override; - procedure SetFont(AFont: TFCustomFont); override; - procedure SetLineStyle(ALineStyle: TGfxLineStyle); override; - procedure DrawPolyLine(const Coords: array of TPoint); override; - property GC: TGC read FGC; - property Visual: PVisual read FVisual; - property Colormap: TColormap read FColormap; - property Region: TRegion read FRegion; - end; - - - TX11WindowCanvas = class(TX11Canvas) - public - constructor Create(AColormap: TColormap; - AXDrawable: X.TDrawable; ADefaultFont: TX11FontResourceImpl); - end; - - - TX11PixmapCanvas = class(TX11Canvas) - public - constructor Create(AColormap: TColormap; - AHandle: TPixmap; APixelFormat: TGfxPixelFormat); - destructor Destroy; override; - end; - - - TX11MonoPixmapCanvas = class(TX11PixmapCanvas) - constructor Create(AColormap: TColormap; AHandle: TPixmap); - end; - - { TX11Bitmap } - - TX11Bitmap = class(TFCustomBitmap) - private - IsLocked: Boolean; - public - constructor Create(AWidth, AHeight: Integer; APixelFormat: TGfxPixelFormat); override; - destructor Destroy; override; - procedure Lock(out AData: Pointer; out AStride: LongWord); override; - procedure Unlock; override; - end; - - { TX11Screen } - - TX11Screen = class(TFCustomScreen) - private - FScreenIndex: Integer; - FScreenInfo: PScreen; - protected - procedure SetMousePos(const NewPos: TPoint); override; - function GetMousePos: TPoint; override; - public - constructor Create; override; - function CreateBitmapCanvas(AWidth, AHeight: Integer): TFCustomCanvas; override; - function CreateMonoBitmapCanvas(AWidth, AHeight: Integer): TFCustomCanvas; override; - property ScreenIndex: Integer read FScreenIndex; - property ScreenInfo: PScreen read FScreenInfo; - end; - - - { TX11Application } - - TX11Application = class(TFCustomApplication) - private - FDefaultFont: TX11FontResourceImpl; - FEventFilter: TX11EventFilter; - Handle: PDisplay; - FWMProtocols: TAtom; // Atom for "WM_PROTOCOLS" - FWMDeleteWindow: TAtom; // Atom for "WM_DELETE_WINDOW" - FWMHints: TAtom; // Atom for "_MOTIF_WM_HINTS" - function FindWindowByXID(XWindowID: X.TWindow): TFCustomWindow; - public - { default methods } - constructor Create; override; - destructor Destroy; override; - procedure Initialize(ADisplayName: String = ''); override; - procedure Run; override; - procedure Quit; override; - { properties } - property X11Display: PDisplay read Handle; - property DisplayName: String read FDisplayName write FDisplayName; - property EventFilter: TX11EventFilter read FEventFilter write FEventFilter; - end; - - { TX11Window } - - TX11Window = class(TFCustomWindow) - private - FHandle: PtrUInt; - FComposeStatus: TXComposeStatus; - FComposeBuffer: String[32]; - FCurCursorHandle: X.TCursor; - FXEvent: PXEvent; - function StartComposing(const Event: TXEvent): TKeySym; - procedure EndComposing; - procedure Configure(var Event: TXConfigureEvent); message X.ConfigureNotify; - procedure ClientMessage(var Event: TXClientMessageEvent); message X.ClientMessage; - protected - IsExposing: Boolean; - CanMaximize: Boolean; - - { Internal resource allocation methods } - procedure DoSetCursor; override; - procedure DoSetWindowOptions; override; - function GetHandle: PtrUInt; override; - procedure CreateWindow; override; - - { Other internal methods } - function ConvertShiftState(AState: Cardinal): TShiftState; - function KeySymToKeycode(KeySym: TKeySym): Word; - procedure UpdateMotifWMHints; - - { Event processing methods } - procedure EvCreate; override; - procedure EvFocusIn; override; - procedure EvFocusOut; override; - procedure EvHide; override; - procedure EvKeyPressed(AKey: Word); override; - procedure EvKeyReleased(AKey: Word); override; - procedure EvKeyChar(AKeyChar: Char); override; - procedure EvMouseEnter(const AMousePos: TPoint); override; - procedure EvMouseLeave; override; - procedure EvMousePressed(AButton: TMouseButton; const AMousePos: TPoint); override; - procedure EvMouseReleased(AButton: TMouseButton; const AMousePos: TPoint); override; - procedure EvMouseMove(const AMousePos: TPoint); override; - procedure EvMouseWheel(AWheelDelta: Single; const AMousePos: TPoint); override; - procedure EvPaint; override; - procedure EvMove; override; - procedure EvResize; override; - procedure EvShow; override; - public - { Constructors / Destructors } - constructor Create(AParent: TFCustomWindow; AWindowOptions: TFWindowOptions); override; - destructor Destroy; override; - { Widget controling methods } - function GetTitle: String; override; - procedure SetTitle(const ATitle: String); override; - procedure SetPosition(const APosition: TPoint); override; - procedure SetSize(const ASize: TSize); override; - procedure SetMinMaxSize(const AMinSize, AMaxSize: TSize); override; - procedure SetClientSize(const ASize: TSize); override; - procedure SetMinMaxClientSize(const AMinSize, AMaxSize: TSize); override; - procedure Show; override; - procedure Invalidate; override; - procedure CaptureMouse; override; - procedure ReleaseMouse; override; - end; - - -var - LeaderWindow: X.TWindow; - ClientLeaderAtom: TAtom; - -function RectToXRect(const ARect: TRect): TXRectangle; -function XRectToRect(const ARect: TXRectangle): TRect; -function GetXEventName(Event: LongInt): String; -function XButtonToMouseButton(const XButton: cint; var MouseButton: TMouseButton): Boolean; - -implementation - -uses - GELImage - ,fpGFX - ,fpUTF8Utils - ,Xatom - {,keysym ,libc , } - ; - -resourcestring - SFontCreationFailed = 'Could not create font with descriptor "%s"'; - -{ TX11Font } - -constructor TX11Font.Create(const Descriptor: String); -begin - inherited Create; - FFontStruct := TX11FontResourceImpl.Create(Descriptor); -end; - -destructor TX11Font.Destroy; -begin - if Assigned(FontStruct) then - begin - FFontStruct.Free; - end; - inherited Destroy; -end; - -class function TX11Font.GetDefaultFontName(const AFontClass: TGfxFontClass): String; -const - FontNames: array[TGfxFontClass] of String = ( - 'times', 'bitstream vera sans', 'courier', 'symbol'); -begin - Result := FontNames[AFontClass]; -end; - - -{ TX11Canvas } - -constructor TX11Canvas.Create(AColormap: TColormap; AXDrawable: X.TDrawable; ADefaultFont: TX11FontResourceImpl); -var - DummyWnd: PWindow; - DummyInt: LongInt; - GCValues: XLib.TXGCValues; -begin - inherited Create; - FColormap := AColormap; - FHandle := AXDrawable; - FDefaultFont := ADefaultFont; - XGetGeometry(GFApplication.Handle, Handle, @DummyWnd, @DummyInt, @DummyInt, - @FWidth, @FHeight, @DummyInt, @DummyInt); - - GCValues.graphics_exposures := False; - FGC := XCreateGC(GFApplication.Handle, Handle, GCGraphicsExposures, @GCValues); - if not Assigned(GC) then - raise EX11Error.Create(SGCCreationFailed); - - XSetLineAttributes(GFApplication.Handle, GC, 0, - LineSolid, CapNotLast, JoinMiter); - - FFontStruct := FDefaultFont; - FXftDraw := XftDrawCreate(GFApplication.Handle, Handle, - XDefaultVisual(GFApplication.Handle, XDefaultScreen(GFApplication.Handle)), - XDefaultColormap(GFApplication.Handle, XDefaultScreen(GFApplication.Handle))); - - FRegion := XCreateRegion; - Resized(Width, Height); // Set up a proper clipping region -end; - -destructor TX11Canvas.Destroy; -begin - if FXftDraw <> nil then - XftDrawDestroy(FXftDraw); - - XDestroyRegion(Region); - if Assigned(GC) then - XFreeGC(GFApplication.Handle, GC); - inherited Destroy; -end; - -procedure TX11Canvas.SaveState; -var - SavedState: PX11CanvasState; - NewRegion: TRegion; -begin - New(SavedState); - SavedState^.Prev := FStateStackpointer; - SavedState^.Matrix := Matrix; - SavedState^.Region := Region; - NewRegion := XCreateRegion; - XUnionRegion(Region, NewRegion, NewRegion); - FRegion := NewRegion; - SavedState^.Color := FCurColor; - SavedState^.Font := FFont; - FStateStackpointer := SavedState; -end; - -procedure TX11Canvas.RestoreState; -var - SavedState: PX11CanvasState; -begin - SavedState := FStateStackpointer; - FStateStackpointer := SavedState^.Prev; - Matrix := SavedState^.Matrix; - - XDestroyRegion(Region); - FRegion := SavedState^.Region; - XSetRegion(GFApplication.Handle, GC, Region); - - DoSetColor(SavedState^.Color); - SetFont(SavedState^.Font); - - Dispose(SavedState); -end; - -procedure TX11Canvas.EmptyClipRect; -begin - XDestroyRegion(Region); - FRegion := XCreateRegion; - XSetRegion(GFApplication.Handle, GC, Region); -end; - -function TX11Canvas.DoExcludeClipRect(const ARect: TRect): Boolean; -var - RectRegion: TRegion; - XRect: TXRectangle; -begin - XRect := RectToXRect(ARect); - RectRegion := XCreateRegion; - XUnionRectWithRegion(@XRect, RectRegion, RectRegion); - XSubtractRegion(Region, RectRegion, Region); - XDestroyRegion(RectRegion); - XSetRegion(GFApplication.Handle, GC, Region); - Result := XEmptyRegion(Region) = 0; -end; - -function TX11Canvas.DoIntersectClipRect(const ARect: TRect): Boolean; -var - RectRegion: TRegion; - XRect: TXRectangle; -begin - XRect := RectToXRect(ARect); - RectRegion := XCreateRegion; - XUnionRectWithRegion(@XRect, RectRegion, RectRegion); - XIntersectRegion(Region, RectRegion, Region); - XDestroyRegion(RectRegion); - XSetRegion(GFApplication.Handle, GC, Region); - Result := XEmptyRegion(Region) = 0; -end; - -function TX11Canvas.DoUnionClipRect(const ARect: TRect): Boolean; -var - XRect: TXRectangle; -begin - XRect := RectToXRect(ARect); - XUnionRectWithRegion(@XRect, Region, Region); - XSetRegion(GFApplication.Handle, GC, Region); - Result := XEmptyRegion(Region) = 0; -end; - -function TX11Canvas.DoGetClipRect: TRect; -var - XRect: TXRectangle; -begin - XClipBox(Region, @XRect); - Result := XRectToRect(XRect); -end; - -function TX11Canvas.MapColor(const AColor: TGfxColor): TGfxPixel; -var - Color: TXColor; -begin - Color.Pixel := 0; - Color.Red := AColor.Red * $FF; - Color.Green := AColor.Green * $FF; - Color.Blue := AColor.Blue * $FF; - XAllocColor(GFApplication.Handle, Colormap, @Color); - Result := Color.Pixel; -end; - -procedure TX11Canvas.DoSetColor(AColor: TGfxPixel); -begin - if AColor <> FCurColor then - begin - XSetForeground(GFApplication.Handle, GC, AColor); - FCurColor := AColor; - end; -end; - -procedure TX11Canvas.SetFont(AFont: TFCustomFont); -begin - if AFont = FFont then - Exit; //==> - - FFont := AFont; - - if not Assigned(AFont) then - begin - if FFontStruct = FDefaultFont then - Exit; //==> - FFontStruct := FDefaultFont; - end - else - begin - if not AFont.InheritsFrom(TX11Font) then - raise EGfxError.CreateFmt(SXCanvasInvalidFontClass, [AFont.ClassName]); - if TX11Font(AFont).FontStruct = FFontStruct then - Exit; //==> - FFontStruct := TX11Font(AFont).FontStruct; - end; - FFontStruct := TX11Font(AFont).FontStruct; -end; - -procedure TX11Canvas.SetLineStyle(ALineStyle: TGfxLineStyle); -const - DotDashes: array[0..1] of Char = #4#2; - { It was #1#1 which gives 1 pixel dots. Now it gives a 4 pixel line and a - 2 pixel space. } -begin - case ALineStyle of - lsSolid: - XSetLineAttributes(GFApplication.Handle, GC, 0, - LineSolid, CapNotLast, JoinMiter); - lsDot: - begin - XSetLineAttributes(GFApplication.Handle, GC, 0, - LineOnOffDash, CapNotLast, JoinMiter); - XSetDashes(GFApplication.Handle, GC, 0, DotDashes, 2); - end; - end; -end; - -procedure TX11Canvas.DoDrawArc(const ARect: TRect; StartAngle, EndAngle: Single); -begin - with ARect do - XDrawArc(GFApplication.Handle, Handle, GC, - Left, Top, Right - Left - 1, Bottom - Top - 1, - Round(StartAngle * 64), Round((EndAngle - StartAngle) * 64)); -end; - -procedure TX11Canvas.DoDrawCircle(const ARect: TRect); -begin - with ARect do - XDrawArc(GFApplication.Handle, Handle, GC, - Left, Top, Right - Left - 1, Bottom - Top - 1, 0, 23040); -end; - -procedure TX11Canvas.DoDrawLine(const AFrom, ATo: TPoint); -begin - XDrawLine(GFApplication.Handle, Handle, GC, AFrom.x, AFrom.y, ATo.x, ATo.y); -end; - -procedure TX11Canvas.DrawPolyLine(const Coords: array of TPoint); -var - Points: PXPoint; - CoordsIndex, PointsIndex: Integer; - Pt: TPoint; -begin - Points := nil; - GetMem(Points, (High(Coords) - Low(Coords) + 1) * SizeOf(TXPoint)); - CoordsIndex := Low(Coords); - PointsIndex := 0; - for CoordsIndex := Low(Coords) to High(Coords) do - begin - Pt := Transform(Coords[CoordsIndex]); - Points[PointsIndex].x := Pt.x; - Points[PointsIndex].y := Pt.y; - Inc(PointsIndex); - end; - - XDrawLines(GFApplication.Handle, Handle, GC, Points, PointsIndex, CoordModeOrigin); - - FreeMem(Points); -end; - -procedure TX11Canvas.DoDrawRect(const ARect: TRect); -begin - with ARect do - XDrawRectangle(GFApplication.Handle, Handle, GC, Left, Top, - Right - Left - 1, Bottom - Top - 1); -end; - -procedure TX11Canvas.DoDrawPoint(const APoint: TPoint); -begin - XDrawPoint(GFApplication.Handle, Handle, GC, APoint.x, APoint.y); -end; - -procedure TX11Canvas.DoFillRect(const ARect: TRect); -begin - with ARect do - XFillRectangle(GFApplication.Handle, Handle, GC, Left, Top, - Right - Left, Bottom - Top); -end; - -procedure TX11Canvas.DoFillTriangle(const P1, P2, P3: TPoint); -var - pts: array[1..3] of TXPoint; - pt: TPoint; -begin - pt := Transform(P1); - pts[1].X := pt.X; pts[1].Y := pt.Y; - pt := Transform(P2); - pts[2].X := pt.X; pts[2].Y := pt.Y; - pt := Transform(P3); - pts[3].X := pt.X; pts[3].Y := pt.Y; - - XFillPolygon(GFApplication.Handle, Handle, GC, @pts, 3, 0, CoordModeOrigin); -end; - -function TX11Canvas.FontCellHeight: Integer; -begin - Result := FFontStruct.GetHeight; -end; - -function TX11Canvas.TextExtent(const AText: String): TSize; -var - extents: TXGlyphInfo; -begin - if Length(AText) = 0 then - begin - Result.cx := 0; - Result.cy := 0; - end - else - begin - XftTextExtentsUtf8(GFApplication.Handle, FFontStruct.FontData, PChar(AText), Length(AText), extents); - Result.cx := extents.xOff; - Result.cy := extents.yOff; - end; -end; - -procedure TX11Canvas.DoTextOut(const APosition: TPoint; const AText: String); -var - fntColor: TXftColor; - //-------------- - procedure SetXftColor(c: TGfxPixel; var colxft: TXftColor); - begin - colxft.color.blue := (c and $000000FF) shl 8; - colxft.color.green := (c and $0000FF00); - colxft.color.red := (c and $00FF0000) shr 8; - - colxft.color.alpha := (c and $7F000000) shr 15; - colxft.color.alpha := colxft.color.alpha xor $FFFF; // invert: 0 in GfxColor means not translucent - - colxft.pixel := 0; - end; - -begin - if UTF8Length(AText) < 1 then - Exit; //==> - - SetXftColor(FCurColor,fntColor); - XftDrawSetClip(FXftDraw, FRegion); - XftDrawStringUtf8(FXftDraw, fntColor, FFontStruct.FontData, APosition.x, - Aposition.y + FFontStruct.GetAscent, PChar(AText), Length(AText)); -end; - -procedure TX11Canvas.DoCopyRect(ASource: TFCustomCanvas; const ASourceRect: TRect; - const ADestPos: TPoint); -var - RealHeight: Integer; -begin - if not ASource.InheritsFrom(TX11Canvas) then - raise EX11Error.CreateFmt(SIncompatibleCanvasForBlitting, - [ASource.ClassName, Self.ClassName]); - - if (ASource <> Self) and (ASource.PixelFormat.FormatType = ftMono) then - begin - // !!!: This case will probably be removed completely very soon - RealHeight := ASourceRect.Bottom - ASourceRect.Top; - if ADestPos.y + RealHeight > Height then - RealHeight := Height - ADestPos.y; - XSetClipMask(GFApplication.Handle, GC, TX11Canvas(ASource).Handle); - XSetClipOrigin(GFApplication.Handle, GC, ADestPos.x, ADestPos.y); - XFillRectangle(GFApplication.Handle, Handle, GC, ADestPos.x, ADestPos.y, - ASource.Width, RealHeight); - // Restore old clipping settings - XSetClipOrigin(GFApplication.Handle, GC, 0, 0); - XSetRegion(GFApplication.Handle, GC, Region); - end else - XCopyArea(GFApplication.Handle, TX11Canvas(ASource).Handle, Handle, GC, - ASourceRect.Left, ASourceRect.Top, - ASourceRect.Right - ASourceRect.Left, - ASourceRect.Bottom - ASourceRect.Top, ADestPos.x, ADestPos.y); -end; - -procedure TX11Canvas.DoMaskedCopyRect(ASource, AMask: TFCustomCanvas; - const ASourceRect: TRect; const AMaskPos, ADestPos: TPoint); -var - RectWidth, RectHeight: Integer; - DestPos, MaskPos: TPoint; - SourceRect: TRect; -begin - if not ASource.InheritsFrom(TX11Canvas) then - raise EX11Error.CreateFmt(SIncompatibleCanvasForBlitting, - [ASource.ClassName, Self.ClassName]); - if not AMask.InheritsFrom(TX11MonoPixmapCanvas) then - raise EX11Error.CreateFmt(SIncompatibleCanvasForBlitting, - [AMask.ClassName, Self.ClassName]); - - RectWidth := ASourceRect.Right - ASourceRect.Left; - RectHeight := ASourceRect.Bottom - ASourceRect.Top; - - { !!!: Attention! The current implementation only clips to the ClipRect, - i.e. the outer bounds of the current clipping region. In other words, the - result is only correct for a simple rectangle clipping region. } - with DoGetClipRect do - begin - if (ADestPos.x + RectWidth <= Left) or (ADestPos.y + RectHeight <= Top) then - exit; - - DestPos := ADestPos; - MaskPos := AMaskPos; - SourceRect := ASourceRect; - - if DestPos.x < Left then - begin - Inc(MaskPos.x, Left - DestPos.x); - Inc(SourceRect.Left, Left - DestPos.x); - DestPos.x := Left; - end; - if DestPos.y < Top then - begin - Inc(MaskPos.y, Top - DestPos.y); - Inc(SourceRect.Top, Top - DestPos.y); - DestPos.y := Top; - end; - - if (DestPos.x >= Right) or (DestPos.y >= Bottom) then - exit; - - if DestPos.x + RectWidth > Right then - RectWidth := Right - DestPos.x; - if DestPos.y + RectHeight > Bottom then - RectHeight := Bottom - DestPos.y; - end; - - if (RectWidth <= 0) or (RectHeight <= 0) then - exit; - - - XSetClipMask(GFApplication.Handle, GC, TX11Canvas(AMask).Handle); - XSetClipOrigin(GFApplication.Handle, GC, - DestPos.x - MaskPos.x, DestPos.y - MaskPos.y); - - XCopyArea(GFApplication.Handle, TX11Canvas(ASource).Handle, Handle, GC, - SourceRect.Left, SourceRect.Top, RectWidth, RectHeight, - DestPos.x, DestPos.y); - - // Restore old clipping settings - XSetClipOrigin(GFApplication.Handle, GC, 0, 0); - XSetRegion(GFApplication.Handle, GC, Region); -end; - -procedure TX11Canvas.DoDrawImageRect(AImage: TFCustomBitmap; ASourceRect: TRect; - const ADestPos: TPoint); -var - Image: XLib.PXImage; - ConvertFormat: TGfxPixelFormat; -begin - {$IFDEF VerboseFPGUI} - WriteLn('>: DoDrawImageRect'); - {$ENDIF} - - {$IFDEF VerboseFPGUI} - ASSERT(AImage.InheritsFrom(TX11Bitmap)); - ASSERT(not TX11Bitmap(AImage).IsLocked); - {$ENDIF} - - // !!!: Add support for XF86 4 and XShm etc. to speed this up! - Image := XCreateImage(GFApplication.Handle, Visual, - FormatTypeBPPTable[PixelFormat.FormatType], ZPixmap, 0, nil, - ASourceRect.Right - ASourceRect.Left, - ASourceRect.Bottom - ASourceRect.Top, 8, 0); - - {$IFDEF VerboseFPGUIp} - WriteLn('Size allocat for imageaed: ', Image^.bytes_per_line * (ASourceRect.Bottom - ASourceRect.Top) + 1); - {$ENDIF} - - { Here its necessary to alloc an extra byte, otherwise it will fail on 32-bits - machines, but still work on 64-bits machines. The cause of this is unknown. } - Image^.data := GetMem(Image^.bytes_per_line * (ASourceRect.Bottom - ASourceRect.Top) + 1); - - if (AImage.PixelFormat.FormatType = ftMono) and - Self.InheritsFrom(TX11MonoPixmapCanvas) then - // mirror the bits within all image data bytes...: - FlipMonoImageBits(ASourceRect, TX11Bitmap(AImage).Data, - TX11Bitmap(AImage).Stride, 0, 0, Image^.data, Image^.bytes_per_line) - else - begin - ConvertFormat := PixelFormat; - - { !!!: The following is a workaround: At least the XFree86 X server for - ATI graphics adapters uses 32 bit padding per pixel for 24 bpp - images...?!? To be checked: Is this always the case or only for ATI? } - if ConvertFormat.FormatType = ftRGB24 then - ConvertFormat.FormatType := ftRGB32; - - ConvertImage(ASourceRect, AImage.PixelFormat, AImage.Palette, - TX11Bitmap(AImage).Data, TX11Bitmap(AImage).Stride, - 0, 0, ConvertFormat, Image^.data, Image^.bytes_per_line); - end; - XPutImage(GFApplication.Handle, Handle, GC, - Image, 0, 0, ADestPos.x, ADestPos.y, AImage.Width, AImage.Height); - - FreeMem(Image^.data); - Image^.data := nil; - XDestroyImage(Image); - - {$IFDEF VerboseFPGUI} - WriteLn('<: DoDrawImageRect'); - {$ENDIF} -end; - - -procedure TX11Canvas.Resized(NewWidth, NewHeight: Integer); -var - XRect: TXRectangle; -begin - FWidth := NewWidth; - FHeight := NewHeight; - - XDestroyRegion(Region); - XRect.x := 0; - XRect.y := 0; - XRect.Width := Width; - XRect.Height := Height; - FRegion := XCreateRegion; - XUnionRectWithRegion(@XRect, Region, Region); -end; - - -{ TX11WindowCanvas } - -constructor TX11WindowCanvas.Create(AColormap: TColormap; - AXDrawable: X.TDrawable; ADefaultFont: TX11FontResourceImpl); -var - Attr: XLib.TXWindowAttributes; -begin - inherited Create(AColormap, AXDrawable, ADefaultFont); - - XGetWindowAttributes(GFApplication.Handle, Handle, @Attr); - FVisual := Attr.Visual; - - case Attr.Depth of - 1: PixelFormat.FormatType := ftMono; - 4: PixelFormat.FormatType := ftPal4; - 8: PixelFormat.FormatType := ftPal8; - 16: PixelFormat.FormatType := ftRGB16; - 24: PixelFormat.FormatType := ftRGB24; - 32: PixelFormat.FormatType := ftRGB32; - else - raise EX11Error.CreateFmt(SWindowUnsupportedPixelFormat, [Attr.Depth]); - end; - - if Attr.Depth >= 16 then - begin - PixelFormat.RedMask := Visual^.red_mask; - PixelFormat.GreenMask := Visual^.green_mask; - PixelFormat.BlueMask := Visual^.blue_mask; - end; -end; - - -{ TX11PixmapCanvas } - -constructor TX11PixmapCanvas.Create(AColormap: TColormap; - AHandle: TPixmap; APixelFormat: TGfxPixelFormat); -begin - inherited Create(AColormap, AHandle, nil); - FPixelFormat := APixelFormat; -end; - - -destructor TX11PixmapCanvas.Destroy; -begin - XFreePixmap(GFApplication.Handle, Handle); - inherited Destroy; -end; - -{ TX11MonoPixmapCanvas } - -constructor TX11MonoPixmapCanvas.Create(AColormap: TColormap; AHandle: TPixmap); -begin - inherited Create(AColormap, AHandle, PixelFormatMono); -end; - -{ TX11Bitmap } - -constructor TX11Bitmap.Create(AWidth, AHeight: Integer; APixelFormat: TGfxPixelFormat); -begin - inherited Create(AWidth, AHeight, APixelFormat); - - case APixelFormat.FormatType of - ftMono: - FStride := (AWidth + 7) shr 3; - ftPal4, ftPal4A: - FStride := (AWidth + 1) and not 1; - else - FStride := AWidth * (FormatTypeBPPTable[APixelFormat.FormatType] shr 3); - end; - - GetMem(FData, FStride * Height); -end; - -destructor TX11Bitmap.Destroy; -begin - FreeMem(FData); - inherited Destroy; -end; - -procedure TX11Bitmap.Lock(out AData: Pointer; out AStride: LongWord); -begin - ASSERT(not IsLocked); - IsLocked := True; - - AData := Data; - AStride := Stride; -end; - -procedure TX11Bitmap.Unlock; -begin - ASSERT(IsLocked); - IsLocked := False; -end; - - -{ TX11Screen } - -procedure TX11Screen.SetMousePos(const NewPos: TPoint); -begin - -end; - -function TX11Screen.GetMousePos: TPoint; -begin - -end; - -constructor TX11Screen.Create; -begin - inherited Create; - FScreenIndex := 0; - FScreenInfo := XScreenOfDisplay(GFApplication.Handle, ScreenIndex); -end; - -function TX11Screen.CreateBitmapCanvas(AWidth, AHeight: Integer): TFCustomCanvas; -var - Depth: Integer; - PixelFormat: TGfxPixelFormat; -begin - Depth := XDefaultDepthOfScreen(ScreenInfo); - case Depth of - 1: PixelFormat.FormatType := ftMono; - 4: PixelFormat.FormatType := ftPal4; - 8: PixelFormat.FormatType := ftPal8; - 16: PixelFormat.FormatType := ftRGB16; - 24: PixelFormat.FormatType := ftRGB24; - 32: PixelFormat.FormatType := ftRGB32; - else - raise EX11Error.CreateFmt(SWindowUnsupportedPixelFormat, [Depth]); - end; - - if Depth >= 16 then - with XDefaultVisualOfScreen(ScreenInfo)^ do - begin - PixelFormat.RedMask := red_mask; - PixelFormat.GreenMask := green_mask; - PixelFormat.BlueMask := blue_mask; - end; - - Result := TX11PixmapCanvas.Create( - XDefaultColormapOfScreen(ScreenInfo), - XCreatePixmap(GFApplication.Handle, XRootWindowOfScreen(ScreenInfo), AWidth, AHeight, Depth), - PixelFormat); -end; - -function TX11Screen.CreateMonoBitmapCanvas(AWidth, AHeight: Integer): TFCustomCanvas; -begin - Result := TX11MonoPixmapCanvas.Create( - XDefaultColormap(GFApplication.Handle, ScreenIndex), - XCreatePixmap(GFApplication.Handle, XRootWindowOfScreen(ScreenInfo), - AWidth, AHeight, 1)); -end; - - -{ TX11Application } - -constructor TX11Application.Create; -begin - inherited Create; - -end; - - -destructor TX11Application.Destroy; -var - i: Integer; -begin - if Assigned(Forms) then - begin - for i := 0 to Forms.Count - 1 do - TFCustomWindow(Forms[i]).Free; - end; - - if Assigned(FDefaultFont) then - begin - FDefaultFont.Free; -{ - if FDefaultFont^.fid <> 0 then - XUnloadFont(Handle, FDefaultFont^.fid); - XFreeFontInfo(nil, FDefaultFont, 0); -} - end; - - if Assigned(Handle) then - XCloseDisplay(Handle); - - inherited Destroy; -end; - -procedure TX11Application.Run; -var - XEvent: TXEvent; - WindowEntry: TX11Window; - MouseButton: TMouseButton; - Sum: Integer; - NewEvent: TXEvent; -begin - inherited Run; - - while (not (QuitWhenLastWindowCloses and (Forms.Count = 0))) and - (DoBreakRun = False) do - begin - if Assigned(OnIdle) then - begin - if not XCheckMaskEvent(Handle, MaxInt, @XEvent) then - begin - if Assigned(OnIdle) then OnIdle(Self); - - continue; - end; - end - else - XNextEvent(Handle, @XEvent); - - // if the event filter returns true then it ate the message - if Assigned(FEventFilter) and FEventFilter(XEvent) then continue; - - if Forms.Count = 0 then continue; - - // According to a comment in X.h, the valid event types start with 2! - if XEvent._type >= 2 then - begin - WindowEntry := TX11Window(FindWindowByXID(XEvent.XAny.Window)); - - if not Assigned(WindowEntry) then - begin - WriteLn('fpGFX/X11: Received X event "', GetXEventName(XEvent._type), '" for unknown window'); - continue; - end; - - WindowEntry.FXEvent := @XEvent; - - case XEvent._type of - X.DestroyNotify: - begin - Forms.Remove(WindowEntry); - end; - X.KeyPress: - begin - WindowEntry.EvKeyPressed(XEvent.xkey.keycode); - end; - X.KeyRelease: - begin - WindowEntry.EvKeyReleased(XEvent.xkey.keycode); - end; - X.ButtonPress: - begin - if XButtonToMouseButton(XEvent.xbutton.button, MouseButton) then - WindowEntry.EvMousePressed(MouseButton, - Point(XEvent.xbutton.x, XEvent.xbutton.y)) - else - begin - if XEvent.xbutton.button = 4 then Sum := -1 - else Sum := 1; - - // Check for other mouse wheel messages in the queue - while XCheckTypedWindowEvent(GFApplication.Handle, - WindowEntry.Handle, X.ButtonPress, @NewEvent) do - begin - if NewEvent.xbutton.Button = 4 then - Dec(Sum) - else if NewEvent.xbutton.Button = 5 then - Inc(Sum) - else - begin - XPutBackEvent(GFApplication.Handle, @NewEvent); - break; - end; - end; - - WindowEntry.EvMouseWheel( - Sum, Point(XEvent.xbutton.x, XEvent.xbutton.y)); - end; - end; - X.ButtonRelease: - begin - { Release events are only for mouse buttons, and not mouse wheel moviments } - if (XEvent.xbutton.button >= 1) and (XEvent.xbutton.button <= 3) then - begin - XButtonToMouseButton(XEvent.xbutton.button, MouseButton); - - WindowEntry.EvMouseReleased( - MouseButton, - Point(XEvent.xbutton.x, XEvent.xbutton.y)); - end; - end; - X.EnterNotify: - begin - WindowEntry.EvMouseEnter( - Point(XEvent.xbutton.x, XEvent.xbutton.y)); - end; - X.LeaveNotify: - begin - WindowEntry.EvMouseLeave(); - end; - X.MotionNotify: - begin - WindowEntry.EvMouseMove( - Point(XEvent.xbutton.x, XEvent.xbutton.y)); - end; - X.FocusIn: - begin - WindowEntry.EvFocusIn(); - end; - X.FocusOut: - begin - WindowEntry.EvFocusOut(); - end; - X.MapNotify: - begin - WindowEntry.EvShow(); - end; - X.UnmapNotify: - begin - WindowEntry.EvHide(); - end; - X.ReparentNotify: - begin - WindowEntry.EvCreate(); - end; - X.Expose: - begin - {$Note We can do performance tuning here by looking at Count. - For now we are just ignoring all expose messages where Count <> 0 } - if XEvent.xexpose.count = 0 then - begin - WindowEntry.EvPaint(); - end; - end; - X.ConfigureNotify: - begin - WindowEntry.Dispatch(XEvent); - end; - X.ClientMessage: - begin - WindowEntry.Dispatch(XEvent); - end; - else - WriteLn('fpGFX/X11: Unhandled X11 event received: ', GetXEventName(XEvent._type)); - end; - - end; - end; - DoBreakRun := False; -end; - -procedure TX11Application.Quit; -begin - DoBreakRun := True; -end; - -function TX11Application.FindWindowByXID(XWindowID: X.TWindow): TFCustomWindow; -var - i: Integer; - EndSubSearch: Boolean; { Necessary to quit the recursion } - - { Recursively searches sub-windows } - procedure SearchSubWindows(AForm: TFCustomWindow; var ATarget: TFCustomWindow); - var - j: Integer; - begin - for j := 0 to AForm.ChildWindows.Count - 1 do - begin - if EndSubSearch then Exit; - - if TFCustomWindow(AForm.ChildWindows[j]).Handle = XWindowID then - begin - ATarget := TFCustomWindow(Result.ChildWindows[j]); - - EndSubSearch := True; - - Exit; - end; - - SearchSubWindows(TFCustomWindow(AForm.ChildWindows[j]), ATarget); - end; - end; - -begin - { Loops througth all windows on the application } - for i := 0 to Forms.Count - 1 do - begin - Result := TFCustomWindow(Forms[i]); - - if Result.Handle = XWindowID then exit; - - EndSubSearch := False; - - SearchSubWindows(TFCustomWindow(Forms[i]), Result); - - if Result.Handle = XWindowID then exit; - end; - Result := nil; -end; - -procedure TX11Application.Initialize(ADisplayName: String = ''); -begin - if Length(ADisplayName) = 0 then - begin - // Maybe it was passed as a -display parameter. Lets check first! - if FDisplayName = '' then - FDisplayName := XDisplayName(nil) - end - else - FDisplayName := ADisplayName; - - Handle := XOpenDisplay(PChar(DisplayName)); - - if not Assigned(Handle) then - raise EX11Error.CreateFmt(SOpenDisplayFailed, [DisplayName]); - -// FDefaultFont := TX11FontResourceImpl.Create('Arial-10'); - FDefaultFont := TX11FontResourceImpl.Create('Sans-10'); - - if not Assigned(FDefaultFont) then - raise EX11Error.Create(SNoDefaultFont); -end; - -{ TX11Window } - -{ Note, this only creates a window, it doesn't actually show the window. It - is still invisible. To make it visible, we need to call Show(). } -constructor TX11Window.Create(AParent: TFCustomWindow; AWindowOptions: TFWindowOptions); -var - Colormap: TColormap; -begin - inherited Create(AParent, AWindowOptions); - - CreateWindow; - - { Creates the canvas } - - Colormap := XDefaultColormap(GFApplication.Handle, XDefaultScreen(GFApplication.Handle)); - - FCanvas := TX11WindowCanvas.Create(Colormap, Handle, GFApplication.FDefaultFont); -end; - -destructor TX11Window.Destroy; -begin - if Assigned(OnClose) then - OnClose(Self); - - FCanvas.Free; - if FCurCursorHandle <> 0 then - XFreeCursor(GFApplication.Handle, FCurCursorHandle); - - GFApplication.RemoveWindow(Self); - - XDestroyWindow(GFApplication.Handle, Handle); - - inherited Destroy; -end; - -procedure TX11Window.SetPosition(const APosition: TPoint); -var - Supplied: PtrInt; - SizeHints: PXSizeHints; - - dx, dy: integer; - lx, ly: integer; - cw : PWindow; -begin - if FParent = nil then - begin - {$Note This doesn't work yet. I want to position a new window relative to - another window. Used for popup windows, like the TComboBox dropdown. } - {$IFDEF DEBUG} writeln('SetPosition with no Parent'); {$ENDIF} - lx := APosition.x; - ly := APosition.y; - - XTranslateCoordinates(GFApplication.Handle, Handle, - XDefaultRootWindow(GFApplication.Handle), - lx, ly, @dx, @dy, @cw); - lx := dx; - ly := dy; - end - else - begin - {$IFDEF DEBUG} writeln('SetPosition inside parent'); {$ENDIF} - lx := APosition.x; - ly := APosition.y; - end; - {$IFDEF DEBUG} Writeln(Format('was (%d,%d) and is now (%d,%d)', [APosition.x, APosition.y, lx, ly])); {$ENDIF} - - SizeHints := XAllocSizeHints; - XGetWMNormalHints(GFApplication.Handle, Handle, SizeHints, @Supplied); - SizeHints^.flags := SizeHints^.flags or PPosition; - SizeHints^.x := lx; - SizeHints^.y := ly; - XSetWMNormalHints(GFApplication.Handle, Handle, SizeHints); - XFree(SizeHints); - XMoveWindow(GFApplication.Handle, Handle, lx, ly); -end; - -procedure TX11Window.SetSize(const ASize: TSize); -begin - // !!!: Implement this properly - WriteLn('fpGFX/X11: TXWindow.SetSize is not properly implemented yet'); - SetClientSize(ASize); -end; - -procedure TX11Window.SetMinMaxSize(const AMinSize, AMaxSize: TSize); -begin - // !!!: Implement this properly - WriteLn('fpGFX/X11: TXWindow.SetMinMaxSize is not properly implemented yet'); - SetMinMaxClientSize(AMinSize, AMaxSize); -end; - -procedure TX11Window.SetClientSize(const ASize: TSize); -var - ChangeMask: Cardinal; - Changes: TXWindowChanges; -begin - ChangeMask := 0; - - if ASize.cx <> ClientWidth then - begin - ChangeMask := CWWidth; - Changes.Width := ASize.cx; - end; - - if ASize.cy <> ClientHeight then - begin - ChangeMask := ChangeMask or CWHeight; - Changes.Height := ASize.cy; - end; - - if ChangeMask <> 0 then - XConfigureWindow(GFApplication.Handle, Handle, ChangeMask, @Changes); -end; - -procedure TX11Window.SetMinMaxClientSize(const AMinSize, AMaxSize: TSize); -var - Supplied: PtrInt; - SizeHints: PXSizeHints; -begin - CanMaximize := (AMaxSize.cx = 0) or (AMaxSize.cy = 0) or - (AMaxSize.cx > AMinSize.cx) or (AMaxSize.cy > AMinSize.cy); - UpdateMotifWMHints; - - SizeHints := XAllocSizeHints; - XGetWMNormalHints(GFApplication.Handle, Handle, SizeHints, @Supplied); - with SizeHints^ do - begin - if (AMinSize.cx > 0) or (AMinSize.cy > 0) then - begin - flags := flags or PMinSize; - min_width := AMinSize.cx; - min_height := AMinSize.cy; - end else - flags := flags and not PMinSize; - - if (AMaxSize.cx > 0) or (AMaxSize.cy > 0) then - begin - flags := flags or PMaxSize; - if AMaxSize.cx > 0 then - max_width := AMaxSize.cx - else - max_width := 32767; - if AMaxSize.cy > 0 then - max_height := AMaxSize.cy - else - max_height := 32767; - end else - flags := flags and not PMaxSize; - end; - - XSetWMNormalHints(GFApplication.Handle, Handle, SizeHints); - XFree(SizeHints); -end; - -{ Makes the window visible and raises it to the top of the stack. } -procedure TX11Window.Show; -begin - GFApplication.AddWindow(self); - XMapRaised(GFApplication.Handle, Handle); -end; - -procedure TX11Window.Invalidate; -begin - EvPaint(); -end; - -procedure TX11Window.CaptureMouse; -begin - XGrabPointer(GFApplication.Handle, Handle, - True, - ButtonPressMask or ButtonReleaseMask or EnterWindowMask or LeaveWindowMask or PointerMotionMask, - GrabModeAsync, - GrabModeAsync, - 0, - 0, - CurrentTime - ); -end; - -procedure TX11Window.ReleaseMouse; -begin - XUngrabPointer(GFApplication.Handle, CurrentTime); -end; - -procedure TX11Window.EvCreate; -begin - if Assigned(OnCreate) then OnCreate(Self) -end; - -procedure TX11Window.EvFocusIn; -begin - if Assigned(OnFocusIn) then OnFocusIn(Self); -end; - -procedure TX11Window.EvFocusOut; -begin - if Assigned(OnFocusOut) then OnFocusOut(Self); -end; - -procedure TX11Window.EvHide; -begin - if Assigned(OnHide) then OnHide(Self); -end; - -procedure TX11Window.EvKeyPressed(AKey: Word); -var - KeySym: TKeySym; -begin - KeySym := StartComposing(FXEvent^); - - if Assigned(OnKeyPressed) then - OnKeyPressed(Self, AKey, ConvertShiftState(FXEvent^.xkey.state)) - else if Assigned(Parent) then TX11Window(Parent).EvKeyPressed(AKey); - - if (FXEvent^.xkey.state and (ControlMask or Mod1Mask)) = 0 then EndComposing; -end; - -procedure TX11Window.EvKeyReleased(AKey: Word); -var - KeySym: TKeySym; -begin - KeySym := StartComposing(FXEvent^); - - if Assigned(OnKeyReleased) then - OnKeyReleased(Self, KeySymToKeycode(KeySym), ConvertShiftState(FXEvent^.xkey.state)) - else if Assigned(Parent) then TX11Window(Parent).EvKeyReleased(AKey); - - // Do not call EndComposing, as this would generate duplicate KeyChar events! -end; - -procedure TX11Window.EvKeyChar(AKeyChar: Char); -begin -{ if Assigned(OnKeyChar) then OnKeyChar(Self, Chr(AEvent.wParam)) - else if Assigned(Parent) then Parent.ProcessEvent(AEvent); } -end; - -procedure TX11Window.EvMouseEnter(const AMousePos: TPoint); -begin - if Assigned(OnMouseEnter) then - OnMouseEnter(Self, ConvertShiftState(FXEvent^.xbutton.state), AMousePos) - else if Assigned(Parent) then TX11Window(Parent).EvMouseEnter(AMousePos); -end; - -procedure TX11Window.EvMouseLeave; -begin - if Assigned(OnMouseLeave) then OnMouseLeave(Self) - else if Assigned(Parent) then TX11Window(Parent).EvMouseLeave(); -end; - -procedure TX11Window.EvMousePressed(AButton: TMouseButton; - const AMousePos: TPoint); -begin - if Assigned(OnMousePressed) then - OnMousePressed(Self, AButton, ConvertShiftState(FXEvent^.xbutton.state), AMousePos) - else if Assigned(Parent) then TX11Window(Parent).EvMousePressed(AButton, AMousePos); -end; - -procedure TX11Window.EvMouseReleased(AButton: TMouseButton; - const AMousePos: TPoint); -begin - if Assigned(OnMouseReleased) then - OnMouseReleased(Self, AButton, - ConvertShiftState(FXEvent^.xbutton.state), AMousePos) - else if Assigned(Parent) then TX11Window(Parent).EvMouseReleased(AButton, AMousePos); -end; - -procedure TX11Window.EvMouseMove(const AMousePos: TPoint); -begin - if Assigned(OnMouseMove) then - OnMouseMove(Self, ConvertShiftState(FXEvent^.xbutton.state), AMousePos) - else if Assigned(Parent) then TX11Window(Parent).EvMouseMove(AMousePos); -end; - -procedure TX11Window.EvMouseWheel(AWheelDelta: Single; const AMousePos: TPoint); -begin - if Assigned(OnMouseWheel) then - OnMouseWheel(Self, ConvertShiftState(FXEvent^.xbutton.state), AWheelDelta, AMousePos) - else if Assigned(Parent) then TX11Window(Parent).EvMouseWheel(AWheelDelta, AMousePos); -end; - -procedure TX11Window.EvPaint; -begin - if Assigned(OnPaint) then OnPaint(Self); -end; - -procedure TX11Window.EvMove; -begin - if Assigned(OnMove) then OnMove(Self); -end; - -procedure TX11Window.EvResize; -begin - if Assigned(OnResize) then OnResize(Self); -end; - -procedure TX11Window.EvShow; -begin - if Assigned(OnShow) then OnShow(Self); -end; - -function TX11Window.GetTitle: String; -var - s: PChar; -begin - XFetchName(GFApplication.Handle, Handle, @s); - Result := s; - XFree(s); -end; - -procedure TX11Window.SetTitle(const ATitle: String); -var - tp: TXTextProperty; -begin - tp.value := PCUChar(ATitle); - tp.encoding := XA_WM_NAME; - tp.format := 8; - tp.nitems := UTF8Length(ATitle); - - XSetWMName(GFApplication.Handle, Handle, @tp); - XStoreName(GFApplication.Handle, Handle, PChar(ATitle)); - XSetIconName(GFApplication.Handle, Handle, PChar(ATitle)); - XSetWMIconName(GFApplication.Handle, Handle, @tp); -end; - -procedure TX11Window.DoSetCursor; -const - CursorTable: array[TFCursor] of Integer = ( - -1, // crDefault - -2, // crNone !!!: not implemented - -1, // crArrow - 34, // crCross - 152, // crIBeam - 52, // crSize - 116, // crSizeNS - 108, // crSizeWE - 114, // crUpArrow - 150, // crHourGlass - 0, // crNoDrop - 92); // crHelp -var - ID: Integer; -begin - if FCurCursorHandle <> 0 then - XFreeCursor(GFApplication.Handle, FCurCursorHandle); - ID := CursorTable[Cursor]; - if ID = -1 then - FCurCursorHandle := 0 - else - FCurCursorHandle := XCreateFontCursor(GFApplication.Handle, ID); - XDefineCursor(GFApplication.Handle, Handle, FCurCursorHandle); -end; - -procedure TX11Window.DoSetWindowOptions; -begin - -end; - -function TX11Window.GetHandle: PtrUInt; -begin - Result := FHandle; -end; - -procedure TX11Window.CreateWindow; -const - WindowHints: TXWMHints = ( - flags: InputHint or StateHint or WindowGroupHint; - input: True; - initial_state: NormalState; - icon_pixmap: 0; - icon_window: 0; - icon_x: 0; - icon_y: 0; - icon_mask: 0; - window_group: 0; - ); -var - Colormap: TColormap; - Attr: TXSetWindowAttributes; - SizeHints: TXSizeHints; - ClassHint: PXClassHint; - lParentHandle: X.TWindow; - mask: longword; -begin - if (not (woX11SkipWMHints in WindowOptions)) and (woWindow in WindowOptions) then - begin - if LeaderWindow = 0 then - begin - LeaderWindow := XCreateSimpleWindow(GFApplication.Handle, - XDefaultRootWindow(GFApplication.Handle), 0, 0, 1, 1, 0, 0, 0); - - ClassHint := XAllocClassHint; - ClassHint^.res_name := 'fpGFX'; // !!! use app name - ClassHint^.res_class := 'FpGFX'; - XSetWMProperties(GFApplication.Handle, LeaderWindow, nil, nil, nil, 0, nil, nil, - ClassHint); - XFree(ClassHint); - ClientLeaderAtom := XInternAtom(GFApplication.Handle, 'WM_CLIENT_LEADER', False); - end; - end; - - Colormap := XDefaultColormap(GFApplication.Handle, XDefaultScreen(GFApplication.Handle)); - Attr.Colormap := Colormap; - - SizeHints.flags := XUtil.PSize; - SizeHints.x := 0; - SizeHints.y := 0; - SizeHints.width := 200; - SizeHints.height := 200; - - { Make sure we use the correct parent handle } - if FParent <> nil then - lParentHandle := TX11Window(FParent).Handle - else - lParentHandle := XDefaultRootWindow(GFApplication.Handle); - - { setup attributes and masks } - if (woBorderless in WindowOptions) or (woToolWindow in WindowOptions) then - begin - Attr.Override_Redirect := True; // this removes window borders - mask := CWOverrideRedirect;// or CWColormap; - end - else if (woPopup in WindowOptions) then - begin - Attr.Override_Redirect := True; // this removes window borders - Attr.save_under := True; - mask := CWOverrideRedirect or CWSaveUnder; - end - else - begin - Attr.Override_Redirect := False; - mask := CWColormap; - end; - - FHandle := XCreateWindow( - GFApplication.Handle, - lParentHandle, // parent - SizeHints.x, SizeHints.x, // position (top, left) - SizeHints.width, SizeHints.height, // default size (width, height) - 0, // border size - CopyFromParent, // depth - InputOutput, // class - XDefaultVisual(GFApplication.Handle, XDefaultScreen(GFApplication.Handle)), // visual - mask, - @Attr); - - if FHandle = 0 then - raise EX11Error.Create(SWindowCreationFailed); - - XSelectInput(GFApplication.Handle, FHandle, KeyPressMask or KeyReleaseMask - or ButtonPressMask or ButtonReleaseMask - or EnterWindowMask or LeaveWindowMask - or ButtonMotionMask or PointerMotionMask - or ExposureMask - or FocusChangeMask - or StructureNotifyMask -// or PropertyChangeMask - ); - - if (not (woX11SkipWMHints in WindowOptions)) and (woWindow in WindowOptions) then - begin - XSetStandardProperties(GFApplication.Handle, Handle, nil, nil, 0, - argv, argc, @SizeHints); - - XSetWMNormalHints(GFApplication.Handle, Handle, @SizeHints); - - WindowHints.flags := WindowGroupHint; - WindowHints.window_group := LeaderWindow; - XSetWMHints(GFApplication.Handle, Handle, @WindowHints); - - XChangeProperty(GFApplication.Handle, Handle, ClientLeaderAtom, 33, 32, - PropModeReplace, @LeaderWindow, 1); - - // We want to get a Client Message when the user tries to close this window - if GFApplication.FWMProtocols = 0 then - GFApplication.FWMProtocols := XInternAtom(GFApplication.Handle, 'WM_PROTOCOLS', False); - if GFApplication.FWMDeleteWindow = 0 then - GFApplication.FWMDeleteWindow := XInternAtom(GFApplication.Handle, 'WM_DELETE_WINDOW', False); - - // send close event instead of quitting the whole application... - XSetWMProtocols(GFApplication.Handle, FHandle, @GFApplication.FWMDeleteWindow, 1); - end; - - { Child windows do not appear until parent (lParentHandle) is mapped } - if FParent <> nil then - XMapSubwindows(GFApplication.Handle, lParentHandle); - - // for modal windows, this is necessary -// if (woModal in WindowOptions) then -// XSetTransientForHint(GFApplication.Handle, Handle, Handle); -end; - -function TX11Window.ConvertShiftState(AState: Cardinal): TShiftState; -begin - Result := []; - if (AState and Button1Mask) <> 0 then - Include(Result, ssLeft); - if (AState and Button2Mask) <> 0 then - Include(Result, ssMiddle); - if (AState and Button3Mask) <> 0 then - Include(Result, ssRight); - if (AState and ShiftMask) <> 0 then - Include(Result, ssShift); - if (AState and LockMask) <> 0 then - Include(Result, ssCaps); - if (AState and ControlMask) <> 0 then - Include(Result, ssCtrl); - if (AState and Mod1Mask) <> 0 then - Include(Result, ssAlt); - if (AState and Mod2Mask) <> 0 then - Include(Result, ssNum); - if (AState and Mod4Mask) <> 0 then - Include(Result, ssSuper); - if (AState and Mod5Mask) <> 0 then - Include(Result, ssScroll); - if (AState and (1 shl 13)) <> 0 then - Include(Result, ssAltGr); -end; - -function TX11Window.KeySymToKeycode(KeySym: TKeySym): Word; -const - Table_20aX: array[$20a0..$20ac] of Word = (keyEcuSign, keyColonSign, - keyCruzeiroSign, keyFFrancSign, keyLiraSign, keyMillSign, keyNairaSign, - keyPesetaSign, keyRupeeSign, keyWonSign, keyNewSheqelSign, keyDongSign, - keyEuroSign); - Table_feXX: array[$fe50..$fe60] of Word = (keyDeadGrave, keyDeadAcute, - keyDeadCircumflex, keyDeadTilde, keyDeadMacron,keyDeadBreve, - keyDeadAbovedot, keyDeadDiaeresis, keyDeadRing, keyDeadDoubleacute, - keyDeadCaron, keyDeadCedilla, keyDeadOgonek, keyDeadIota, - keyDeadVoicedSound, keyDeadSemivoicedSound, keyDeadBelowdot); - Table_ff5X: array[$ff50..$ff58] of Word = (keyHome, keyLeft, keyUp, keyRight, - keyDown, keyPrior, keyNext, keyEnd, keyBegin); - Table_ff6X: array[$ff60..$ff6b] of Word = (keySelect, keyPrintScreen, - keyExecute, keyNIL, keyInsert, keyUndo, keyRedo, keyMenu, keyFind, - keyCancel, keyHelp, keyBreak); - Table_ff9X: array[$ff91..$ff9f] of Word = (keyPF1, keyPF2, keyPF3, keyPF4, - keyP7, keyP4, keyP8, keyP6, keyP2, keyP9, keyP3, keyP1, keyP5, keyP0, - keyPDecimal); - Table_ffeX: array[$ffe1..$ffee] of Word = (keyShiftL, keyShiftR, keyCtrlL, - keyCtrlR, keyCapsLock, keyShiftLock, keyMetaL, keyMetaR, keyAltL, keyAltR, - keySuperL, keySuperR, keyHyperL, keyHyperR); -begin - case KeySym of - 0..Ord('a')-1, Ord('z')+1..$bf, $f7: - Result := KeySym; - Ord('a')..Ord('z'), $c0..$f6, $f8..$ff: - Result := KeySym - 32; - $20a0..$20ac: Result := Table_20aX[KeySym]; - $fe20: Result := keyTab; - $fe50..$fe60: Result := Table_feXX[KeySym]; - $ff08: Result := keyBackspace; - $ff09: Result := keyTab; - $ff0a: Result := keyLinefeed; - $ff0b: Result := keyClear; - $ff0d: Result := keyReturn; - $ff13: Result := keyPause; - $ff14: Result := keyScrollLock; - $ff15: Result := keySysRq; - $ff1b: Result := keyEscape; - $ff50..$ff58: Result := Table_ff5X[KeySym]; - $ff60..$ff6b: Result := Table_ff6X[KeySym]; - $ff7e: Result := keyModeSwitch; - $ff7f: Result := keyNumLock; - $ff80: Result := keyPSpace; - $ff89: Result := keyPTab; - $ff8d: Result := keyPEnter; - $ff91..$ff9f: Result := Table_ff9X[KeySym]; - $ffaa: Result := keyPAsterisk; - $ffab: Result := keyPPlus; - $ffac: Result := keyPSeparator; - $ffad: Result := keyPMinus; - $ffae: Result := keyPDecimal; - $ffaf: Result := keyPSlash; - $ffb0..$ffb9: Result := keyP0 + KeySym - $ffb0; - $ffbd: Result := keyPEqual; - $ffbe..$ffe0: Result := keyF1 + KeySym - $ffbe; - $ffe1..$ffee: Result := Table_ffeX[KeySym]; - $ffff: Result := keyDelete; - else - Result := keyNIL; - end; -{$IFDEF Debug} - if Result = keyNIL then - WriteLn('fpGFX/X11: Unknown KeySym: $', IntToHex(KeySym, 4)); -{$ENDIF} -end; - -procedure TX11Window.UpdateMotifWMHints; -type - PMotifWmHints = ^TMotifWmHints; - TMotifWmHints = packed record - Flags, Functions, Decorations: LongWord; - InputMode: LongInt; - Status: LongWord; - end; -const - MWM_HINTS_FUNCTIONS = 1; - MWM_HINTS_DECORATIONS = 2; - FuncAll = 1; - FuncResize = 2; - FuncMove = 4; - FuncMinimize = 8; - FuncMaximize = 16; - FuncClose = 32; - DecorAll = 1; - DecorBorder = 2; - DecorResizeH = 4; - DecorTitle = 8; - DecorMenu = 16; - DecorMinimize = 32; - DecorMaximize = 64; -var - PropType: TAtom; - PropFormat: LongInt; - PropItemCount, PropBytesAfter: LongWord; - Hints: PMotifWmHints; - NewHints: TMotifWmHints; -begin - if GFApplication.FWMHints = 0 then - GFApplication.FWMHints := - XInternAtom(GFApplication.Handle, '_MOTIF_WM_HINTS', False); - - XGetWindowProperty(GFApplication.Handle, Handle, - GFApplication.FWMHints, 0, 5, False, AnyPropertyType, @PropType, - @PropFormat, @PropItemCount, @PropBytesAfter, @Hints); - - NewHints.Flags := MWM_HINTS_FUNCTIONS or MWM_HINTS_DECORATIONS; - NewHints.Functions := FuncResize or FuncMove or FuncMinimize or FuncClose; - - if (woToolWindow in WindowOptions) or (woWindow in WindowOptions) or - (woPopup in WindowOptions) then - NewHints.Decorations := DecorBorder or DecorTitle or DecorMenu or DecorMinimize - else - NewHints.Decorations := 0; - if CanMaximize then - begin - NewHints.Functions := NewHints.Functions or FuncMaximize; - NewHints.Decorations := NewHints.Decorations or DecorMaximize; - end; - - if Assigned(Hints) then - begin - Hints^.Flags := Hints^.Flags or NewHints.Flags; - Hints^.Decorations := NewHints.Decorations; - Hints^.Functions := NewHints.Functions; - end else - Hints := @NewHints; - - XChangeProperty(GFApplication.Handle, Handle, - GFApplication.FWMHints, GFApplication.FWMHints, - 32, PropModeReplace, Pointer(Hints), 5); - if Hints <> @NewHints then - XFree(Hints); -end; - -function TX11Window.StartComposing(const Event: TXEvent): TKeySym; -begin - SetLength(FComposeBuffer, - XLookupString(@Event, @FComposeBuffer[1], - SizeOf(FComposeBuffer) - 1, @Result, @FComposeStatus)); -end; - -procedure TX11Window.EndComposing; -var - i: Integer; -begin - if Assigned(OnKeyChar) then - for i := 1 to Length(FComposeBuffer) do - OnKeyChar(Self, FComposeBuffer[i]); -end; - -procedure TX11Window.Configure(var Event: TXConfigureEvent); -begin - while XCheckTypedWindowEvent(GFApplication.Handle, Handle, - X.ConfigureNotify, @Event) do; - - if (Event.x <> Left) or (Event.y <> Top) then - begin - FLeft := Event.x; - FTop := Event.y; - if Assigned(OnMove) then - OnMove(Self); - end; - if (Event.Width <> Width) or (Event.Height <> Height) then - begin - // !!!: The following 2 lines are _quite_ wrong... :) - FWidth := Event.Width; - FHeight := Event.Height; - FClientWidth := Event.Width; - FClientHeight := Event.Height; - TX11Canvas(Canvas).Resized(ClientWidth, ClientHeight); - if Assigned(OnResize) then - OnResize(Self); - end; -end; - -procedure TX11Window.ClientMessage(var Event: TXClientMessageEvent); -begin - if Event.message_type = GFApplication.FWMProtocols then - if Event.Data.l[0] = GFApplication.FWMDeleteWindow then - begin - if CanClose then - Free; - end else - WriteLn('fpGFX/X11: Unknown client protocol message: ', Event.Data.l[0]) - else - WriteLn('fpGFX/X11: Unknown client message: ', Event.message_type); -end; - -{ Global utility functions } - -function RectToXRect(const ARect: TRect): TXRectangle; -begin - Result.x := ARect.Left; - Result.y := ARect.Top; - Result.width := ARect.Right - ARect.Left; - Result.height := ARect.Bottom - ARect.Top; -end; - -function XRectToRect(const ARect: TXRectangle): TRect; -begin - Result.Left := ARect.x; - Result.Top := ARect.y; - Result.Right := ARect.x + ARect.width; - Result.Bottom := ARect.y + ARect.height; -end; - -function GetXEventName(Event: LongInt): String; -const - EventNames: array[2..34] of String = ( - 'KeyPress', 'KeyRelease', 'ButtonPress', 'ButtonRelease', 'MotionNotify', - 'EnterNotify', 'LeaveNotify', 'FocusIn', 'FocusOut', 'KeymapNotify', - 'Expose', 'GraphicsExpose', 'NoExpose', 'VisibilityNotify', 'CreateNotify', - 'DestroyNotify', 'UnmapNotify', 'MapNotify', 'MapRequest', 'ReparentNotify', - 'ConfigureNotify', 'ConfigureRequest', 'GravityNotify', 'ResizeRequest', - 'CirculateNotify', 'CirculateRequest', 'PropertyNotify', 'SelectionClear', - 'SelectionRequest', 'SelectionNotify', 'ColormapNotify', 'ClientMessage', - 'MappingNotify'); -begin - if (Event >= Low(EventNames)) and (Event <= High(EventNames)) then - Result := EventNames[Event] - else - Result := '#' + IntToStr(Event); -end; - -{ Returns True if the button is indeed a mouse button - and False if it's the mouse wheel } -function XButtonToMouseButton(const XButton: cint; var MouseButton: TMouseButton): Boolean; -const - ButtonTable: array[1..3] of TMouseButton = (mbLeft, mbMiddle, mbRight); -begin - Result := False; - - if (XButton > 3) or (XButton < 1) then Exit; - - MouseButton := ButtonTable[XButton]; - - Result := True; -end; - -{ TX11FontResourceImpl } - -constructor TX11FontResourceImpl.Create(const Descriptor: String); -begin - FFontData := XftFontOpenName(GFApplication.Handle, XDefaultScreen(GFApplication.Handle), PChar(Descriptor)); - if not Assigned(FFontData) then - raise EX11Error.CreateFmt(SFontCreationFailed, [Descriptor]); -end; - -destructor TX11FontResourceImpl.Destroy; -begin - if Assigned(FFontData) then - XftFontClose(GFApplication.Handle, FFontData); - inherited Destroy; -end; - -function TX11FontResourceImpl.GetAscent: integer; -begin - Result := FFontData^.Ascent; -end; - -function TX11FontResourceImpl.GetDescent: integer; -begin - Result := FFontData^.Descent; -end; - -function TX11FontResourceImpl.GetHeight: integer; -begin - Result := GetAscent + GetDescent; -end; - -end. - - diff --git a/gfx/x11/gfxinterface.pas b/gfx/x11/gfxinterface.pas deleted file mode 100644 index f6df234c..00000000 --- a/gfx/x11/gfxinterface.pas +++ /dev/null @@ -1,45 +0,0 @@ -{ - fpGUI - Free Pascal Graphical User Interface - - GFXInterface - Default target selection unit for X11 target - - Copyright (C) 2006 - 2007 See the file AUTHORS, 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. -} -unit gfxinterface; - -{$ifdef fpc} - {$mode objfpc}{$H+} -{$endif} - -interface - -uses - GFX_X11; - -type - - TDefCanvas = TX11Canvas; - - TDefFont = TX11Font; - - TDefScreen = TX11Screen; - - TDefApplication = TX11Application; - - TDefWindow = TX11Window; - - TDefBitmap = TX11Bitmap; - - -implementation - -end. - diff --git a/gfx/x11/unitxft.pas b/gfx/x11/unitxft.pas deleted file mode 100644 index a4b1f6c0..00000000 --- a/gfx/x11/unitxft.pas +++ /dev/null @@ -1,162 +0,0 @@ -{ - fpGFX - Free Pascal Graphics Library - Copyright (C) 2006-2007 by Graeme Geldenhuys - member of the fpGFX development team. - - Xft interface functions - - See the file COPYING.fpGFX, included in this distribution, - for details about the copyright. - - 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. - - **********************************************************************} - - -unit unitxft; - -{$mode objfpc}{$H+} - -{$linklib Xft} - -interface -uses - Classes - ,SysUtils - ,X - ,XLib - ,Xutil - ; - - -type - TPicture = longword; - - TXftDraw = record - dummy : Pointer; - end; - PXftDraw = ^TXftDraw; - - TXftFont = record - ascent : integer; - descent : integer; - height : integer; - max_advance_width : integer; - ptr1 : Pointer; // charset - ptr2 : Pointer; // pattern - end; - PXftFont = ^TXftFont; - - TXRenderColor = record - red : word; - green : word; - blue : word; - alpha : word; - end; - - TXftColor = record - pixel : ptrint; - color : TXRenderColor; - end; - - TXGlyphInfo = packed record - width : word; - height : word; - x : smallint; - y : smallint; - xOff : smallint; - yOff : smallint; - end; - - TFcPattern = record - dummy : integer; - end; - - PFcPattern = ^TFcPattern; - PPFcPattern = ^PFcPattern; - - TFcFontSet = packed record - nfont : integer; - sfont : integer; - fonts : PPFcPattern; - end; - PFcFontSet = ^TFcFontSet; - -const - FC_FAMILY : PChar = 'family'; - FC_SIZE : PChar = 'size'; - FC_SCALABLE : PChar = 'scalable'; - - FcTypeVoid = 0; - FcTypeInteger = 1; - FcTypeDouble = 2; - FcTypeString = 3; - FcTypeBool = 4; - FcTypeMatrix = 5; - FcTypeCharSet = 6; - FcTypeFTFace = 7; - FcTypeLangSet = 8; - -function XftDrawCreate(display : PXDisplay; win : TXID; vis : PVisual; colorm : longint) : PXftDraw; cdecl; -procedure XftDrawChange(xftd : PXftDraw; win : TXID); cdecl; -procedure XftDrawDestroy(draw : PXftDraw); cdecl; - -function XftDrawPicture(draw : PXftDraw) : TPicture; cdecl; - -function XftFontOpenName(display : PXDisplay; scr : integer; par3 : PChar) : PXftFont; cdecl; -procedure XftFontClose(display : PXDisplay; fnt : PXftFont); cdecl; - -procedure XftDrawStringUtf8(draw : PXftDraw; var col : TXftColor; fnt : PXftFont; x,y : integer; txt : PChar; len : integer); cdecl; -procedure XftDrawString8(draw : PXftDraw; var col : TXftColor; fnt : PXftFont; x,y : integer; txt : PChar; len : integer); cdecl; -procedure XftDrawString16(draw : PXftDraw; var col : TXftColor; fnt : PXftFont; x,y : integer; txt : PChar; len : integer); cdecl; - -procedure XftTextExtentsUtf8(display : PXDisplay; fnt : PXftFont; txt : PChar; len : integer; var extents : TXGlyphInfo); cdecl; -procedure XftTextExtents8(display : PXDisplay; fnt : PXftFont; txt : PChar; len : integer; var extents : TXGlyphInfo); cdecl; -procedure XftTextExtents16(display : PXDisplay; fnt : PXftFont; txt : PChar; len : integer; var extents : TXGlyphInfo); cdecl; - -//function XftGlyphExists(display : PXDisplay; fnt : PXftFont; ch : integer) : longbool; cdecl; - -//procedure XftDrawSetClipRectangles(draw : PXftDraw; xorigin, yorigin : integer; rect : PXRectangle; rnum : integer); cdecl; - -procedure XftDrawSetClip(draw : PXftDraw; rg : TRegion); cdecl; - -function XftListFonts(display : PXDisplay; screen : integer; params : array of const) : PFcFontSet; cdecl; -function XftNameUnparse(pat : PFcPattern; dest : PChar; destlen : integer) : boolean; cdecl; -procedure FcFontSetDestroy(fsp : PFcFontSet); cdecl; - - - -implementation - - -function XftDrawCreate(display : PXDisplay; win : TXID; vis : PVisual; colorm : longint) : PXftDraw; cdecl; external; -procedure XftDrawChange(xftd : PXftDraw; win : TXID); cdecl; external; -procedure XftDrawDestroy(draw : PXftDraw); cdecl; external; - -function XftDrawPicture(draw : PXftDraw) : TPicture; cdecl; external; - -function XftFontOpenName(display : PXDisplay; scr : integer; par3 : PChar) : PXftFont; cdecl; external; -procedure XftFontClose(display : PXDisplay; fnt : PXftFont); cdecl; external; - -procedure XftDrawStringUtf8(draw : PXftDraw; var col : TXftColor; fnt : PXftFont; x,y : integer; txt : PChar; len : integer); cdecl; external; -procedure XftDrawString8(draw : PXftDraw; var col : TXftColor; fnt : PXftFont; x,y : integer; txt : PChar; len : integer); cdecl; external; -procedure XftDrawString16(draw : PXftDraw; var col : TXftColor; fnt : PXftFont; x,y : integer; txt : PChar; len : integer); cdecl; external; - -procedure XftTextExtentsUtf8(display : PXDisplay; fnt : PXftFont; txt : PChar; len : integer; var extents : TXGlyphInfo); cdecl; external; -procedure XftTextExtents8(display : PXDisplay; fnt : PXftFont; txt : PChar; len : integer; var extents : TXGlyphInfo); cdecl; external; -procedure XftTextExtents16(display : PXDisplay; fnt : PXftFont; txt : PChar; len : integer; var extents : TXGlyphInfo); cdecl; external; - -//function XftGlyphExists(display : PXDisplay; fnt : PXftFont; ch : integer) : longbool; cdecl; external; - -//procedure XftDrawSetClipRectangles(draw : PXftDraw; xorigin, yorigin : integer; rect : PXRectangle; rnum : integer); cdecl; external; - -procedure XftDrawSetClip(draw : PXftDraw; rg : TRegion); cdecl; external; - -function XftListFonts(display : PXDisplay; screen : integer; params : array of const) : PFcFontSet; cdecl; external; -function XftNameUnparse(pat : PFcPattern; dest : PChar; destlen : integer) : boolean; cdecl; external; -procedure FcFontSetDestroy(fsp : PFcFontSet); cdecl; external; - -end. - diff --git a/gui/Makefile b/gui/Makefile deleted file mode 100644 index 8fbc78c3..00000000 --- a/gui/Makefile +++ /dev/null @@ -1,2014 +0,0 @@ -# -# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/08/31] -# -default: all -MAKEFILETARGETS=i386-linux -BSDs = freebsd netbsd openbsd darwin -UNIXs = linux $(BSDs) solaris qnx -LIMIT83fs = go32v2 os2 emx watcom -FORCE: -.PHONY: FORCE -override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH))) -ifneq ($(findstring darwin,$(OSTYPE)),) -inUnix=1 #darwin -SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH))) -else -ifeq ($(findstring ;,$(PATH)),) -inUnix=1 -SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH))) -else -SEARCHPATH:=$(subst ;, ,$(PATH)) -endif -endif -SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE)))) -PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH)))) -ifeq ($(PWD),) -PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH)))) -ifeq ($(PWD),) -$(error You need the GNU utils package to use this Makefile) -else -PWD:=$(firstword $(PWD)) -SRCEXEEXT= -endif -else -PWD:=$(firstword $(PWD)) -SRCEXEEXT=.exe -endif -ifndef inUnix -ifeq ($(OS),Windows_NT) -inWinNT=1 -else -ifdef OS2_SHELL -inOS2=1 -endif -endif -else -ifneq ($(findstring cygdrive,$(PATH)),) -inCygWin=1 -endif -endif -ifdef inUnix -SRCBATCHEXT=.sh -else -ifdef inOS2 -SRCBATCHEXT=.cmd -else -SRCBATCHEXT=.bat -endif -endif -ifdef inUnix -PATHSEP=/ -else -PATHSEP:=$(subst /,\,/) -ifdef inCygWin -PATHSEP=/ -endif -endif -ifdef PWD -BASEDIR:=$(subst \,/,$(shell $(PWD))) -ifdef inCygWin -ifneq ($(findstring /cygdrive/,$(BASEDIR)),) -BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR)) -BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR))) -BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR)) -endif -endif -else -BASEDIR=. -endif -ifdef inOS2 -ifndef ECHO -ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO=echo -else -ECHO:=$(firstword $(ECHO)) -endif -else -ECHO:=$(firstword $(ECHO)) -endif -endif -export ECHO -endif -override DEFAULT_FPCDIR=/opt/fpc/src -ifndef FPC -ifdef PP -FPC=$(PP) -endif -endif -ifndef FPC -FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH)))) -ifneq ($(FPCPROG),) -FPCPROG:=$(firstword $(FPCPROG)) -FPC:=$(shell $(FPCPROG) -PB) -ifneq ($(findstring Error,$(FPC)),) -override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH))))) -endif -else -override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH))))) -endif -endif -override FPC:=$(subst $(SRCEXEEXT),,$(FPC)) -override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT) -FOUNDFPC:=$(strip $(wildcard $(FPC))) -ifeq ($(FOUNDFPC),) -FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH)))) -ifeq ($(FOUNDFPC),) -$(error Compiler $(FPC) not found) -endif -endif -ifndef FPC_COMPILERINFO -FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO) -endif -ifndef FPC_VERSION -FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO)) -endif -export FPC FPC_VERSION FPC_COMPILERINFO -unexport CHECKDEPEND ALLDEPENDENCIES -ifndef CPU_TARGET -ifdef CPU_TARGET_DEFAULT -CPU_TARGET=$(CPU_TARGET_DEFAULT) -endif -endif -ifndef OS_TARGET -ifdef OS_TARGET_DEFAULT -OS_TARGET=$(OS_TARGET_DEFAULT) -endif -endif -ifneq ($(words $(FPC_COMPILERINFO)),5) -FPC_COMPILERINFO+=$(shell $(FPC) -iSP) -FPC_COMPILERINFO+=$(shell $(FPC) -iTP) -FPC_COMPILERINFO+=$(shell $(FPC) -iSO) -FPC_COMPILERINFO+=$(shell $(FPC) -iTO) -endif -ifndef CPU_SOURCE -CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO)) -endif -ifndef CPU_TARGET -CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO)) -endif -ifndef OS_SOURCE -OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO)) -endif -ifndef OS_TARGET -OS_TARGET:=$(word 5,$(FPC_COMPILERINFO)) -endif -FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET) -FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE) -ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) -TARGETSUFFIX=$(OS_TARGET) -SOURCESUFFIX=$(OS_SOURCE) -else -TARGETSUFFIX=$(FULL_TARGET) -SOURCESUFFIX=$(FULL_SOURCE) -endif -ifneq ($(FULL_TARGET),$(FULL_SOURCE)) -CROSSCOMPILE=1 -endif -ifeq ($(findstring makefile,$(MAKECMDGOALS)),) -ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),) -$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first) -endif -endif -ifneq ($(findstring $(OS_TARGET),$(BSDs)),) -BSDhier=1 -endif -ifeq ($(OS_TARGET),linux) -linuxHier=1 -endif -export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE -ifdef FPCDIR -override FPCDIR:=$(subst \,/,$(FPCDIR)) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=wrong -endif -else -override FPCDIR=wrong -endif -ifdef DEFAULT_FPCDIR -ifeq ($(FPCDIR),wrong) -override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR)) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=wrong -endif -endif -endif -ifeq ($(FPCDIR),wrong) -ifdef inUnix -override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=/usr/lib/fpc/$(FPC_VERSION) -endif -else -override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH)))))) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR:=$(BASEDIR) -ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) -override FPCDIR=c:/pp -endif -endif -endif -endif -endif -ifndef CROSSBINDIR -CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX)) -endif -ifndef BINUTILSPREFIX -ifndef CROSSBINDIR -ifdef CROSSCOMPILE -BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)- -endif -endif -endif -UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX)) -ifeq ($(UNITSDIR),) -UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET)) -endif -PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra) -override PACKAGE_NAME=fpgui -override PACKAGE_VERSION=0.2 -ifeq ($(FULL_TARGET),i386-linux) -override TARGET_UNITS+=fpgui -endif -override INSTALL_BUILDUNIT=fpgui -override INSTALL_FPCPACKAGE=y -ifeq ($(FULL_TARGET),i386-linux) -override COMPILER_OPTIONS+=-S2h -endif -ifeq ($(FULL_TARGET),i386-linux) -override COMPILER_INCLUDEDIR+=defimpl -endif -ifeq ($(FULL_TARGET),i386-linux) -override COMPILER_UNITTARGETDIR+=units -endif -ifdef REQUIRE_UNITSDIR -override UNITSDIR+=$(REQUIRE_UNITSDIR) -endif -ifdef REQUIRE_PACKAGESDIR -override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR) -endif -ifdef ZIPINSTALL -ifneq ($(findstring $(OS_TARGET),$(UNIXs)),) -UNIXHier=1 -endif -else -ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),) -UNIXHier=1 -endif -endif -ifndef INSTALL_PREFIX -ifdef PREFIX -INSTALL_PREFIX=$(PREFIX) -endif -endif -ifndef INSTALL_PREFIX -ifdef UNIXHier -INSTALL_PREFIX=/usr/local -else -ifdef INSTALL_FPCPACKAGE -INSTALL_BASEDIR:=/pp -else -INSTALL_BASEDIR:=/$(PACKAGE_NAME) -endif -endif -endif -export INSTALL_PREFIX -ifdef INSTALL_FPCSUBDIR -export INSTALL_FPCSUBDIR -endif -ifndef DIST_DESTDIR -DIST_DESTDIR:=$(BASEDIR) -endif -export DIST_DESTDIR -ifndef COMPILER_UNITTARGETDIR -ifdef PACKAGEDIR_MAIN -COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX) -else -COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX) -endif -endif -ifndef COMPILER_TARGETDIR -COMPILER_TARGETDIR=. -endif -ifndef INSTALL_BASEDIR -ifdef UNIXHier -ifdef INSTALL_FPCPACKAGE -INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION) -else -INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME) -endif -else -INSTALL_BASEDIR:=$(INSTALL_PREFIX) -endif -endif -ifndef INSTALL_BINDIR -ifdef UNIXHier -INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin -else -INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin -ifdef INSTALL_FPCPACKAGE -ifdef CROSSCOMPILE -ifdef CROSSINSTALL -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX) -else -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX) -endif -else -INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX) -endif -endif -endif -endif -ifndef INSTALL_UNITDIR -INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX) -ifdef INSTALL_FPCPACKAGE -ifdef PACKAGE_NAME -INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME) -endif -endif -endif -ifndef INSTALL_LIBDIR -ifdef UNIXHier -INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib -else -INSTALL_LIBDIR:=$(INSTALL_UNITDIR) -endif -endif -ifndef INSTALL_SOURCEDIR -ifdef UNIXHier -ifdef BSDhier -SRCPREFIXDIR=share/src -else -ifdef linuxHier -SRCPREFIXDIR=share/src -else -SRCPREFIXDIR=src -endif -endif -ifdef INSTALL_FPCPACKAGE -ifdef INSTALL_FPCSUBDIR -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME) -else -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -endif -else -INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -else -ifdef INSTALL_FPCPACKAGE -ifdef INSTALL_FPCSUBDIR -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME) -else -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME) -endif -else -INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source -endif -endif -endif -ifndef INSTALL_DOCDIR -ifdef UNIXHier -ifdef BSDhier -DOCPREFIXDIR=share/doc -else -ifdef linuxHier -DOCPREFIXDIR=share/doc -else -DOCPREFIXDIR=doc -endif -endif -ifdef INSTALL_FPCPACKAGE -INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -else -INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -else -ifdef INSTALL_FPCPACKAGE -INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME) -else -INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc -endif -endif -endif -ifndef INSTALL_EXAMPLEDIR -ifdef UNIXHier -ifdef INSTALL_FPCPACKAGE -ifdef BSDhier -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME) -else -ifdef linuxHier -INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples -else -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME) -endif -endif -else -ifdef BSDhier -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -else -ifdef linuxHier -INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -else -INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -endif -endif -endif -else -ifdef INSTALL_FPCPACKAGE -INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME) -else -INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples -endif -endif -endif -ifndef INSTALL_DATADIR -INSTALL_DATADIR=$(INSTALL_BASEDIR) -endif -ifndef INSTALL_SHAREDDIR -INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib -endif -ifdef CROSSCOMPILE -ifndef CROSSBINDIR -CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX)) -ifeq ($(CROSSBINDIR),) -CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE)) -endif -endif -else -CROSSBINDIR= -endif -ifeq ($(OS_SOURCE),linux) -ifndef GCCLIBDIR -ifeq ($(CPU_TARGET),i386) -ifneq ($(findstring x86_64,$(shell uname -a)),) -ifeq ($(BINUTILSPREFIX),) -GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`) -endif -endif -endif -ifeq ($(CPU_TARGET),powerpc64) -ifeq ($(BINUTILSPREFIX),) -GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`) -endif -endif -endif -ifndef GCCLIBDIR -CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH)))) -ifneq ($(CROSSGCC),) -GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`) -endif -endif -ifndef OTHERLIBDIR -OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }') -endif -endif -ifdef inUnix -ifeq ($(OS_SOURCE),netbsd) -OTHERLIBDIR+=/usr/pkg/lib -endif -export GCCLIBDIR OTHERLIB -endif -BATCHEXT=.bat -LOADEREXT=.as -EXEEXT=.exe -PPLEXT=.ppl -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.so -SHAREDLIBPREFIX=libfp -STATICLIBPREFIX=libp -IMPORTLIBPREFIX=libimp -RSTEXT=.rst -ifeq ($(findstring 1.0.,$(FPC_VERSION)),) -ifeq ($(OS_TARGET),go32v1) -STATICLIBPREFIX= -SHORTSUFFIX=v1 -endif -ifeq ($(OS_TARGET),go32v2) -STATICLIBPREFIX= -SHORTSUFFIX=dos -endif -ifeq ($(OS_TARGET),watcom) -STATICLIBPREFIX= -OEXT=.obj -ASMEXT=.asm -SHAREDLIBEXT=.dll -SHORTSUFFIX=wat -endif -ifeq ($(OS_TARGET),linux) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=lnx -endif -ifeq ($(OS_TARGET),freebsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=fbs -endif -ifeq ($(OS_TARGET),netbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=nbs -endif -ifeq ($(OS_TARGET),openbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=obs -endif -ifeq ($(OS_TARGET),win32) -SHAREDLIBEXT=.dll -SHORTSUFFIX=w32 -endif -ifeq ($(OS_TARGET),os2) -BATCHEXT=.cmd -AOUTEXT=.out -STATICLIBPREFIX= -SHAREDLIBEXT=.dll -SHORTSUFFIX=os2 -ECHO=echo -endif -ifeq ($(OS_TARGET),emx) -BATCHEXT=.cmd -AOUTEXT=.out -STATICLIBPREFIX= -SHAREDLIBEXT=.dll -SHORTSUFFIX=emx -ECHO=echo -endif -ifeq ($(OS_TARGET),amiga) -EXEEXT= -SHAREDLIBEXT=.library -SHORTSUFFIX=amg -endif -ifeq ($(OS_TARGET),morphos) -EXEEXT= -SHAREDLIBEXT=.library -SHORTSUFFIX=mos -endif -ifeq ($(OS_TARGET),atari) -EXEEXT=.ttp -SHORTSUFFIX=ata -endif -ifeq ($(OS_TARGET),beos) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=be -endif -ifeq ($(OS_TARGET),solaris) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=sun -endif -ifeq ($(OS_TARGET),qnx) -BATCHEXT=.sh -EXEEXT= -SHORTSUFFIX=qnx -endif -ifeq ($(OS_TARGET),netware) -EXEEXT=.nlm -STATICLIBPREFIX= -SHORTSUFFIX=nw -endif -ifeq ($(OS_TARGET),netwlibc) -EXEEXT=.nlm -STATICLIBPREFIX= -SHORTSUFFIX=nwl -endif -ifeq ($(OS_TARGET),macos) -BATCHEXT= -EXEEXT= -DEBUGSYMEXT=.xcoff -SHORTSUFFIX=mac -endif -ifeq ($(OS_TARGET),darwin) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=dwn -endif -ifeq ($(OS_TARGET),gba) -EXEEXT=.gba -SHAREDLIBEXT=.so -SHORTSUFFIX=gba -endif -else -ifeq ($(OS_TARGET),go32v1) -PPUEXT=.pp1 -OEXT=.o1 -ASMEXT=.s1 -SMARTEXT=.sl1 -STATICLIBEXT=.a1 -SHAREDLIBEXT=.so1 -STATICLIBPREFIX= -SHORTSUFFIX=v1 -endif -ifeq ($(OS_TARGET),go32v2) -STATICLIBPREFIX= -SHORTSUFFIX=dos -endif -ifeq ($(OS_TARGET),watcom) -STATICLIBPREFIX= -SHORTSUFFIX=wat -endif -ifeq ($(OS_TARGET),linux) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=lnx -endif -ifeq ($(OS_TARGET),freebsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=fbs -endif -ifeq ($(OS_TARGET),netbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=nbs -endif -ifeq ($(OS_TARGET),openbsd) -BATCHEXT=.sh -EXEEXT= -HASSHAREDLIB=1 -SHORTSUFFIX=obs -endif -ifeq ($(OS_TARGET),win32) -PPUEXT=.ppw -OEXT=.ow -ASMEXT=.sw -SMARTEXT=.slw -STATICLIBEXT=.aw -SHAREDLIBEXT=.dll -SHORTSUFFIX=w32 -endif -ifeq ($(OS_TARGET),os2) -BATCHEXT=.cmd -PPUEXT=.ppo -ASMEXT=.so2 -OEXT=.oo2 -AOUTEXT=.out -SMARTEXT=.sl2 -STATICLIBPREFIX= -STATICLIBEXT=.ao2 -SHAREDLIBEXT=.dll -SHORTSUFFIX=os2 -ECHO=echo -endif -ifeq ($(OS_TARGET),amiga) -EXEEXT= -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.library -SHORTSUFFIX=amg -endif -ifeq ($(OS_TARGET),atari) -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT=.ttp -SHORTSUFFIX=ata -endif -ifeq ($(OS_TARGET),beos) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=be -endif -ifeq ($(OS_TARGET),solaris) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=sun -endif -ifeq ($(OS_TARGET),qnx) -BATCHEXT=.sh -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -SHORTSUFFIX=qnx -endif -ifeq ($(OS_TARGET),netware) -STATICLIBPREFIX= -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.nlm -EXEEXT=.nlm -SHORTSUFFIX=nw -endif -ifeq ($(OS_TARGET),netwlibc) -STATICLIBPREFIX= -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.nlm -EXEEXT=.nlm -SHORTSUFFIX=nwl -endif -ifeq ($(OS_TARGET),macos) -BATCHEXT= -PPUEXT=.ppu -ASMEXT=.s -OEXT=.o -SMARTEXT=.sl -STATICLIBEXT=.a -EXEEXT= -DEBUGSYMEXT=.xcoff -SHORTSUFFIX=mac -endif -endif -ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) -FPCMADE=fpcmade.$(SHORTSUFFIX) -ZIPSUFFIX=$(SHORTSUFFIX) -ZIPCROSSPREFIX= -ZIPSOURCESUFFIX=src -ZIPEXAMPLESUFFIX=exm -else -FPCMADE=fpcmade.$(TARGETSUFFIX) -ZIPSOURCESUFFIX=.source -ZIPEXAMPLESUFFIX=.examples -ifdef CROSSCOMPILE -ZIPSUFFIX=.$(SOURCESUFFIX) -ZIPCROSSPREFIX=$(TARGETSUFFIX)- -else -ZIPSUFFIX=.$(TARGETSUFFIX) -ZIPCROSSPREFIX= -endif -endif -ifndef ECHO -ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO= __missing_command_ECHO -else -ECHO:=$(firstword $(ECHO)) -endif -else -ECHO:=$(firstword $(ECHO)) -endif -endif -export ECHO -ifndef DATE -DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(DATE),) -DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(DATE),) -DATE= __missing_command_DATE -else -DATE:=$(firstword $(DATE)) -endif -else -DATE:=$(firstword $(DATE)) -endif -endif -export DATE -ifndef GINSTALL -GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(GINSTALL),) -GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(GINSTALL),) -GINSTALL= __missing_command_GINSTALL -else -GINSTALL:=$(firstword $(GINSTALL)) -endif -else -GINSTALL:=$(firstword $(GINSTALL)) -endif -endif -export GINSTALL -ifndef CPPROG -CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(CPPROG),) -CPPROG= __missing_command_CPPROG -else -CPPROG:=$(firstword $(CPPROG)) -endif -endif -export CPPROG -ifndef RMPROG -RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(RMPROG),) -RMPROG= __missing_command_RMPROG -else -RMPROG:=$(firstword $(RMPROG)) -endif -endif -export RMPROG -ifndef MVPROG -MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MVPROG),) -MVPROG= __missing_command_MVPROG -else -MVPROG:=$(firstword $(MVPROG)) -endif -endif -export MVPROG -ifndef MKDIRPROG -MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MKDIRPROG),) -MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(MKDIRPROG),) -MKDIRPROG= __missing_command_MKDIRPROG -else -MKDIRPROG:=$(firstword $(MKDIRPROG)) -endif -else -MKDIRPROG:=$(firstword $(MKDIRPROG)) -endif -endif -export MKDIRPROG -ifndef ECHOREDIR -ifndef inUnix -ECHOREDIR=echo -else -ECHOREDIR=$(ECHO) -endif -endif -ifndef COPY -COPY:=$(CPPROG) -fp -endif -ifndef COPYTREE -COPYTREE:=$(CPPROG) -Rfp -endif -ifndef MKDIRTREE -MKDIRTREE:=$(MKDIRPROG) -p -endif -ifndef MOVE -MOVE:=$(MVPROG) -f -endif -ifndef DEL -DEL:=$(RMPROG) -f -endif -ifndef DELTREE -DELTREE:=$(RMPROG) -rf -endif -ifndef INSTALL -ifdef inUnix -INSTALL:=$(GINSTALL) -c -m 644 -else -INSTALL:=$(COPY) -endif -endif -ifndef INSTALLEXE -ifdef inUnix -INSTALLEXE:=$(GINSTALL) -c -m 755 -else -INSTALLEXE:=$(COPY) -endif -endif -ifndef MKDIR -MKDIR:=$(GINSTALL) -m 755 -d -endif -export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR -ifndef PPUMOVE -PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(PPUMOVE),) -PPUMOVE= __missing_command_PPUMOVE -else -PPUMOVE:=$(firstword $(PPUMOVE)) -endif -endif -export PPUMOVE -ifndef FPCMAKE -FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(FPCMAKE),) -FPCMAKE= __missing_command_FPCMAKE -else -FPCMAKE:=$(firstword $(FPCMAKE)) -endif -endif -export FPCMAKE -ifndef ZIPPROG -ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ZIPPROG),) -ZIPPROG= __missing_command_ZIPPROG -else -ZIPPROG:=$(firstword $(ZIPPROG)) -endif -endif -export ZIPPROG -ifndef TARPROG -TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(TARPROG),) -TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(TARPROG),) -TARPROG= __missing_command_TARPROG -else -TARPROG:=$(firstword $(TARPROG)) -endif -else -TARPROG:=$(firstword $(TARPROG)) -endif -endif -export TARPROG -ASNAME=$(BINUTILSPREFIX)as -LDNAME=$(BINUTILSPREFIX)ld -ARNAME=$(BINUTILSPREFIX)ar -RCNAME=$(BINUTILSPREFIX)rc -ifneq ($(findstring 1.0.,$(FPC_VERSION)),) -ifeq ($(OS_TARGET),win32) -ifeq ($(CROSSBINDIR),) -ASNAME=asw -LDNAME=ldw -ARNAME=arw -endif -endif -endif -ifndef ASPROG -ifdef CROSSBINDIR -ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT) -else -ASPROG=$(ASNAME) -endif -endif -ifndef LDPROG -ifdef CROSSBINDIR -LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT) -else -LDPROG=$(LDNAME) -endif -endif -ifndef RCPROG -ifdef CROSSBINDIR -RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT) -else -RCPROG=$(RCNAME) -endif -endif -ifndef ARPROG -ifdef CROSSBINDIR -ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT) -else -ARPROG=$(ARNAME) -endif -endif -AS=$(ASPROG) -LD=$(LDPROG) -RC=$(RCPROG) -AR=$(ARPROG) -PPAS=ppas$(SRCBATCHEXT) -ifdef inUnix -LDCONFIG=ldconfig -else -LDCONFIG= -endif -ifdef DATE -DATESTR:=$(shell $(DATE) +%Y%m%d) -else -DATESTR= -endif -ifndef UPXPROG -ifeq ($(OS_TARGET),go32v2) -UPXPROG:=1 -endif -ifeq ($(OS_TARGET),win32) -UPXPROG:=1 -endif -ifdef UPXPROG -UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(UPXPROG),) -UPXPROG= -else -UPXPROG:=$(firstword $(UPXPROG)) -endif -else -UPXPROG= -endif -endif -export UPXPROG -ZIPOPT=-9 -ZIPEXT=.zip -ifeq ($(USETAR),bz2) -TAROPT=vj -TAREXT=.tar.bz2 -else -TAROPT=vz -TAREXT=.tar.gz -endif -override REQUIRE_PACKAGES=rtl fcl fpgfx -ifeq ($(FULL_TARGET),i386-linux) -REQUIRE_PACKAGES_RTL=1 -REQUIRE_PACKAGES_HASH=1 -REQUIRE_PACKAGES_PASZLIB=1 -REQUIRE_PACKAGES_NETDB=1 -REQUIRE_PACKAGES_LIBASYNC=1 -REQUIRE_PACKAGES_PTHREADS=1 -REQUIRE_PACKAGES_FCL=1 -REQUIRE_PACKAGES_FPGFX=1 -REQUIRE_PACKAGES_PASJPEG=1 -REQUIRE_PACKAGES_IBASE=1 -REQUIRE_PACKAGES_POSTGRES=1 -REQUIRE_PACKAGES_MYSQL=1 -REQUIRE_PACKAGES_ODBC=1 -REQUIRE_PACKAGES_ORACLE=1 -REQUIRE_PACKAGES_SQLITE=1 -endif -ifdef REQUIRE_PACKAGES_RTL -PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_RTL),) -ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),) -UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX) -else -UNITDIR_RTL=$(PACKAGEDIR_RTL) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_RTL)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE) -endif -else -PACKAGEDIR_RTL= -UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_RTL),) -UNITDIR_RTL:=$(firstword $(UNITDIR_RTL)) -else -UNITDIR_RTL= -endif -endif -ifdef UNITDIR_RTL -override COMPILER_UNITDIR+=$(UNITDIR_RTL) -endif -endif -ifdef REQUIRE_PACKAGES_HASH -PACKAGEDIR_HASH:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /hash/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_HASH),) -ifneq ($(wildcard $(PACKAGEDIR_HASH)/units/$(TARGETSUFFIX)),) -UNITDIR_HASH=$(PACKAGEDIR_HASH)/units/$(TARGETSUFFIX) -else -UNITDIR_HASH=$(PACKAGEDIR_HASH) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_HASH)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_HASH) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_HASH)/$(FPCMADE) -endif -else -PACKAGEDIR_HASH= -UNITDIR_HASH:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /hash/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_HASH),) -UNITDIR_HASH:=$(firstword $(UNITDIR_HASH)) -else -UNITDIR_HASH= -endif -endif -ifdef UNITDIR_HASH -override COMPILER_UNITDIR+=$(UNITDIR_HASH) -endif -endif -ifdef REQUIRE_PACKAGES_PASZLIB -PACKAGEDIR_PASZLIB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_PASZLIB),) -ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)/units/$(TARGETSUFFIX)),) -UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)/units/$(TARGETSUFFIX) -else -UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_PASZLIB)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_PASZLIB) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_PASZLIB)/$(FPCMADE) -endif -else -PACKAGEDIR_PASZLIB= -UNITDIR_PASZLIB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_PASZLIB),) -UNITDIR_PASZLIB:=$(firstword $(UNITDIR_PASZLIB)) -else -UNITDIR_PASZLIB= -endif -endif -ifdef UNITDIR_PASZLIB -override COMPILER_UNITDIR+=$(UNITDIR_PASZLIB) -endif -endif -ifdef REQUIRE_PACKAGES_NETDB -PACKAGEDIR_NETDB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /netdb/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_NETDB),) -ifneq ($(wildcard $(PACKAGEDIR_NETDB)/units/$(TARGETSUFFIX)),) -UNITDIR_NETDB=$(PACKAGEDIR_NETDB)/units/$(TARGETSUFFIX) -else -UNITDIR_NETDB=$(PACKAGEDIR_NETDB) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_NETDB)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_NETDB) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_NETDB)/$(FPCMADE) -endif -else -PACKAGEDIR_NETDB= -UNITDIR_NETDB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /netdb/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_NETDB),) -UNITDIR_NETDB:=$(firstword $(UNITDIR_NETDB)) -else -UNITDIR_NETDB= -endif -endif -ifdef UNITDIR_NETDB -override COMPILER_UNITDIR+=$(UNITDIR_NETDB) -endif -endif -ifdef REQUIRE_PACKAGES_LIBASYNC -PACKAGEDIR_LIBASYNC:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /libasync/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_LIBASYNC),) -ifneq ($(wildcard $(PACKAGEDIR_LIBASYNC)/units/$(TARGETSUFFIX)),) -UNITDIR_LIBASYNC=$(PACKAGEDIR_LIBASYNC)/units/$(TARGETSUFFIX) -else -UNITDIR_LIBASYNC=$(PACKAGEDIR_LIBASYNC) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_LIBASYNC)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_LIBASYNC) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_LIBASYNC)/$(FPCMADE) -endif -else -PACKAGEDIR_LIBASYNC= -UNITDIR_LIBASYNC:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /libasync/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_LIBASYNC),) -UNITDIR_LIBASYNC:=$(firstword $(UNITDIR_LIBASYNC)) -else -UNITDIR_LIBASYNC= -endif -endif -ifdef UNITDIR_LIBASYNC -override COMPILER_UNITDIR+=$(UNITDIR_LIBASYNC) -endif -endif -ifdef REQUIRE_PACKAGES_PTHREADS -PACKAGEDIR_PTHREADS:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /pthreads/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_PTHREADS),) -ifneq ($(wildcard $(PACKAGEDIR_PTHREADS)/units/$(TARGETSUFFIX)),) -UNITDIR_PTHREADS=$(PACKAGEDIR_PTHREADS)/units/$(TARGETSUFFIX) -else -UNITDIR_PTHREADS=$(PACKAGEDIR_PTHREADS) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_PTHREADS)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_PTHREADS) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_PTHREADS)/$(FPCMADE) -endif -else -PACKAGEDIR_PTHREADS= -UNITDIR_PTHREADS:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /pthreads/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_PTHREADS),) -UNITDIR_PTHREADS:=$(firstword $(UNITDIR_PTHREADS)) -else -UNITDIR_PTHREADS= -endif -endif -ifdef UNITDIR_PTHREADS -override COMPILER_UNITDIR+=$(UNITDIR_PTHREADS) -endif -endif -ifdef REQUIRE_PACKAGES_FCL -PACKAGEDIR_FCL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_FCL),) -ifneq ($(wildcard $(PACKAGEDIR_FCL)/units/$(TARGETSUFFIX)),) -UNITDIR_FCL=$(PACKAGEDIR_FCL)/units/$(TARGETSUFFIX) -else -UNITDIR_FCL=$(PACKAGEDIR_FCL) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_FCL)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_FCL) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL)/$(FPCMADE) -endif -else -PACKAGEDIR_FCL= -UNITDIR_FCL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_FCL),) -UNITDIR_FCL:=$(firstword $(UNITDIR_FCL)) -else -UNITDIR_FCL= -endif -endif -ifdef UNITDIR_FCL -override COMPILER_UNITDIR+=$(UNITDIR_FCL) -endif -endif -ifdef REQUIRE_PACKAGES_FPGFX -PACKAGEDIR_FPGFX:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fpgfx/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_FPGFX),) -ifneq ($(wildcard $(PACKAGEDIR_FPGFX)/units/$(TARGETSUFFIX)),) -UNITDIR_FPGFX=$(PACKAGEDIR_FPGFX)/units/$(TARGETSUFFIX) -else -UNITDIR_FPGFX=$(PACKAGEDIR_FPGFX) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_FPGFX)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_FPGFX) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_FPGFX)/$(FPCMADE) -endif -else -PACKAGEDIR_FPGFX= -UNITDIR_FPGFX:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fpgfx/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_FPGFX),) -UNITDIR_FPGFX:=$(firstword $(UNITDIR_FPGFX)) -else -UNITDIR_FPGFX= -endif -endif -ifdef UNITDIR_FPGFX -override COMPILER_UNITDIR+=$(UNITDIR_FPGFX) -endif -endif -ifdef REQUIRE_PACKAGES_PASJPEG -PACKAGEDIR_PASJPEG:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /pasjpeg/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_PASJPEG),) -ifneq ($(wildcard $(PACKAGEDIR_PASJPEG)/units/$(TARGETSUFFIX)),) -UNITDIR_PASJPEG=$(PACKAGEDIR_PASJPEG)/units/$(TARGETSUFFIX) -else -UNITDIR_PASJPEG=$(PACKAGEDIR_PASJPEG) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_PASJPEG)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_PASJPEG) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_PASJPEG)/$(FPCMADE) -endif -else -PACKAGEDIR_PASJPEG= -UNITDIR_PASJPEG:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /pasjpeg/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_PASJPEG),) -UNITDIR_PASJPEG:=$(firstword $(UNITDIR_PASJPEG)) -else -UNITDIR_PASJPEG= -endif -endif -ifdef UNITDIR_PASJPEG -override COMPILER_UNITDIR+=$(UNITDIR_PASJPEG) -endif -endif -ifdef REQUIRE_PACKAGES_IBASE -PACKAGEDIR_IBASE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /ibase/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_IBASE),) -ifneq ($(wildcard $(PACKAGEDIR_IBASE)/units/$(TARGETSUFFIX)),) -UNITDIR_IBASE=$(PACKAGEDIR_IBASE)/units/$(TARGETSUFFIX) -else -UNITDIR_IBASE=$(PACKAGEDIR_IBASE) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_IBASE)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_IBASE) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_IBASE)/$(FPCMADE) -endif -else -PACKAGEDIR_IBASE= -UNITDIR_IBASE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /ibase/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_IBASE),) -UNITDIR_IBASE:=$(firstword $(UNITDIR_IBASE)) -else -UNITDIR_IBASE= -endif -endif -ifdef UNITDIR_IBASE -override COMPILER_UNITDIR+=$(UNITDIR_IBASE) -endif -endif -ifdef REQUIRE_PACKAGES_POSTGRES -PACKAGEDIR_POSTGRES:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /postgres/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_POSTGRES),) -ifneq ($(wildcard $(PACKAGEDIR_POSTGRES)/units/$(TARGETSUFFIX)),) -UNITDIR_POSTGRES=$(PACKAGEDIR_POSTGRES)/units/$(TARGETSUFFIX) -else -UNITDIR_POSTGRES=$(PACKAGEDIR_POSTGRES) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_POSTGRES)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_POSTGRES) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_POSTGRES)/$(FPCMADE) -endif -else -PACKAGEDIR_POSTGRES= -UNITDIR_POSTGRES:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /postgres/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_POSTGRES),) -UNITDIR_POSTGRES:=$(firstword $(UNITDIR_POSTGRES)) -else -UNITDIR_POSTGRES= -endif -endif -ifdef UNITDIR_POSTGRES -override COMPILER_UNITDIR+=$(UNITDIR_POSTGRES) -endif -endif -ifdef REQUIRE_PACKAGES_MYSQL -PACKAGEDIR_MYSQL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /mysql/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_MYSQL),) -ifneq ($(wildcard $(PACKAGEDIR_MYSQL)/units/$(TARGETSUFFIX)),) -UNITDIR_MYSQL=$(PACKAGEDIR_MYSQL)/units/$(TARGETSUFFIX) -else -UNITDIR_MYSQL=$(PACKAGEDIR_MYSQL) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_MYSQL)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_MYSQL) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_MYSQL)/$(FPCMADE) -endif -else -PACKAGEDIR_MYSQL= -UNITDIR_MYSQL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /mysql/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_MYSQL),) -UNITDIR_MYSQL:=$(firstword $(UNITDIR_MYSQL)) -else -UNITDIR_MYSQL= -endif -endif -ifdef UNITDIR_MYSQL -override COMPILER_UNITDIR+=$(UNITDIR_MYSQL) -endif -endif -ifdef REQUIRE_PACKAGES_ODBC -PACKAGEDIR_ODBC:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /odbc/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_ODBC),) -ifneq ($(wildcard $(PACKAGEDIR_ODBC)/units/$(TARGETSUFFIX)),) -UNITDIR_ODBC=$(PACKAGEDIR_ODBC)/units/$(TARGETSUFFIX) -else -UNITDIR_ODBC=$(PACKAGEDIR_ODBC) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_ODBC)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_ODBC) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_ODBC)/$(FPCMADE) -endif -else -PACKAGEDIR_ODBC= -UNITDIR_ODBC:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /odbc/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_ODBC),) -UNITDIR_ODBC:=$(firstword $(UNITDIR_ODBC)) -else -UNITDIR_ODBC= -endif -endif -ifdef UNITDIR_ODBC -override COMPILER_UNITDIR+=$(UNITDIR_ODBC) -endif -endif -ifdef REQUIRE_PACKAGES_ORACLE -PACKAGEDIR_ORACLE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /oracle/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_ORACLE),) -ifneq ($(wildcard $(PACKAGEDIR_ORACLE)/units/$(TARGETSUFFIX)),) -UNITDIR_ORACLE=$(PACKAGEDIR_ORACLE)/units/$(TARGETSUFFIX) -else -UNITDIR_ORACLE=$(PACKAGEDIR_ORACLE) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_ORACLE)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_ORACLE) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_ORACLE)/$(FPCMADE) -endif -else -PACKAGEDIR_ORACLE= -UNITDIR_ORACLE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /oracle/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_ORACLE),) -UNITDIR_ORACLE:=$(firstword $(UNITDIR_ORACLE)) -else -UNITDIR_ORACLE= -endif -endif -ifdef UNITDIR_ORACLE -override COMPILER_UNITDIR+=$(UNITDIR_ORACLE) -endif -endif -ifdef REQUIRE_PACKAGES_SQLITE -PACKAGEDIR_SQLITE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /sqlite/Makefile.fpc,$(PACKAGESDIR)))))) -ifneq ($(PACKAGEDIR_SQLITE),) -ifneq ($(wildcard $(PACKAGEDIR_SQLITE)/units/$(TARGETSUFFIX)),) -UNITDIR_SQLITE=$(PACKAGEDIR_SQLITE)/units/$(TARGETSUFFIX) -else -UNITDIR_SQLITE=$(PACKAGEDIR_SQLITE) -endif -ifdef CHECKDEPEND -$(PACKAGEDIR_SQLITE)/$(FPCMADE): - $(MAKE) -C $(PACKAGEDIR_SQLITE) $(FPCMADE) -override ALLDEPENDENCIES+=$(PACKAGEDIR_SQLITE)/$(FPCMADE) -endif -else -PACKAGEDIR_SQLITE= -UNITDIR_SQLITE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /sqlite/Package.fpc,$(UNITSDIR))))) -ifneq ($(UNITDIR_SQLITE),) -UNITDIR_SQLITE:=$(firstword $(UNITDIR_SQLITE)) -else -UNITDIR_SQLITE= -endif -endif -ifdef UNITDIR_SQLITE -override COMPILER_UNITDIR+=$(UNITDIR_SQLITE) -endif -endif -ifndef NOCPUDEF -override FPCOPTDEF=$(CPU_TARGET) -endif -ifneq ($(OS_TARGET),$(OS_SOURCE)) -override FPCOPT+=-T$(OS_TARGET) -endif -ifneq ($(CPU_TARGET),$(CPU_SOURCE)) -override FPCOPT+=-P$(CPU_TARGET) -endif -ifeq ($(OS_SOURCE),openbsd) -override FPCOPT+=-FD$(NEW_BINUTILS_PATH) -endif -ifndef CROSSBOOTSTRAP -ifneq ($(BINUTILSPREFIX),) -override FPCOPT+=-XP$(BINUTILSPREFIX) -Xc -endif -ifneq ($(BINUTILSPREFIX),) -override FPCOPT+=-Xr$(RLINKPATH) -endif -endif -ifdef UNITDIR -override FPCOPT+=$(addprefix -Fu,$(UNITDIR)) -endif -ifdef LIBDIR -override FPCOPT+=$(addprefix -Fl,$(LIBDIR)) -endif -ifdef OBJDIR -override FPCOPT+=$(addprefix -Fo,$(OBJDIR)) -endif -ifdef INCDIR -override FPCOPT+=$(addprefix -Fi,$(INCDIR)) -endif -ifdef LINKSMART -override FPCOPT+=-XX -endif -ifdef CREATESMART -override FPCOPT+=-CX -endif -ifdef DEBUG -override FPCOPT+=-gl -override FPCOPTDEF+=DEBUG -endif -ifdef RELEASE -ifneq ($(findstring 2.0.,$(FPC_VERSION)),) -ifeq ($(CPU_TARGET),i386) -FPCCPUOPT:=-OG2p3 -endif -ifeq ($(CPU_TARGET),powerpc) -FPCCPUOPT:=-O1r -endif -else -FPCCPUOPT:=-O1r -endif -override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n -override FPCOPTDEF+=RELEASE -endif -ifdef STRIP -override FPCOPT+=-Xs -endif -ifdef OPTIMIZE -override FPCOPT+=-O2 -endif -ifdef VERBOSE -override FPCOPT+=-vwni -endif -ifdef COMPILER_OPTIONS -override FPCOPT+=$(COMPILER_OPTIONS) -endif -ifdef COMPILER_UNITDIR -override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR)) -endif -ifdef COMPILER_LIBRARYDIR -override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR)) -endif -ifdef COMPILER_OBJECTDIR -override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR)) -endif -ifdef COMPILER_INCLUDEDIR -override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR)) -endif -ifdef CROSSBINDIR -override FPCOPT+=-FD$(CROSSBINDIR) -endif -ifdef COMPILER_TARGETDIR -override FPCOPT+=-FE$(COMPILER_TARGETDIR) -ifeq ($(COMPILER_TARGETDIR),.) -override TARGETDIRPREFIX= -else -override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/ -endif -endif -ifdef COMPILER_UNITTARGETDIR -override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR) -ifeq ($(COMPILER_UNITTARGETDIR),.) -override UNITTARGETDIRPREFIX= -else -override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/ -endif -else -ifdef COMPILER_TARGETDIR -override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR) -override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX) -endif -endif -ifdef CREATESHARED -override FPCOPT+=-Cg -ifeq ($(CPU_TARGET),i386) -override FPCOPT+=-Aas -endif -endif -ifdef LINKSHARED -endif -ifdef GCCLIBDIR -override FPCOPT+=-Fl$(GCCLIBDIR) -endif -ifdef OTHERLIBDIR -override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR)) -endif -ifdef OPT -override FPCOPT+=$(OPT) -endif -ifdef FPCOPTDEF -override FPCOPT+=$(addprefix -d,$(FPCOPTDEF)) -endif -ifdef CFGFILE -override FPCOPT+=@$(CFGFILE) -endif -ifdef USEENV -override FPCEXTCMD:=$(FPCOPT) -override FPCOPT:=!FPCEXTCMD -export FPCEXTCMD -endif -override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET) -override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE) -ifneq ($(AFULL_TARGET),$(AFULL_SOURCE)) -override ACROSSCOMPILE=1 -endif -ifdef ACROSSCOMPILE -override FPCOPT+=$(CROSSOPT) -endif -override COMPILER:=$(FPC) $(FPCOPT) -ifeq (,$(findstring -s ,$(COMPILER))) -EXECPPAS= -else -ifeq ($(FULL_SOURCE),$(FULL_TARGET)) -EXECPPAS:=@$(PPAS) -endif -endif -.PHONY: fpc_units -ifneq ($(TARGET_UNITS),) -override ALLTARGET+=fpc_units -override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS)) -override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS)) -override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES) -override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES) -endif -fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES) -ifdef TARGET_RSTS -override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS)) -override CLEANRSTFILES+=$(RSTFILES) -endif -.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared -$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET) - @$(ECHOREDIR) Compiled > $(FPCMADE) -fpc_all: $(FPCMADE) -fpc_smart: - $(MAKE) all LINKSMART=1 CREATESMART=1 -fpc_debug: - $(MAKE) all DEBUG=1 -fpc_release: - $(MAKE) all RELEASE=1 -.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res -$(COMPILER_UNITTARGETDIR): - $(MKDIRTREE) $(COMPILER_UNITTARGETDIR) -$(COMPILER_TARGETDIR): - $(MKDIRTREE) $(COMPILER_TARGETDIR) -%$(PPUEXT): %.pp - $(COMPILER) $< - $(EXECPPAS) -%$(PPUEXT): %.pas - $(COMPILER) $< - $(EXECPPAS) -%$(EXEEXT): %.pp - $(COMPILER) $< - $(EXECPPAS) -%$(EXEEXT): %.pas - $(COMPILER) $< - $(EXECPPAS) -%$(EXEEXT): %.lpr - $(COMPILER) $< - $(EXECPPAS) -%$(EXEEXT): %.dpr - $(COMPILER) $< - $(EXECPPAS) -%.res: %.rc - windres -i $< -o $@ -vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR) -vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR) -vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR) -vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR) -vpath %$(OEXT) $(COMPILER_UNITTARGETDIR) -vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR) -.PHONY: fpc_shared -override INSTALLTARGET+=fpc_shared_install -ifndef SHARED_LIBVERSION -SHARED_LIBVERSION=$(FPC_VERSION) -endif -ifndef SHARED_LIBNAME -SHARED_LIBNAME=$(PACKAGE_NAME) -endif -ifndef SHARED_FULLNAME -SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT) -endif -ifndef SHARED_LIBUNITS -SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS) -override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS)) -endif -fpc_shared: -ifdef HASSHAREDLIB - $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1 -ifneq ($(SHARED_BUILD),n) - $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR) -endif -else - @$(ECHO) Shared Libraries not supported -endif -fpc_shared_install: -ifneq ($(SHARED_BUILD),n) -ifneq ($(SHARED_LIBUNITS),) -ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),) - $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR) -endif -endif -endif -.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall -ifdef INSTALL_UNITS -override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS)) -endif -ifdef INSTALL_BUILDUNIT -override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES)) -endif -ifdef INSTALLPPUFILES -override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) -ifneq ($(UNITTARGETDIRPREFIX),) -override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES))) -override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES)))) -endif -override INSTALL_CREATEPACKAGEFPC=1 -endif -ifdef INSTALLEXEFILES -ifneq ($(TARGETDIRPREFIX),) -override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES))) -endif -endif -fpc_install: all $(INSTALLTARGET) -ifdef INSTALLEXEFILES - $(MKDIR) $(INSTALL_BINDIR) -ifdef UPXPROG - -$(UPXPROG) $(INSTALLEXEFILES) -endif - $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR) -endif -ifdef INSTALL_CREATEPACKAGEFPC -ifdef FPCMAKE -ifdef PACKAGE_VERSION -ifneq ($(wildcard Makefile.fpc),) - $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc - $(MKDIR) $(INSTALL_UNITDIR) - $(INSTALL) Package.fpc $(INSTALL_UNITDIR) -endif -endif -endif -endif -ifdef INSTALLPPUFILES - $(MKDIR) $(INSTALL_UNITDIR) - $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR) -ifneq ($(INSTALLPPULINKFILES),) - $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR) -endif -ifneq ($(wildcard $(LIB_FULLNAME)),) - $(MKDIR) $(INSTALL_LIBDIR) - $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR) -ifdef inUnix - ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME) -endif -endif -endif -ifdef INSTALL_FILES - $(MKDIR) $(INSTALL_DATADIR) - $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR) -endif -fpc_sourceinstall: distclean - $(MKDIR) $(INSTALL_SOURCEDIR) - $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR) -fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS)) -ifdef HASEXAMPLES - $(MKDIR) $(INSTALL_EXAMPLEDIR) -endif -ifdef EXAMPLESOURCEFILES - $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR) -endif -ifdef TARGET_EXAMPLEDIRS - $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR) -endif -.PHONY: fpc_distinstall -fpc_distinstall: install exampleinstall -.PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall -ifndef PACKDIR -ifndef inUnix -PACKDIR=$(BASEDIR)/../fpc-pack -else -PACKDIR=/tmp/fpc-pack -endif -endif -ifndef ZIPNAME -ifdef DIST_ZIPNAME -ZIPNAME=$(DIST_ZIPNAME) -else -ZIPNAME=$(PACKAGE_NAME) -endif -endif -ifndef FULLZIPNAME -FULLZIPNAME=$(ZIPCROSSPREFIX)$(ZIPPREFIX)$(ZIPNAME)$(ZIPSUFFIX) -endif -ifndef ZIPTARGET -ifdef DIST_ZIPTARGET -ZIPTARGET=DIST_ZIPTARGET -else -ZIPTARGET=install -endif -endif -ifndef USEZIP -ifdef inUnix -USETAR=1 -endif -endif -ifndef inUnix -USEZIPWRAPPER=1 -endif -ifdef USEZIPWRAPPER -ZIPPATHSEP=$(PATHSEP) -ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(SRCBATCHEXT)) -else -ZIPPATHSEP=/ -endif -ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR)) -ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR)) -ifdef USETAR -ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(TAREXT) -ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) * -else -ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(ZIPEXT) -ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) * -endif -fpc_zipinstall: - $(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1 - $(MKDIR) $(DIST_DESTDIR) - $(DEL) $(ZIPDESTFILE) -ifdef USEZIPWRAPPER -ifneq ($(ECHOREDIR),echo) - $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPER) - $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER) - $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRAPPER) -else - echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER) - echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER) - echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER) -endif -ifdef inUnix - /bin/sh $(ZIPWRAPPER) -else - $(ZIPWRAPPER) -endif - $(DEL) $(ZIPWRAPPER) -else - $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE) -endif - $(DELTREE) $(PACKDIR) -fpc_zipsourceinstall: - $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=$(ZIPSOURCESUFFIX) -fpc_zipexampleinstall: -ifdef HASEXAMPLES - $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=$(ZIPEXAMPLESUFFIX) -endif -fpc_zipdistinstall: - $(MAKE) fpc_zipinstall ZIPTARGET=distinstall -.PHONY: fpc_clean fpc_cleanall fpc_distclean -ifdef EXEFILES -override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES)) -endif -ifdef CLEAN_UNITS -override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS)) -endif -ifdef CLEANPPUFILES -override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) -ifdef DEBUGSYMEXT -override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES)) -endif -override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES)) -override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))) -endif -fpc_clean: $(CLEANTARGET) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif -ifdef CLEANPPUFILES - -$(DEL) $(CLEANPPUFILES) -endif -ifneq ($(CLEANPPULINKFILES),) - -$(DEL) $(CLEANPPULINKFILES) -endif -ifdef CLEANRSTFILES - -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES)) -endif -ifdef CLEAN_FILES - -$(DEL) $(CLEAN_FILES) -endif -ifdef LIB_NAME - -$(DEL) $(LIB_NAME) $(LIB_FULLNAME) -endif - -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE) - -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT) -fpc_cleanall: $(CLEANTARGET) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif -ifdef COMPILER_UNITTARGETDIR -ifdef CLEANPPUFILES - -$(DEL) $(CLEANPPUFILES) -endif -ifneq ($(CLEANPPULINKFILES),) - -$(DEL) $(CLEANPPULINKFILES) -endif -ifdef CLEANRSTFILES - -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES)) -endif -endif - -$(DELTREE) units - -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT) -ifneq ($(PPUEXT),.ppu) - -$(DEL) *.o *.ppu *.a -endif - -$(DELTREE) *$(SMARTEXT) - -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE) - -$(DEL) *_ppas$(BATCHEXT) -ifdef AOUTEXT - -$(DEL) *$(AOUTEXT) -endif -ifdef DEBUGSYMEXT - -$(DEL) *$(DEBUGSYMEXT) -endif -fpc_distclean: cleanall -.PHONY: fpc_baseinfo -override INFORULES+=fpc_baseinfo -fpc_baseinfo: - @$(ECHO) - @$(ECHO) == Package info == - @$(ECHO) Package Name..... $(PACKAGE_NAME) - @$(ECHO) Package Version.. $(PACKAGE_VERSION) - @$(ECHO) - @$(ECHO) == Configuration info == - @$(ECHO) - @$(ECHO) FPC.......... $(FPC) - @$(ECHO) FPC Version.. $(FPC_VERSION) - @$(ECHO) Source CPU... $(CPU_SOURCE) - @$(ECHO) Target CPU... $(CPU_TARGET) - @$(ECHO) Source OS.... $(OS_SOURCE) - @$(ECHO) Target OS.... $(OS_TARGET) - @$(ECHO) Full Source.. $(FULL_SOURCE) - @$(ECHO) Full Target.. $(FULL_TARGET) - @$(ECHO) SourceSuffix. $(SOURCESUFFIX) - @$(ECHO) TargetSuffix. $(TARGETSUFFIX) - @$(ECHO) - @$(ECHO) == Directory info == - @$(ECHO) - @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES) - @$(ECHO) - @$(ECHO) Basedir......... $(BASEDIR) - @$(ECHO) FPCDir.......... $(FPCDIR) - @$(ECHO) CrossBinDir..... $(CROSSBINDIR) - @$(ECHO) UnitsDir........ $(UNITSDIR) - @$(ECHO) PackagesDir..... $(PACKAGESDIR) - @$(ECHO) - @$(ECHO) GCC library..... $(GCCLIBDIR) - @$(ECHO) Other library... $(OTHERLIBDIR) - @$(ECHO) - @$(ECHO) == Tools info == - @$(ECHO) - @$(ECHO) As........ $(AS) - @$(ECHO) Ld........ $(LD) - @$(ECHO) Ar........ $(AR) - @$(ECHO) Rc........ $(RC) - @$(ECHO) - @$(ECHO) Mv........ $(MVPROG) - @$(ECHO) Cp........ $(CPPROG) - @$(ECHO) Rm........ $(RMPROG) - @$(ECHO) GInstall.. $(GINSTALL) - @$(ECHO) Echo...... $(ECHO) - @$(ECHO) Shell..... $(SHELL) - @$(ECHO) Date...... $(DATE) - @$(ECHO) FPCMake... $(FPCMAKE) - @$(ECHO) PPUMove... $(PPUMOVE) - @$(ECHO) Upx....... $(UPXPROG) - @$(ECHO) Zip....... $(ZIPPROG) - @$(ECHO) - @$(ECHO) == Object info == - @$(ECHO) - @$(ECHO) Target Loaders........ $(TARGET_LOADERS) - @$(ECHO) Target Units.......... $(TARGET_UNITS) - @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS) - @$(ECHO) Target Programs....... $(TARGET_PROGRAMS) - @$(ECHO) Target Dirs........... $(TARGET_DIRS) - @$(ECHO) Target Examples....... $(TARGET_EXAMPLES) - @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS) - @$(ECHO) - @$(ECHO) Clean Units......... $(CLEAN_UNITS) - @$(ECHO) Clean Files......... $(CLEAN_FILES) - @$(ECHO) - @$(ECHO) Install Units....... $(INSTALL_UNITS) - @$(ECHO) Install Files....... $(INSTALL_FILES) - @$(ECHO) - @$(ECHO) == Install info == - @$(ECHO) - @$(ECHO) DateStr.............. $(DATESTR) - @$(ECHO) ZipName.............. $(ZIPNAME) - @$(ECHO) ZipPrefix............ $(ZIPPREFIX) - @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX) - @$(ECHO) ZipSuffix............ $(ZIPSUFFIX) - @$(ECHO) FullZipName.......... $(FULLZIPNAME) - @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE) - @$(ECHO) - @$(ECHO) Install base dir..... $(INSTALL_BASEDIR) - @$(ECHO) Install binary dir... $(INSTALL_BINDIR) - @$(ECHO) Install library dir.. $(INSTALL_LIBDIR) - @$(ECHO) Install units dir.... $(INSTALL_UNITDIR) - @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR) - @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR) - @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR) - @$(ECHO) Install data dir..... $(INSTALL_DATADIR) - @$(ECHO) - @$(ECHO) Dist destination dir. $(DIST_DESTDIR) - @$(ECHO) Dist zip name........ $(DIST_ZIPNAME) - @$(ECHO) -.PHONY: fpc_info -fpc_info: $(INFORULES) -.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \ - fpc_makefile_dirs -fpc_makefile: - $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc -fpc_makefile_sub1: -ifdef TARGET_DIRS - $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS)) -endif -ifdef TARGET_EXAMPLEDIRS - $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS)) -endif -fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS)) -fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2 -fpc_makefiles: fpc_makefile fpc_makefile_dirs -all: fpc_all -debug: fpc_debug -smart: fpc_smart -release: fpc_release -units: fpc_units -examples: -shared: fpc_shared -install: fpc_install -sourceinstall: fpc_sourceinstall -exampleinstall: fpc_exampleinstall -distinstall: fpc_distinstall -zipinstall: fpc_zipinstall -zipsourceinstall: fpc_zipsourceinstall -zipexampleinstall: fpc_zipexampleinstall -zipdistinstall: fpc_zipdistinstall -clean: fpc_clean -distclean: fpc_distclean -cleanall: fpc_cleanall -info: fpc_info -makefiles: fpc_makefiles -.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles -ifneq ($(wildcard fpcmake.loc),) -include fpcmake.loc -endif -fpgui$(PPUEXT): $(wildcard *.pp *.inc) diff --git a/gui/Makefile.fpc b/gui/Makefile.fpc deleted file mode 100644 index c3c7f032..00000000 --- a/gui/Makefile.fpc +++ /dev/null @@ -1,41 +0,0 @@ -# -# Makefile.fpc for fpGUI -# - -[package] -name=fpgui -version=0.3 - -[require] -packages=fcl fpgfx - -[target] -units=fpgui stylemanager -#dirs=db - -#[dirs] -#incdir=defimpl -#incdir_win32=win32 - -[compiler] -unittargetdir=units -#targetdir=. -options=-S2h -includedir_linux=defimpl -includedir_freebsd=defimpl -includedir_netbsd=defimpl -includedir_win32=win32 - -[install] -#buildunit=fpgui -fpcpackage=y - -[default] -fpcdir=/opt/fpc/src - -[rules] -fpgui$(PPUEXT): $(wildcard *.pas *.inc) - -[libs] -libname=libfpgui.so -libversion=0.3 diff --git a/gui/db/Makefile b/gui/db/Makefile deleted file mode 100644 index 5485f240..00000000 --- a/gui/db/Makefile +++ /dev/null @@ -1,1373 +0,0 @@ -# -# Makefile generated by fpcmake v1.00 [2000/12/25] -# - -defaultrule: all - -##################################################################### -# Autodetect OS (Linux or Dos or Windows NT or OS/2) -# define inUnix when running under Unix (Linux,FreeBSD) -# define inWinNT when running under WinNT -# define inOS2 when running under OS/2 -##################################################################### - -# We need only / in the path -override PATH:=$(subst \,/,$(PATH)) - -# Search for PWD and determine also if we are under linux -PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH))))) -ifeq ($(PWD),) -PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH))))) -ifeq ($(PWD),) -nopwd: - @echo You need the GNU utils package to use this Makefile! - @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip - @exit -else -inUnix=1 -PWD:=$(firstword $(PWD)) -endif -else -PWD:=$(firstword $(PWD)) -endif - -# Detect NT - NT sets OS to Windows_NT -# Detect OS/2 - OS/2 has OS2_SHELL defined -ifndef inUnix -ifeq ($(OS),Windows_NT) -inWinNT=1 -else -ifdef OS2_SHELL -inOS2=1 -endif -endif -endif - -# The extension of executables -ifdef inUnix -SRCEXEEXT= -else -SRCEXEEXT=.exe -endif - -# The extension of batch files / scripts -ifdef inUnix -BATCHEXT=.sh -else -ifdef inOS2 -BATCHEXT=.cmd -else -BATCHEXT=.bat -endif -endif - -# Path Separator, the subst trick is necessary for the \ that can't exists -# at the end of a line -ifdef inUnix -PATHSEP=/ -else -PATHSEP=$(subst /,\,/) -endif - -# The path which is searched separated by spaces -ifdef inUnix -SEARCHPATH=$(subst :, ,$(PATH)) -else -SEARCHPATH=$(subst ;, ,$(PATH)) -endif - -# Base dir -ifdef PWD -BASEDIR:=$(shell $(PWD)) -else -BASEDIR=. -endif - -##################################################################### -# FPC version/target Detection -##################################################################### - -# What compiler to use ? -ifndef FPC -# Compatibility with old makefiles -ifdef PP -FPC=$(PP) -else -FPC=ppc386 -endif -endif -override FPC:=$(subst $(SRCEXEEXT),,$(FPC)) -override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT) - -# Target OS -ifndef OS_TARGET -OS_TARGET:=$(shell $(FPC) -iTO) -endif - -# Source OS -ifndef OS_SOURCE -OS_SOURCE:=$(shell $(FPC) -iSO) -endif - -# Target CPU -ifndef CPU_TARGET -CPU_TARGET:=$(shell $(FPC) -iTP) -endif - -# Source CPU -ifndef CPU_SOURCE -CPU_SOURCE:=$(shell $(FPC) -iSP) -endif - -# FPC version -ifndef FPC_VERSION -FPC_VERSION:=$(shell $(FPC) -iV) -endif - -export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION - -##################################################################### -# FPCDIR Setting -##################################################################### - -# Test FPCDIR to look if the RTL dir exists -ifdef FPCDIR -override FPCDIR:=$(subst \,/,$(FPCDIR)) -ifeq ($(wildcard $(FPCDIR)/rtl),) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=wrong -endif -endif -else -override FPCDIR=wrong -endif - -# Default FPCDIR -ifeq ($(FPCDIR),wrong) -override FPCDIR=../../../.. -ifeq ($(wildcard $(FPCDIR)/rtl),) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=wrong -endif -endif -endif - -# Detect FPCDIR -ifeq ($(FPCDIR),wrong) -ifdef inUnix -override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=/usr/lib/fpc/$(FPC_VERSION) -endif -else -override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH)))))) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(FPCDIR)/rtl),) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(FPCDIR)/rtl),) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=c:/pp -endif -endif -endif -endif -endif -endif - -ifndef PACKAGESDIR -PACKAGESDIR=$(FPCDIR)/packages -endif -ifndef TOOLKITSDIR -TOOLKITSDIR= -endif -ifndef COMPONENTSDIR -COMPONENTSDIR= -endif - -# Create units dir -ifneq ($(FPCDIR),.) -UNITSDIR=$(FPCDIR)/units/$(OS_TARGET) -endif - -##################################################################### -# User Settings -##################################################################### - - -# Targets - -override UNITOBJECTS+=fpgui_db - -# Clean - - -# Install - -ZIPTARGET=install - -# Defaults - -override NEEDOPT=-S2h - -# Directories - -override NEEDUNITDIR=.. - -# Packages - -override PACKAGES+=rtl fcl fpgfx fpgui - -# Libraries - - -# Info - -INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall - -##################################################################### -# Shell tools -##################################################################### - -# echo -ifndef ECHO -ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=echo -ECHOE:=echo -else -ECHO:=$(firstword $(ECHO)) -ECHOE=$(ECHO) -E -endif -else -ECHO:=$(firstword $(ECHO)) -ECHOE=$(ECHO) -E -endif -endif - -# To copy pograms -ifndef COPY -COPY:=cp -fp -endif - -# Copy a whole tree -ifndef COPYTREE -COPYTREE:=cp -rfp -endif - -# To move pograms -ifndef MOVE -MOVE:=mv -f -endif - -# Check delete program -ifndef DEL -DEL:=rm -f -endif - -# Check deltree program -ifndef DELTREE -DELTREE:=rm -rf -endif - -# To install files -ifndef INSTALL -ifdef inUnix -INSTALL:=install -c -m 644 -else -INSTALL:=$(COPY) -endif -endif - -# To install programs -ifndef INSTALLEXE -ifdef inUnix -INSTALLEXE:=install -c -m 755 -else -INSTALLEXE:=$(COPY) -endif -endif - -# To make a directory. -ifndef MKDIR -ifdef inUnix -MKDIR:=install -m 755 -d -else -MKDIR:=ginstall -m 755 -d -endif -endif - -export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR - -##################################################################### -# Default Tools -##################################################################### - -# assembler, redefine it if cross compiling -ifndef AS -AS=as -endif - -# linker, but probably not used -ifndef LD -LD=ld -endif - -# ppas.bat / ppas.sh -PPAS=ppas$(BATCHEXT) - -# ldconfig to rebuild .so cache -ifdef inUnix -LDCONFIG=ldconfig -else -LDCONFIG= -endif - -# ppumove -ifndef PPUMOVE -PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(PPUMOVE),) -PPUMOVE= -else -PPUMOVE:=$(firstword $(PPUMOVE)) -endif -endif -export PPUMOVE - -# ppufiles -ifndef PPUFILES -PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(PPUFILES),) -PPUFILES= -else -PPUFILES:=$(firstword $(PPUFILES)) -endif -endif -export PPUFILES - -# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase -# upx uses that one itself (PFV) -ifndef UPXPROG -ifeq ($(OS_TARGET),go32v2) -UPXPROG:=1 -endif -ifeq ($(OS_TARGET),win32) -UPXPROG:=1 -endif -ifdef UPXPROG -UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(UPXPROG),) -UPXPROG= -else -UPXPROG:=$(firstword $(UPXPROG)) -endif -else -UPXPROG= -endif -endif -export UPXPROG - -# ZipProg, you can't use Zip as the var name (PFV) -ifndef ZIPPROG -ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ZIPPROG),) -ZIPPROG= -else -ZIPPROG:=$(firstword $(ZIPPROG)) -endif -endif -export ZIPPROG - -ZIPOPT=-9 -ZIPEXT=.zip - -# Tar -ifndef TARPROG -TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(TARPROG),) -TARPROG= -else -TARPROG:=$(firstword $(TARPROG)) -endif -endif -export TARPROG - -ifeq ($(USETAR),bz2) -TAROPT=vI -TAREXT=.tar.bz2 -else -TAROPT=vz -TAREXT=.tar.gz -endif - -##################################################################### -# Default extensions -##################################################################### - -# Default needed extensions (Go32v2,Linux) -LOADEREXT=.as -EXEEXT=.exe -PPLEXT=.ppl -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.so -RSTEXT=.rst -FPCMADE=fpcmade - -# Go32v1 -ifeq ($(OS_TARGET),go32v1) -PPUEXT=.pp1 -OEXT=.o1 -ASMEXT=.s1 -SMARTEXT=.sl1 -STATICLIBEXT=.a1 -SHAREDLIBEXT=.so1 -FPCMADE=fpcmade.v1 -endif - -# Go32v2 -ifeq ($(OS_TARGET),go32v2) -FPCMADE=fpcmade.dos -endif - -# Linux -ifeq ($(OS_TARGET),linux) -EXEEXT= -HASSHAREDLIB=1 -FPCMADE=fpcmade.lnx -endif - -# Linux -ifeq ($(OS_TARGET),freebsd) -EXEEXT= -HASSHAREDLIB=1 -FPCMADE=fpcmade.freebsd -endif - -# Win32 -ifeq ($(OS_TARGET),win32) -PPUEXT=.ppw -OEXT=.ow -ASMEXT=.sw -SMARTEXT=.slw -STATICLIBEXT=.aw -SHAREDLIBEXT=.dll -FPCMADE=fpcmade.w32 -endif - -# OS/2 -ifeq ($(OS_TARGET),os2) -PPUEXT=.ppo -ASMEXT=.so2 -OEXT=.oo2 -SMARTEXT=.so -STATICLIBEXT=.ao2 -SHAREDLIBEXT=.dll -FPCMADE=fpcmade.os2 -endif - -# library prefix -LIBPREFIX=lib -ifeq ($(OS_TARGET),go32v2) -LIBPREFIX= -endif -ifeq ($(OS_TARGET),go32v1) -LIBPREFIX= -endif - -# determine which .pas extension is used -ifndef PASEXT -ifdef EXEOBJECTS -override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS))))) -else -override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS))))) -endif -ifeq ($(TESTPAS),) -PASEXT=.pp -else -PASEXT=.pas -endif -endif - - -# Check if the dirs really exists, else turn it off -ifeq ($(wildcard $(UNITSDIR)),) -UNITSDIR= -endif -ifeq ($(wildcard $(TOOLKITSDIR)),) -TOOLKITSDIR= -endif -ifeq ($(wildcard $(PACKAGESDIR)),) -PACKAGESDIR= -endif -ifeq ($(wildcard $(COMPONENTSDIR)),) -COMPONENTSDIR= -endif - - -# PACKAGESDIR packages - -PACKAGERTL=1 -PACKAGEFCL=1 -PACKAGEFPGFX=1 -PACKAGEFPGUI=1 - -ifdef PACKAGERTL -ifneq ($(wildcard $(FPCDIR)/rtl),) -ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),) -PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET) -else -PACKAGEDIR_RTL=$(FPCDIR)/rtl -endif -ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),) -override COMPILEPACKAGES+=package_rtl -package_rtl: - $(MAKE) -C $(PACKAGEDIR_RTL) all -endif -UNITDIR_RTL=$(PACKAGEDIR_RTL) -else -PACKAGEDIR_RTL= -ifneq ($(wildcard $(UNITSDIR)/rtl),) -ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),) -UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET) -else -UNITDIR_RTL=$(UNITSDIR)/rtl -endif -else -UNITDIR_RTL= -endif -endif -ifdef UNITDIR_RTL -override NEEDUNITDIR+=$(UNITDIR_RTL) -endif -endif -ifdef PACKAGEFCL -ifneq ($(wildcard $(FPCDIR)/fcl),) -ifneq ($(wildcard $(FPCDIR)/fcl/$(OS_TARGET)),) -PACKAGEDIR_FCL=$(FPCDIR)/fcl/$(OS_TARGET) -else -PACKAGEDIR_FCL=$(FPCDIR)/fcl -endif -ifeq ($(wildcard $(PACKAGEDIR_FCL)/$(FPCMADE)),) -override COMPILEPACKAGES+=package_fcl -package_fcl: - $(MAKE) -C $(PACKAGEDIR_FCL) all -endif -UNITDIR_FCL=$(PACKAGEDIR_FCL) -else -PACKAGEDIR_FCL= -ifneq ($(wildcard $(UNITSDIR)/fcl),) -ifneq ($(wildcard $(UNITSDIR)/fcl/$(OS_TARGET)),) -UNITDIR_FCL=$(UNITSDIR)/fcl/$(OS_TARGET) -else -UNITDIR_FCL=$(UNITSDIR)/fcl -endif -else -UNITDIR_FCL= -endif -endif -ifdef UNITDIR_FCL -override NEEDUNITDIR+=$(UNITDIR_FCL) -endif -endif -ifdef PACKAGEFPGFX -ifneq ($(wildcard $(PACKAGESDIR)/fpgfx),) -ifneq ($(wildcard $(PACKAGESDIR)/fpgfx/$(OS_TARGET)),) -PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx/$(OS_TARGET) -else -PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx -endif -ifeq ($(wildcard $(PACKAGEDIR_FPGFX)/$(FPCMADE)),) -override COMPILEPACKAGES+=package_fpgfx -package_fpgfx: - $(MAKE) -C $(PACKAGEDIR_FPGFX) all -endif -UNITDIR_FPGFX=$(PACKAGEDIR_FPGFX) -else -PACKAGEDIR_FPGFX= -ifneq ($(wildcard $(UNITSDIR)/fpgfx),) -ifneq ($(wildcard $(UNITSDIR)/fpgfx/$(OS_TARGET)),) -UNITDIR_FPGFX=$(UNITSDIR)/fpgfx/$(OS_TARGET) -else -UNITDIR_FPGFX=$(UNITSDIR)/fpgfx -endif -else -UNITDIR_FPGFX= -endif -endif -ifdef UNITDIR_FPGFX -override NEEDUNITDIR+=$(UNITDIR_FPGFX) -endif -endif -ifdef PACKAGEFPGUI -ifneq ($(wildcard $(PACKAGESDIR)/fpgui),) -ifneq ($(wildcard $(PACKAGESDIR)/fpgui/$(OS_TARGET)),) -PACKAGEDIR_FPGUI=$(PACKAGESDIR)/fpgui/$(OS_TARGET) -else -PACKAGEDIR_FPGUI=$(PACKAGESDIR)/fpgui -endif -ifeq ($(wildcard $(PACKAGEDIR_FPGUI)/$(FPCMADE)),) -override COMPILEPACKAGES+=package_fpgui -package_fpgui: - $(MAKE) -C $(PACKAGEDIR_FPGUI) all -endif -UNITDIR_FPGUI=$(PACKAGEDIR_FPGUI) -else -PACKAGEDIR_FPGUI= -ifneq ($(wildcard $(UNITSDIR)/fpgui),) -ifneq ($(wildcard $(UNITSDIR)/fpgui/$(OS_TARGET)),) -UNITDIR_FPGUI=$(UNITSDIR)/fpgui/$(OS_TARGET) -else -UNITDIR_FPGUI=$(UNITSDIR)/fpgui -endif -else -UNITDIR_FPGUI= -endif -endif -ifdef UNITDIR_FPGUI -override NEEDUNITDIR+=$(UNITDIR_FPGUI) -endif -endif - - -##################################################################### -# Default Directories -##################################################################### - -# Linux and freebsd use unix dirs with /usr/bin, /usr/lib -# When zipping use the target as default, when normal install then -# use the source os as default -ifdef ZIPNAME -# Zipinstall -ifeq ($(OS_TARGET),linux) -UNIXINSTALLDIR=1 -endif -ifeq ($(OS_TARGET),freebsd) -UNIXINSTALLDIR=1 -endif -else -# Normal install -ifeq ($(OS_SOURCE),linux) -UNIXINSTALLDIR=1 -endif -ifeq ($(OS_SOURCE),freebsd) -UNIXINSTALLDIR=1 -endif -endif - -# set the prefix directory where to install everything -ifndef PREFIXINSTALLDIR -ifdef UNIXINSTALLDIR -PREFIXINSTALLDIR=/usr -else -PREFIXINSTALLDIR=/pp -endif -endif -export PREFIXINSTALLDIR - -# Where to place the resulting zip files -ifndef DESTZIPDIR -DESTZIPDIR:=$(BASEDIR) -endif -export DESTZIPDIR - -##################################################################### -# Install Directories -##################################################################### - -# set the base directory where to install everything -ifndef BASEINSTALLDIR -ifdef UNIXINSTALLDIR -BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION) -else -BASEINSTALLDIR=$(PREFIXINSTALLDIR) -endif -endif - -# set the directory where to install the binaries -ifndef BININSTALLDIR -ifdef UNIXINSTALLDIR -BININSTALLDIR=$(PREFIXINSTALLDIR)/bin -else -BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET) -endif -endif - -# set the directory where to install the units. -ifndef UNITINSTALLDIR -UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET) -ifdef UNITSUBDIR -UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR) -endif -endif - -# Where to install shared libraries -ifndef LIBINSTALLDIR -ifdef UNIXINSTALLDIR -LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib -else -LIBINSTALLDIR=$(UNITINSTALLDIR) -endif -endif - -# Where the source files will be stored -ifndef SOURCEINSTALLDIR -ifdef UNIXINSTALLDIR -SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION) -else -SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source -endif -ifdef SOURCESUBDIR -SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR) -endif -endif - -# Where the doc files will be stored -ifndef DOCINSTALLDIR -ifdef UNIXINSTALLDIR -DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION) -else -DOCINSTALLDIR=$(BASEINSTALLDIR)/doc -endif -endif - -# Where to install the examples, under linux we use the doc dir -# because the copytree command will create a subdir itself -ifndef EXAMPLEINSTALLDIR -ifdef UNIXINSTALLDIR -EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples -else -EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples -endif -ifdef EXAMPLESUBDIR -EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR) -endif -endif - -# Where the some extra (data)files will be stored -ifndef DATAINSTALLDIR -DATAINSTALLDIR=$(BASEINSTALLDIR) -endif - -##################################################################### -# Redirection -##################################################################### - -ifndef REDIRFILE -REDIRFILE=log -endif - -ifdef REDIR -ifndef inUnix -override FPC=redir -eo $(FPC) -endif -# set the verbosity to max -override FPCOPT+=-va -override REDIR:= >> $(REDIRFILE) -endif - - -##################################################################### -# Compiler Command Line -##################################################################### - -# Load commandline OPTDEF and add FPC_CPU define -override FPCOPTDEF:=-d$(CPU_TARGET) - -# Load commandline OPT and add target and unit dir to be sure -ifneq ($(OS_TARGET),$(OS_SOURCE)) -override FPCOPT+=-T$(OS_TARGET) -endif - -# User dirs should be first, so they are looked at first -ifdef UNITDIR -override FPCOPT+=$(addprefix -Fu,$(UNITDIR)) -endif -ifdef LIBDIR -override FPCOPT+=$(addprefix -Fl,$(LIBDIR)) -endif -ifdef OBJDIR -override FPCOPT+=$(addprefix -Fo,$(OBJDIR)) -endif -ifdef INCDIR -override FPCOPT+=$(addprefix -Fi,$(INCDIR)) -endif - -# Smartlinking -ifdef LINKSMART -override FPCOPT+=-XX -endif - -# Smartlinking creation -ifdef CREATESMART -override FPCOPT+=-CX -endif - -# Debug -ifdef DEBUG -override FPCOPT+=-gl -dDEBUG -endif - -# Release mode (strip, optimize and don't load ppc386.cfg) -# 0.99.12b has a bug in the optimizer so don't use it by default -ifdef RELEASE -ifeq ($(FPC_VERSION),0.99.12) -override FPCOPT+=-Xs -OGp3 -n -else -override FPCOPT+=-Xs -OG2p3 -n -endif -endif - -# Strip -ifdef STRIP -override FPCOPT+=-Xs -endif - -# Optimizer -ifdef OPTIMIZE -override FPCOPT+=-OG2p3 -endif - -# Verbose settings (warning,note,info) -ifdef VERBOSE -override FPCOPT+=-vwni -endif - -ifdef NEEDOPT -override FPCOPT+=$(NEEDOPT) -endif - -ifdef NEEDUNITDIR -override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR)) -endif - -ifdef UNITSDIR -override FPCOPT+=-Fu$(UNITSDIR) -endif - -# Target dirs and the prefix to use for clean/install -ifdef TARGETDIR -override FPCOPT+=-FE$(TARGETDIR) -ifeq ($(TARGETDIR),.) -override TARGETDIRPREFIX= -else -override TARGETDIRPREFIX=$(TARGETDIR)/ -endif -endif -ifdef UNITTARGETDIR -override FPCOPT+=-FU$(UNITTARGETDIR) -ifeq ($(UNITTARGETDIR),.) -override UNITTARGETDIRPREFIX= -else -override UNITTARGETDIRPREFIX=$(TARGETDIR)/ -endif -else -ifdef TARGETDIR -override UNITTARGETDIR=$(TARGETDIR) -override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX) -endif -endif - -# Add commandline options last so they can override -ifdef OPT -override FPCOPT+=$(OPT) -endif - -# Add defines from FPCOPTDEF to FPCOPT -ifdef FPCOPTDEF -override FPCOPT+=$(FPCOPTDEF) -endif - -# Error file ? -ifdef ERRORFILE -override FPCOPT+=-Fr$(ERRORFILE) -endif - -# Was a config file specified ? -ifdef CFGFILE -override FPCOPT+=@$(CFGFILE) -endif - -# For win32 the options are passed using the environment FPCEXTCMD -ifeq ($(OS_SOURCE),win32) -override FPCEXTCMD:=$(FPCOPT) -override FPCOPT:=!FPCEXTCMD -export FPCEXTCMD -endif - -# Compiler commandline -override COMPILER:=$(FPC) $(FPCOPT) - -# also call ppas if with command option -s -# but only if the OS_SOURCE and OS_TARGE are equal -ifeq (,$(findstring -s ,$(COMPILER))) -EXECPPAS= -else -ifeq ($(OS_SOURCE),$(OS_TARGET)) -EXECPPAS:=@$(PPAS) -endif -endif - -##################################################################### -# Standard rules -##################################################################### - -all: fpc_all - -debug: fpc_debug - -smart: fpc_smart - -shared: fpc_shared - -showinstall: fpc_showinstall - -install: fpc_install - -sourceinstall: fpc_sourceinstall - -exampleinstall: fpc_exampleinstall - -zipinstall: fpc_zipinstall - -zipsourceinstall: fpc_zipsourceinstall - -zipexampleinstall: fpc_zipexampleinstall - -clean: fpc_clean - -distclean: fpc_distclean - -cleanall: fpc_cleanall - -info: fpc_info - -.PHONY: all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info - -##################################################################### -# Units -##################################################################### - -.PHONY: fpc_units - -override ALLTARGET+=fpc_units - -override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS)) -override INSTALLPPUFILES+=$(UNITPPUFILES) -override CLEANPPUFILES+=$(UNITPPUFILES) - -fpc_units: $(UNITPPUFILES) - -##################################################################### -# General compile rules -##################################################################### - -.PHONY: fpc_packages fpc_all fpc_debug - -$(FPCMADE): $(ALLTARGET) - @$(ECHO) Compiled > $(FPCMADE) - -fpc_packages: $(COMPILEPACKAGES) - -fpc_all: fpc_packages $(FPCMADE) - -fpc_debug: - $(MAKE) all DEBUG=1 - -# Search paths for .ppu if targetdir is set -ifdef UNITTARGETDIR -vpath %$(PPUEXT) $(UNITTARGETDIR) -endif - -# General compile rules, available for both possible PASEXT - -.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp - -%$(PPUEXT): %.pp - $(COMPILER) $< $(REDIR) - $(EXECPPAS) - -%$(PPUEXT): %.pas - $(COMPILER) $< $(REDIR) - $(EXECPPAS) - -%$(EXEEXT): %.pp - $(COMPILER) $< $(REDIR) - $(EXECPPAS) - -%$(EXEEXT): %.pas - $(COMPILER) $< $(REDIR) - $(EXECPPAS) - -##################################################################### -# Library -##################################################################### - -.PHONY: fpc_smart fpc_shared - -ifdef LIBVERSION -LIBFULLNAME=$(LIBNAME).$(LIBVERSION) -else -LIBFULLNAME=$(LIBNAME) -endif - -# Default sharedlib units are all unit objects -ifndef SHAREDLIBUNITOBJECTS -SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS) -endif - -fpc_smart: - $(MAKE) all LINKSMART=1 CREATESMART=1 - -fpc_shared: all -ifdef HASSHAREDLIB -ifndef LIBNAME - @$(ECHO) "LIBNAME not set" -else - $(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME) -endif -else - @$(ECHO) "Shared Libraries not supported" -endif - -##################################################################### -# Install rules -##################################################################### - -.PHONY: fpc_showinstall fpc_install - -ifdef EXTRAINSTALLUNITS -override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS)) -endif - -ifdef INSTALLPPUFILES -override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES)) -ifdef PPUFILES -INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)) -else -INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))) -endif -override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES)) -endif - -ifdef INSTALLEXEFILES -override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES)) -endif - -fpc_showinstall: $(SHOWINSTALLTARGET) -ifdef INSTALLEXEFILES - @$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES)) -endif -ifdef INSTALLPPUFILES - @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES)) -ifneq ($(INSTALLPPULINKFILES),) - @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES)) -endif -ifneq ($(wildcard $(LIBFULLNAME)),) - @$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME) -ifdef HASSHAREDLIB - @$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME) -endif -endif -endif -ifdef EXTRAINSTALLFILES - @$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES)) -endif - -fpc_install: $(INSTALLTARGET) -# Create UnitInstallFiles -ifdef INSTALLEXEFILES - $(MKDIR) $(BININSTALLDIR) -# Compress the exes if upx is defined -ifdef UPXPROG - -$(UPXPROG) $(INSTALLEXEFILES) -endif - $(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR) -endif -ifdef INSTALLPPUFILES - $(MKDIR) $(UNITINSTALLDIR) - $(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR) -ifneq ($(INSTALLPPULINKFILES),) - $(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR) -endif -ifneq ($(wildcard $(LIBFULLNAME)),) - $(MKDIR) $(LIBINSTALLDIR) - $(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR) -ifdef inUnix - ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME) -endif -endif -endif -ifdef EXTRAINSTALLFILES - $(MKDIR) $(DATAINSTALLDIR) - $(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR) -endif - -##################################################################### -# SourceInstall rules -##################################################################### - -.PHONY: fpc_sourceinstall - -ifndef SOURCETOPDIR -SOURCETOPDIR=$(BASEDIR) -endif - -fpc_sourceinstall: clean - $(MKDIR) $(SOURCEINSTALLDIR) - $(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR) - -##################################################################### -# exampleinstall rules -##################################################################### - -.PHONY: fpc_exampleinstall - -fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS)) -ifdef EXAMPLESOURCEFILES - $(MKDIR) $(EXAMPLEINSTALLDIR) - $(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR) -endif -ifdef EXAMPLEDIROBJECTS -ifndef EXAMPLESOURCEFILES - $(MKDIR) $(EXAMPLEINSTALLDIR) -endif - $(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR) -endif - -##################################################################### -# Zip -##################################################################### - -.PHONY: fpc_zipinstall - -# Create suffix to add -ifndef PACKAGESUFFIX -PACKAGESUFFIX=$(OS_TARGET) -ifeq ($(OS_TARGET),go32v2) -PACKAGESUFFIX=go32 -endif -ifeq ($(OS_TARGET),win32) -PACKAGESUFFIX=w32 -endif -ifeq ($(OS_TARGET),os2) -PACKAGESUFFIX=emx -endif -endif - -# Temporary path to pack a file -ifndef PACKDIR -ifndef inUnix -PACKDIR=$(BASEDIR)/pack_tmp -else -PACKDIR=/tmp/fpc-pack -endif -endif - -# Maybe create default zipname from packagename -ifndef ZIPNAME -ifdef PACKAGENAME -ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX) -endif -endif - -# Use tar by default under linux -ifndef USEZIP -ifdef inUnix -USETAR=1 -endif -endif - -# Use a wrapper script by default for OS/2 -ifdef inOS2 -USEZIPWRAPPER=1 -endif - -# Create commands to create the zip/tar file -ZIPWRAPPER=$(DESTZIPDIR)/fpczip$(BATCHEXT) -ZIPCMD_CDPACK:=cd $(subst /,$(PATHSEP),$(PACKDIR)) -ZIPCMD_CDBASE:=cd $(subst /,$(PATHSEP),$(BASEDIR)) -ifdef USETAR -ZIPDESTFILE:=$(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) -ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) * -else -ZIPDESTFILE:=$(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) -ZIPCMD_ZIP:=$(subst /,$(PATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) * -endif - -fpc_zipinstall: -ifndef ZIPNAME - @$(ECHO) "Please specify ZIPNAME!" - @exit 1 -else - $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR) - $(DEL) $(ZIPDESTFILE) -ifdef USEZIPWRAPPER -ifneq ($(ECHO),echo) - $(ECHO) "$(ZIPCMD_CDPACK)" > $(ZIPWRAPPER) - $(ECHO) "$(ZIPCMD_ZIP)" >> $(ZIPWRAPPER) - $(ECHO) "$(ZIPCMD_CDBASE)" >> $(ZIPWRAPPER) -else - $(ECHO) $(ZIPCMD_CDPACK) > $(ZIPWRAPPER) - $(ECHO) $(ZIPCMD_ZIP) >> $(ZIPWRAPPER) - $(ECHO) $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER) -endif -ifdef inUnix - /bin/sh $(ZIPWRAPPER) -else - $(ZIPWRAPPER) -endif - $(DEL) $(ZIPWRAPPER) -else - $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE) -endif - $(DELTREE) $(PACKDIR) -endif - -.PHONY: fpc_zipsourceinstall - -fpc_zipsourceinstall: - $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src - -.PHONY: fpc_zipexampleinstall - -fpc_zipexampleinstall: - $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm - -##################################################################### -# Clean rules -##################################################################### - -.PHONY: fpc_clean fpc_cleanall fpc_distclean - -ifdef EXEFILES -override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES)) -endif - -ifdef EXTRACLEANUNITS -override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS)) -endif - -ifdef CLEANPPUFILES -override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES)) -# Get the .o and .a files created for the units -ifdef PPUFILES -CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES)) -else -CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))) -endif -override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)) -endif - -fpc_clean: $(CLEANTARGET) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif -ifdef CLEANPPUFILES - -$(DEL) $(CLEANPPUFILES) -endif -ifneq ($(CLEANPPULINKFILES),) - -$(DEL) $(CLEANPPULINKFILES) -endif -ifdef CLEANRSTFILES - -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES)) -endif -ifdef EXTRACLEANFILES - -$(DEL) $(EXTRACLEANFILES) -endif -ifdef LIBNAME - -$(DEL) $(LIBNAME) $(LIBFULLNAME) -endif - -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE) - -fpc_distclean: fpc_clean - -# Also run clean first if targetdir is set. Unittargetdir is always -# set if targetdir or unittargetdir is specified -ifdef UNITTARGETDIR -TARGETDIRCLEAN=fpc_clean -endif - -fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif - -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT) - -$(DELTREE) *$(SMARTEXT) - -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE) - -##################################################################### -# Info rules -##################################################################### - -.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \ - fpc_dirinfo - -fpc_info: $(INFOTARGET) - -fpc_infocfg: - @$(ECHO) - @$(ECHO) == Configuration info == - @$(ECHO) - @$(ECHO) FPC....... $(FPC) - @$(ECHO) Version... $(FPC_VERSION) - @$(ECHO) CPU....... $(CPU_TARGET) - @$(ECHO) Source.... $(OS_SOURCE) - @$(ECHO) Target.... $(OS_TARGET) - @$(ECHO) - -fpc_infoobjects: - @$(ECHO) - @$(ECHO) == Object info == - @$(ECHO) - @$(ECHO) LoaderObjects..... $(LOADEROBJECTS) - @$(ECHO) UnitObjects....... $(UNITOBJECTS) - @$(ECHO) ExeObjects........ $(EXEOBJECTS) - @$(ECHO) - @$(ECHO) ExtraCleanUnits... $(EXTRACLEANUNITS) - @$(ECHO) ExtraCleanFiles... $(EXTRACLEANFILES) - @$(ECHO) - @$(ECHO) ExtraInstallUnits. $(EXTRAINSTALLUNITS) - @$(ECHO) ExtraInstallFiles. $(EXTRAINSTALLFILES) - @$(ECHO) - -fpc_infoinstall: - @$(ECHO) - @$(ECHO) == Install info == - @$(ECHO) -ifdef DATE - @$(ECHO) DateStr.............. $(DATESTR) -endif -ifdef PACKAGEPREFIX - @$(ECHO) PackagePrefix........ $(PACKAGEPREFIX) -endif -ifdef PACKAGENAME - @$(ECHO) PackageName.......... $(PACKAGENAME) -endif - @$(ECHO) PackageSuffix........ $(PACKAGESUFFIX) - @$(ECHO) - @$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR) - @$(ECHO) BinInstallDir........ $(BININSTALLDIR) - @$(ECHO) LibInstallDir........ $(LIBINSTALLDIR) - @$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR) - @$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR) - @$(ECHO) DocInstallDir........ $(DOCINSTALLDIR) - @$(ECHO) DataInstallDir....... $(DATAINSTALLDIR) - @$(ECHO) - @$(ECHO) DestZipDir........... $(DESTZIPDIR) - @$(ECHO) ZipName.............. $(ZIPNAME) - @$(ECHO) - -##################################################################### -# Local Makefile -##################################################################### - -ifneq ($(wildcard fpcmake.loc),) -include fpcmake.loc -endif - diff --git a/gui/db/Makefile.fpc b/gui/db/Makefile.fpc deleted file mode 100644 index 144acce4..00000000 --- a/gui/db/Makefile.fpc +++ /dev/null @@ -1,20 +0,0 @@ -# -# Makefile.fpc for fpGUI database support -# - -[targets] -units=fpgui_db - -[require] -options=-S2h -packages=fcl fpgfx fpgui - -#[libs] -#libname=fpgui - -[install] -subdir= - -[dirs] -fpcdir=../../../.. -unitdir=.. diff --git a/gui/db/fpgui_db.pas b/gui/db/fpgui_db.pas deleted file mode 100644 index 0f4f03f9..00000000 --- a/gui/db/fpgui_db.pas +++ /dev/null @@ -1,299 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Database support classes - - Copyright (C) 2000 - 2007 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. -} - -unit fpGUI_DB; - -{$IFDEF Debug} - {$ASSERTIONS On} -{$ENDIF} - -interface - -uses - Classes - ,fpGUI - ,DB - ; - -type - - { TFieldDataLink } - - TFieldDataLink = class(TDataLink) - private - FWidget: TFWidget; - FField: TField; - FFieldName: string; - FOnDataChange: TNotifyEvent; - function GetCanModify: Boolean; - procedure SetFieldName(const AFieldName: string); - procedure UpdateField; - protected - procedure ActiveChanged; override; - procedure RecordChanged(AField: TField); override; - public - constructor Create(AWidget: TFWidget); - property CanModify: Boolean read GetCanModify; - property Field: TField read FField; - property FieldName: string read FFieldName write SetFieldName; - property Widget: TFWidget read FWidget write FWidget; - property OnDataChange: TNotifyEvent read FOnDataChange write FOnDataChange; - end; - - - { TDBText } - - TDBText = class(TFCustomLabel) - private - FDataLink: TFieldDataLink; - function GetDataField: String; - function GetField: TField; - procedure SetDataField(const ADataField: String); - function GetDataSource: TDataSource; - procedure SetDataSource(ADataSource: TDataSource); - procedure DataChange(Sender: TObject); - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property Field: TField read GetField; - published - property Alignment default taLeftJustify; - property CanExpandWidth; - property DataField: string read GetDataField write SetDataField; - property DataSource: TDataSource read GetDataSource write SetDataSource; - property Enabled; - property FontColor; - property Text; - end; - - - { TDBEdit } - - TDBEdit = class(TFCustomEdit) - private - FDataLink: TFieldDataLink; - function GetDataField: string; - function GetDataSource: TDataSource; - function GetField: TField; - function GetReadOnly: Boolean; - procedure SetDataField(const ADataField: string); - procedure SetDataSource(const ADataSource: TDataSource); - procedure DataChange(Sender: TObject); - procedure SetReadOnly(const AValue: Boolean); - protected - procedure EvKeyPressed(Key: Word; Shift: TShiftState); override; - procedure EvKeyChar(KeyChar: Char); override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property Field: TField read GetField; - published - property BorderStyle; - property CanExpandWidth; - property DataField: string read GetDataField write SetDataField; - property DataSource: TDataSource read GetDataSource write SetDataSource; - property Enabled; - property FontColor; - property Text; - property ReadOnly: Boolean read GetReadOnly write SetReadOnly default False; - end; - - -implementation - - -{ TFieldDataLink } - -constructor TFieldDataLink.Create(AWidget: TFWidget); -begin - inherited Create; - FWidget := AWidget; -end; - -procedure TFieldDataLink.ActiveChanged; -begin - UpdateField; -end; - -procedure TFieldDataLink.RecordChanged(AField: TField); -begin - if Assigned(OnDataChange) then - OnDataChange(Self); -end; - -procedure TFieldDataLink.SetFieldName(const AFieldName: string); -begin - if AFieldName <> FieldName then - begin - FFieldName := AFieldName; - UpdateField; - end; -end; - -function TFieldDataLink.GetCanModify: Boolean; -begin - Result := not ReadOnly and (Field <> nil) and Field.CanModify; -end; - -procedure TFieldDataLink.UpdateField; -begin - {$IFDEF DEBUG} WriteLn('## UpdateField. DataSet: ', DataSource.DataSet.ClassName); {$ENDIF} - FField := DataSource.DataSet.FindField(FieldName); - if Assigned(OnDataChange) then - OnDataChange(Self); -end; - - -{ TDBText } - -constructor TDBText.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FDataLink := TFieldDataLink.Create(Self); - FDataLink.OnDataChange := @DataChange; -end; - -destructor TDBText.Destroy; -begin - FDataLink.Free; - inherited Destroy; -end; - -function TDBText.GetDataField: String; -begin - Result := FDataLink.FieldName; -end; - -function TDBText.GetField: TField; -begin - Result := FDataLink.Field; -end; - -procedure TDBText.SetDataField(const ADataField: String); -begin - FDataLink.FieldName := ADataField; -end; - -function TDBText.GetDataSource: TDataSource; -begin - Result := FDataLink.DataSource; -end; - -procedure TDBText.SetDataSource(ADataSource: TDataSource); -begin - FDataLink.DataSource := ADataSource; -end; - -procedure TDBText.DataChange(Sender: TObject); -begin - {$IFDEF DEBUG} Write(Classname + '.DataChange'); {$ENDIF} - if Assigned(FDataLink.Field) then - begin - Text := FDataLink.Field.DisplayText; - {$IFDEF DEBUG} WriteLn(' new text: "', Text, '"'); {$ENDIF} - end - else - begin - Text := ''; - {$IFDEF DEBUG} WriteLn('DataLink has no data'); {$ENDIF} - end; -end; - - -{ TDBEdit } - -function TDBEdit.GetDataField: string; -begin - Result := FDataLink.FieldName; -end; - -function TDBEdit.GetDataSource: TDataSource; -begin - Result := FDataLink.DataSource; -end; - -function TDBEdit.GetField: TField; -begin - Result := FDataLink.Field; -end; - -function TDBEdit.GetReadOnly: Boolean; -begin - Result := inherited ReadOnly; -// Result := FDataLink.ReadOnly; { will add this in later } -end; - -procedure TDBEdit.SetDataField(const ADataField: string); -begin - FDataLink.FieldName := ADataField; -end; - -procedure TDBEdit.SetDataSource(const ADataSource: TDataSource); -begin - FDataLink.DataSource := ADataSource; -end; - -procedure TDBEdit.DataChange(Sender: TObject); -begin - {$IFDEF DEBUG} Write(Classname + '.DataChange'); {$ENDIF} - if Assigned(FDataLink.Field) then - begin - Text := FDataLink.Field.DisplayText; - {$IFDEF DEBUG} WriteLn(' new text: "', Text, '"'); {$ENDIF} - end - else - begin - Text := ''; - {$IFDEF DEBUG} WriteLn('DataLink has no data'); {$ENDIF} - end; -end; - -procedure TDBEdit.SetReadOnly(const AValue: Boolean); -begin - inherited ReadOnly := AValue; -// FDataLink.ReadOnly := AValue; { will add this in later } -end; - -procedure TDBEdit.EvKeyPressed(Key: Word; Shift: TShiftState); -begin -// if ReadOnly then -// Exit; //==> - inherited EvKeyPressed(Key, Shift); -end; - -procedure TDBEdit.EvKeyChar(KeyChar: Char); -begin - if ReadOnly then - Exit; //==> - inherited EvKeyChar(KeyChar); -end; - -constructor TDBEdit.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - inherited ReadOnly := True; - FDataLink := TFieldDataLink.Create(Self); - FDataLink.OnDataChange := @DataChange; -end; - -destructor TDBEdit.Destroy; -begin - FDataLink.Free; - inherited Destroy; -end; - -end. - diff --git a/gui/defimpl/defstyle.inc b/gui/defimpl/defstyle.inc deleted file mode 100644 index 26dd6512..00000000 --- a/gui/defimpl/defstyle.inc +++ /dev/null @@ -1,60 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Basic Style class declarations - - Copyright (C) 2006 - 2007 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. -} - -{$IFNDEF Has_DefaultStyle_GetGUIColor} - -function TBasicStyle.GetGUIColor(Color: TColor): TGfxColor; -begin - case Color of - // UI element colors - clScrollBar: Result := GetUIColor(clSilver); - clMenu: Result := GetUIColor(clSilver); - clWindow: Result := GetUIColor(clWhite); - clMenuText: Result := GetUIColor(clBlack); - clWindowText: Result := GetUIColor(clBlack); - clAppWorkSpace: Result := GetUIColor(clGray); - clHighlight: Result := GetUIColor(clNavy); - clHighlightText: Result := GetUIColor(clWhite); - cl3DFace: Result := GetUIColor(clSilver); - cl3DShadow: Result := GetUIColor(clGray); - clGrayText: Result := GetUIColor(clGray); - clBtnText: Result := GetUIColor(clBlack); - cl3DHighlight: Result := GetUIColor(clWhite); - cl3DDkShadow: Result := GetUIColor(clBlack); - cl3DLight: Result := rgbaDkWhite; - clInfoText: Result := GetUIColor(clBlack); - clInfoBk: Result := GetUIColor(clLightYellow); - - else Result := GetUIColor(clWhite); - end; -end; - -{$ENDIF} - - -{$IFNDEF Has_DefaultStyle_DrawFocusRect} - -procedure TBasicStyle.DrawFocusRect(Canvas: TFCanvas; const ARect: TRect); -begin - Canvas.SetColor(GetUIColor(cl3DDkShadow)); - Canvas.SetLineStyle(lsDot); - Canvas.DrawRect(ARect); - Canvas.SetLineStyle(lsSolid); -end; - -{$ENDIF} - - diff --git a/gui/fpgui.pas b/gui/fpgui.pas deleted file mode 100644 index 0a39bf42..00000000 --- a/gui/fpgui.pas +++ /dev/null @@ -1,363 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - fpGUI master file - - Copyright (C) 2006 - 2007 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: - It is fully object-oriented; its main goal is to provide its services - independent of any operating system or graphics environment. All painting - is done using fpGFX, while fpGUI provides a comfortable widget set and - other high-level classes. -} - - -unit fpGUI; - -{.$DEFINE LAYOUTTRACES} -{.$DEFINE TRACEEVENTS} - -{$IFDEF Debug} - {$ASSERTIONS On} -{$ENDIF} - -{$IFDEF FPC} - {$mode objfpc}{$h+} -{$ENDIF} - -interface - -uses -{$IFDEF mswindows} - // used for system theme color detection - Windows, GFX_GDI, // This must be removed!!! -{$ENDIF} - SysUtils - ,Classes - ,GFXBase - ,fpGFX -// ,Types - ; - - -const - - InfiniteSize = 16383; - -// Insert loads of named colors -{$I fpguicolors.inc} - - -resourcestring - mbText_Yes = 'Yes'; - mbText_No = 'No'; - mbText_Ok = 'Ok'; - mbText_Cancel = 'Cancel'; - mbText_Apply = 'Apply'; - mbText_Abort = 'Abort'; - mbText_Retry = 'Retry'; - mbText_Ignore = 'Ignore'; - mbText_All = 'All'; - mbText_NoToAll = 'No to all'; - mbText_YesToAll = 'Yes to all'; - mbText_Help = 'Help'; - - -type - TFWidget = class; - TEventObj = class; - TFCustomForm = class; - - - TFWidgetState = set of ( - wsEnabled, - wsIsVisible, - wsSizeIsForced, - wsHasFocus, - wsMouseInside, - wsClicked - ); - - - TOrientation = (Horizontal, Vertical); - - - // The following flags are used for styles - - TFButtonFlags = set of (btnIsEmbedded, btnIsDefault, btnIsPressed, - btnIsSelected, btnHasFocus, btnHasParentColor); - - TFCheckboxFlags = set of (cbIsPressed, cbHasFocus, cbIsEnabled, cbIsChecked); - - - // Other stuff - - TMsgDlgBtn = (mbYes, mbNo, mbOK, mbCancel, mbApply, mbAbort, mbRetry, - mbIgnore, mbAll, mbNoToAll, mbYesToAll, mbHelp); - TMsgDlgButtons = set of TMsgDlgBtn; - - - // Panel & Frame types - - TBevelStyle = (bsPlain, bsLowered, bsRaised); - - TBevelShape = (bsNoFrame, bsBox, bsFrame, bsBottomLine, bsLeftLine, - bsRightLine, bsTopLine); - - - -{ This lets us use a single include file for both the Interface and - Implementation sections. } -{$define read_interface} -{$undef read_implementation} - - -{$I fpguistyle.inc} -{$I fpguiwidget.inc} -{$I fpguicontainer.inc} -{$I fpguibin.inc} -{$I fpguilayouts.inc} -{$I fpguiform.inc} -{$I fpguipopupwindow.inc} -{$I fpguilabel.inc} -{$I fpguiedit.inc} -{$I fpguibuttons.inc} -{$I fpguiscrollbar.inc} -{$I fpguiscrollbox.inc} -{$I fpguicheckbox.inc} -{$I fpguiradiobutton.inc} -{$I fpguiseparator.inc} -{$I fpguigroupbox.inc} -{$I fpguilistbox.inc} -{$I fpguicombobox.inc} -{$I fpguigrid.inc} -{$I fpguidialogs.inc} -{$I fpguipanel.inc} -{$I fpguimenus.inc} -{$I fpguiprogressbar.inc} -{$I fpguimemo.inc} - - -function ClipMinMax(val, min, max: Integer): Integer; - -{ This will change at a later date! } -procedure LoadForm(AForm: TComponent); -procedure SaveForm(AForm: TComponent); -procedure ShowMessage(const AMessage: string); - - -implementation -uses - Math - ,StyleManager - ,fpUTF8Utils - ; - - -resourcestring - sListIndexError = 'List index exceeds bounds (%d)'; - - -{$IFDEF TraceEvents} -var - EventNestingLevel: Integer; -{$ENDIF} - - -function ClipMinMax(val, min, max: Integer): Integer; -begin - if val < min then - Result := min - else if val > max then - begin - Result := max; - if Result < min then - Result := min; - end else - Result := val; -end; - -procedure LoadForm(AForm: TComponent); -type - PForm = ^TFCustomForm; -var - lForm: PForm; - Filename: string; - TextStream, BinStream: TStream; -begin - Filename := LowerCase(Copy(AForm.ClassName, 2, 255)) + '.frm'; - TextStream := TFileStream.Create(Filename, fmOpenRead); - BinStream := TMemoryStream.Create; - ObjectTextToBinary(TextStream, BinStream); - TextStream.Free; - - lForm := @AForm; - BinStream.Position := 0; - BinStream.ReadComponent(lForm^); - BinStream.Free; -end; - -// graeme: still work in progress (2007-04-25) -procedure SaveForm(AForm: TComponent); -var - f, f2: TStream; - Filename: string; - TextStream, BinStream: TStream; -begin - Filename := LowerCase(Copy(AForm.ClassName, 2, 255)) + '.frm'; -// Filename := 'test.frm'; - BinStream := TMemoryStream.Create; - TextStream := TFileStream.Create(Filename, fmCreate); - BinStream.WriteComponent(AForm); - BinStream.Position := 0; - ObjectBinaryToText(BinStream, TextStream); - - TextStream.Free; - BinStream.Free; -end; - -// graeme: still work in progress (2007-05-01) -procedure ShowMessage(const AMessage: string); -var - frm: TFStandardDialog; -begin - frm := TFStandardDialog.Create(GFApplication); - try - frm.Text := 'ShowMessage'; - frm.Buttons := [mbOk]; -// frm.Buttons := [mbYes, mbNo, mbCancel, mbHelp]; - frm.Message := AMessage; - frm.ShowModal; - finally -// frm.Free; - end -end; - - -{$IFDEF LAYOUTTRACES} -procedure LAYOUTTRACE(const Position: String; const args: array of const); -{$IFDEF TraceEvents} -var - i: Integer; -{$ENDIF} -begin - {$IFDEF TraceEvents} - for i := 1 to EventNestingLevel do - Write(' '); - {$ENDIF} - WriteLn(Format(Position, args)); -end; -{$ELSE} -procedure LAYOUTTRACE(const Position: String; const args: array of const); -begin -end; -{$ENDIF} - -function InflateRect(var Rect: TRect; dx: Integer; dy: Integer): Boolean; -begin - if Assigned(@Rect) then - begin - with Rect do - begin - dec(Left, dx); - dec(Top, dy); - inc(Right, dx); - inc(Bottom, dy); - end; - Result := True; - end - else - Result := False; -end; - -function OffsetRect(var Rect : TRect;DX : Integer;DY : Integer) : Boolean; -begin - if assigned(@Rect) then - begin - with Rect do - begin - inc(Left,dx); - inc(Top,dy); - inc(Right,dx); - inc(Bottom,dy); - end; - OffsetRect := True; - end - else - OffsetRect := False; -end; - -function CenterPoint(const Rect: TRect): TPoint; -begin - with Rect do - begin - Result.X := (Left+Right) div 2; - Result.Y := (Top+Bottom) div 2; - end; -end; - -{ This lets us use a single include file for both the Interface and - Implementation sections. } -{$undef read_interface} -{$define read_implementation} - - -{$I fpguistyle.inc} -{$I fpguiwidget.inc} -{$I fpguicontainer.inc} -{$I fpguibin.inc} -{$I fpguilayouts.inc} -{$I fpguiform.inc} -{$I fpguipopupwindow.inc} -{$I fpguilabel.inc} -{$I fpguiedit.inc} -{$I fpguibuttons.inc} -{$I fpguiscrollbar.inc} -{$I fpguiscrollbox.inc} -{$I fpguicheckbox.inc} -{$I fpguiradiobutton.inc} -{$I fpguiseparator.inc} -{$I fpguigroupbox.inc} -{$I fpguilistbox.inc} -{$I fpguicombobox.inc} -{$I fpguigrid.inc} -{$I fpguidialogs.inc} -{$I fpguipanel.inc} -{$I fpguimenus.inc} -{$I fpguiprogressbar.inc} -{$I fpguimemo.inc} - - -const - Orientations: array[TOrientation] of TIdentMapEntry = ( - (Value: Ord(Horizontal); Name: 'Horizontal'), - (Value: Ord(Vertical); Name: 'Vertical') - ); - - -function IdentToOrientation(const Ident: String; var Orientation: LongInt): Boolean; -begin - Result := IdentToInt(Ident, Orientation, Orientations); -end; - -function OrientationToIdent(Orientation: LongInt; var Ident: String): Boolean; -begin - Result := IntToIdent(Orientation, Ident, Orientations); -end; - - -initialization - RegisterIntegerConsts(TypeInfo(TOrientation), - @IdentToOrientation, @OrientationToIdent); - -end. - diff --git a/gui/fpgui.rst b/gui/fpgui.rst deleted file mode 100644 index ad20464a..00000000 --- a/gui/fpgui.rst +++ /dev/null @@ -1,60 +0,0 @@ - -# hash value = 24515 -fpgui.mbtext_yes='Yes' - - -# hash value = 1359 -fpgui.mbtext_no='No' - - -# hash value = 1371 -fpgui.mbtext_ok='Ok' - - -# hash value = 77089212 -fpgui.mbtext_cancel='Cancel' - - -# hash value = 4749113 -fpgui.mbtext_apply='Apply' - - -# hash value = 4691604 -fpgui.mbtext_abort='Abort' - - -# hash value = 5819289 -fpgui.mbtext_retry='Retry' - - -# hash value = 83777157 -fpgui.mbtext_ignore='Ignore' - - -# hash value = 18476 -fpgui.mbtext_all='All' - - -# hash value = 129053500 -fpgui.mbtext_notoall='No to all' - - -# hash value = 129277052 -fpgui.mbtext_yestoall='Yes to all' - - -# hash value = 322608 -fpgui.mbtext_help='Help' - - -# hash value = 162403993 -fpgui.slistindexerror='List index exceeds bounds (%d)' - - -# hash value = 100314660 -fpgui.slayoutwidgetnotfound='Layout child widget not found' - - -# hash value = 165560901 -fpgui.sgridindexoutofrange='Grid index out of range' - diff --git a/gui/fpguibin.inc b/gui/fpguibin.inc deleted file mode 100644 index 529b7534..00000000 --- a/gui/fpguibin.inc +++ /dev/null @@ -1,111 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Bin widget declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - - { Bin widget declarations } - TFBinWidget = class(TFContainerWidget) - protected - FChild: TFWidget; - procedure SetChild(AChild: TFWidget); - function GetChildCount: Integer; override; - function GetChild(Index: Integer): TFWidget; override; - procedure CalcSizes; override; - public // !!!: temporarily - property Child: TFWidget read FChild write SetChild; - // really public :) - function ContainsChild(AChild: TFWidget): Boolean; override; - procedure InsertChild(AChild: TFWidget); override; - procedure RemoveChild(AChild: TFWidget); override; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - - - -// =================================================================== -// TFBinWidget -// =================================================================== - -function TFBinWidget.ContainsChild(AChild: TFWidget): Boolean; -begin - Result := Assigned(AChild) and (FChild = AChild); -end; - - -procedure TFBinWidget.InsertChild(AChild: TFWidget); -begin - if FChild <> AChild then - begin - if Assigned(FChild) then - FChild.Parent := nil; - FChild := AChild; - FChild.Parent := Self; - end; -end; - - -procedure TFBinWidget.RemoveChild(AChild: TFWidget); -begin - if FChild = AChild then - begin - FChild := nil; - AChild.Parent := nil; - end; -end; - - -function TFBinWidget.GetChildCount: Integer; -begin - Result := Ord(Assigned(Child)); -end; - - -function TFBinWidget.GetChild(Index: Integer): TFWidget; -begin - if (Index = 0) and Assigned(Child) then - Result := Child - else - TList.Error(SListIndexError, Index); -end; - - -procedure TFBinWidget.CalcSizes; -begin - LAYOUTTRACE('TBinWidget.CalcSizes for %s:%s', [Name, ClassName]); - if Assigned(Child) then - begin - FMinSize := Child.MinSize; - FMaxSize := Child.MaxSize; - FDefSize := Child.DefSize; - end; -end; - - -procedure TFBinWidget.SetChild(AChild: TFWidget); -begin - InsertChild(AChild); -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguibuttons.inc b/gui/fpguibuttons.inc deleted file mode 100644 index f8281491..00000000 --- a/gui/fpguibuttons.inc +++ /dev/null @@ -1,155 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Button class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - - -{$IFDEF read_interface} - - TFGenericButton = class(TFWidget) - protected - FEmbedded: Boolean; - procedure Paint(Canvas: TFCanvas); override; - public - constructor Create(AOwner: TComponent); override; - property Embedded: Boolean read FEmbedded write FEmbedded default False; - end; - - - TFCustomButton = class(TFGenericButton) - protected - procedure Paint(Canvas: TFCanvas); override; - procedure CalcSizes; override; - public - constructor Create(const pText: string; pOwner: TComponent); overload; - end; - - - TFButton = class(TFCustomButton) - published - property CanExpandWidth; - property CanExpandHeight; - property Enabled; - property Text; - property OnClick; - end; - -{ - TCustomImageButton = class(TFGenericButton) - protected - procedure Paint(Canvas: TGfxCanvas); override; - procedure EvRecalcLayout; override; - end; - - TImageButton = class(TCustomImageButton) - published - property Enabled; - property Image; - property OnClick; - end; -} - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - -// =================================================================== -// TFGenericButton -// =================================================================== - -constructor TFGenericButton.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - WidgetStyle := WidgetStyle + [wsCaptureMouse, wsClickable, wsOpaque]; - // default size - FDefSize := Size(18, 18); -end; - - -procedure TFGenericButton.Paint(Canvas: TFCanvas); -var - Flags: TFButtonFlags; -begin - if Embedded then - Flags := [btnIsEmbedded] - else - Flags := []; - if (wsClicked in WidgetState) and (wsMouseInside in WidgetState) then - Include(Flags, btnIsPressed); - if (wsHasFocus in WidgetState) and not Embedded then - begin - Include(Flags, btnIsSelected); - if FindForm.IsActive then - Include(Flags, btnHasFocus); - end; - - Style.DrawButtonFace(Canvas, Rect(0, 0, BoundsSize.cx, BoundsSize.cy), Flags); -end; - -// =================================================================== -// TFCustomButton -// =================================================================== - -procedure TFCustomButton.Paint(Canvas: TFCanvas); -var - Pt: TPoint; - Borders: TRect; -begin - inherited Paint(Canvas); - - Borders := Style.GetButtonBorders; - // setup the clip rectangle - Canvas.IntersectClipRect(Rect(Borders.Left, Borders.Top, - BoundsSize.cx - Borders.Right, BoundsSize.cy - Borders.Bottom)); - - Canvas.SetColor(Style.GetUIColor(clBtnText)); - Pt.x := (BoundsSize.cx - Canvas.TextWidth(Text)) div 2; - Pt.y := (BoundsSize.cy - Canvas.FontCellHeight) div 2; - if (wsClicked in WidgetState) and (wsMouseInside in WidgetState) then - Pt := Pt + Point(1, 1); - Style.DrawText(Canvas, Pt, Text, WidgetState); -end; - - -procedure TFCustomButton.CalcSizes; -var - Borders: TRect; -begin - LAYOUTTRACE('TFCustomButton.CalcSizes for %s:%s', [Name, ClassName]); - Borders := Style.GetButtonBorders; - with FindForm.Wnd.Canvas do - begin - FMinSize.cx := Borders.Left + Borders.Right + TextWidth(Text); - if FMinSize.cx < 75 then - FMinSize.cx := 75; // apply default button width - FMinSize.cy := Borders.Top + Borders.Bottom + FontCellHeight; - end; - FDefSize := FMinSize + gfxbase.Size(20, 2); -end; - -constructor TFCustomButton.Create(const pText: string; pOwner: TComponent); -begin - Create(pOwner); - // default size - FDefSize := Size(75, 25); - Text := pText; -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguicheckbox.inc b/gui/fpguicheckbox.inc deleted file mode 100644 index 7bfd40c9..00000000 --- a/gui/fpguicheckbox.inc +++ /dev/null @@ -1,127 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Checkbox class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - - { TFCustomCheckbox } - - TFCustomCheckbox = class(TFWidget) - private - procedure SetChecked(AChecked: Boolean); - protected - FChecked: Boolean; - FLabelPos: TPoint; - procedure Click; override; - procedure Paint(Canvas: TFCanvas); override; - procedure CalcSizes; override; - property Checked: Boolean read FChecked write SetChecked; - public - constructor Create(AOwner: TComponent); override; - constructor Create(const pText: string; pOwner: TComponent); overload; - end; - - - TFCheckbox = class(TFCustomCheckbox) - published - property Enabled; - property CanExpandHeight; - property CanExpandWidth; - property Checked; - property Text; - property OnClick; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - -// =================================================================== -// TFCustomCheckbox -// =================================================================== - -constructor TFCustomCheckbox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - WidgetStyle := WidgetStyle + [wsCaptureMouse, wsClickable, wsOpaque]; -end; - - -constructor TFCustomCheckbox.Create(const pText: string; pOwner: TComponent); -begin - Create(pOwner); - Text := pText; -end; - - -procedure TFCustomCheckbox.Click; -begin - FChecked := not FChecked; - inherited Click; -end; - - -procedure TFCustomCheckbox.Paint(Canvas: TFCanvas); -var - FontHeight: Integer; - LabelRect: TRect; - Flags: TFCheckboxFlags; -begin - FontHeight := Canvas.FontCellHeight; - LabelRect.Left := FLabelPos.x; - LabelRect.Top := FLabelPos.y + (Height - MinSize.cy) div 2; - LabelRect.Right := LabelRect.Left + Canvas.TextWidth(Text); - LabelRect.Bottom := LabelRect.Top + FontHeight; - - Flags := []; - if (wsClicked in WidgetState) and (wsMouseInside in WidgetState) then - Include(Flags, cbIsPressed); - if (wsHasFocus in WidgetState) and FindForm.IsActive then - Include(Flags, cbHasFocus); - if wsEnabled in WidgetState then - Include(Flags, cbIsEnabled); - if Checked then - Include(Flags, cbIsChecked); - - Style.DrawCheckbox(Canvas, Rect(0, 0, Width, Height), LabelRect, Flags); - Canvas.SetColor(Style.GetUIColor(clWindowText)); - Style.DrawText(Canvas, LabelRect.TopLeft, Text, WidgetState); -end; - - -procedure TFCustomCheckbox.CalcSizes; -begin - with FindForm.Wnd.Canvas do - Style.GetCheckboxLayout(gfxbase.Size(TextWidth(Text), FontCellHeight), - FMinSize, FLabelPos); -end; - - -procedure TFCustomCheckbox.SetChecked(AChecked: Boolean); -begin - if AChecked <> Checked then - begin - FChecked := AChecked; - Redraw; - end; -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguicolors.inc b/gui/fpguicolors.inc deleted file mode 100644 index 98785467..00000000 --- a/gui/fpguicolors.inc +++ /dev/null @@ -1,229 +0,0 @@ - -{%mainunit fpgui.pp} - - - { NOTE: - The colors commented out below are not applicable to systems other than - Windows. For this reason I don't see the need to define them. Under Linux, - the Windows Manager theme will draw those parts anyway and we have no - control over that or the colors used. } - - // UI element colors - clScrollBar = TColor($80000000); -// clBackground = TColor($80000001); -// clActiveCaption = TColor($80000002); -// clInactiveCaption = TColor($80000003); - clMenu = TColor($80000004); - clWindow = TColor($80000005); -// clWindowFrame = TColor($80000006); - clMenuText = TColor($80000007); - clWindowText = TColor($80000008); -// clCaptionText = TColor($80000009); -// clActiveBorder = TColor($8000000a); -// clInactiveBorder = TColor($8000000b); - clAppWorkSpace = TColor($8000000c); - clHighlight = TColor($8000000d); - clHighlightText = TColor($8000000e); - cl3DFace = TColor($8000000f); - cl3DShadow = TColor($80000010); - clGrayText = TColor($80000011); - clBtnText = TColor($80000012); -// clInactiveCaptionText = TColor($80000013); - cl3DHighlight = TColor($80000014); - cl3DDkShadow = TColor($80000015); - cl3DLight = TColor($80000016); - clInfoText = TColor($80000017); - clInfoBk = TColor($80000018); - - // The following colors match the predefined Delphi Colors - clBlack = TColor($000000); - clMaroon = TColor($000080); - clGreen = TColor($008000); - clOlive = TColor($008080); - clNavy = TColor($800000); - clPurple = TColor($800080); - clTeal = TColor($808000); - clGray = TColor($808080); - clSilver = TColor($C0C0C0); - clRed = TColor($0000FF); - clLime = TColor($00FF00); - clYellow = TColor($00FFFF); - clBlue = TColor($FF0000); - clFuchsia = TColor($FF00FF); - clAqua = TColor($FFFF00); - clLtGray = TColor($C0C0C0); - clDkGray = TColor($808080); - clWhite = TColor($FFFFFF); - clCream = TColor($F0FBFF); - clMoneyGreen = TColor($C0DCC0); - clSkyBlue = TColor($F0CAA6); -// clNone = TColor($1FFFFFFF); -// clDefault = TColor($20000000); - - // alias color names - clBtnFace = cl3DFace; - clBtnShadow = cl3DShadow; - clBtnHighlight = cl3DHighlight; - clCyan = clAqua; - clMagenta = clFuchsia; - - // web/html named colors - De-facto NS & MSIE recognized HTML color names - clAliceBlue = TColor($FFF8F0); - clAntiqueWhite = TColor($D7EBFA); -// clAqua = TColor($FFFF00); - clAquamarine = TColor($D4FF7F); - clAzure = TColor($FFFFF0); - clBeige = TColor($DCF5F5); - clBisque = TColor($C4E4FF); -// clBlack = TColor($000000); - clBlanchedAlmond = TColor($CDEBFF); -// clBlue #0000ff - clBlueViolet = TColor($E22B8A); - clBrown = TColor($2A2AA5); - clBurlyWood = TColor($87B8DE); - clCadetBlue = TColor($A09E5F); - clChartreuse = TColor($00FF7F); - clChocolate = TColor($1E69D2); - - - clMedGray = TColor($A4A0A0); - clForestGreen = TColor($228B22); - clRoyalBlue = TColor($E16941); - clLightYellow = TColor($E0FFFF); - clCornsilk = TColor($DCF8FF); - clMidnightBlue = TColor($701919); - clDarkWhite = TColor($E0E0E0); - -{ -# De-facto NS & MSIE recognized HTML color names -Coral #ff7f50 -CornflowerBlue #6495ed -Cornsilk #fff8dc -Crimson #dc143c -Cyan #00ffff -DarkBlue #00008b -DarkCyan #008b8b -DarkGoldenrod #b8860b -DarkGray #a9a9a9 -DarkGreen #006400 -DarkKhaki #bdb76b -DarkMagenta #8b008b -DarkOliveGreen #556b2f -DarkOrange #ff8c00 -DarkOrchid #9932cc -DarkRed #8b0000 -DarkSalmon #e9967a -DarkSeaGreen #8fbc8f -DarkSlateBlue #483d8b -DarkSlateGray #2f4f4f -DarkTurquoise #00ced1 -DarkViolet #9400d3 -DeepPink #ff1493 -DeepSkyBlue #00bfff -DimGray #696969 -DodgerBlue #1e90ff -FireBrick #b22222 -FloralWhite #fffaf0 -ForestGreen #228b22 -Fuchsia #ff00ff -Gainsboro #dcdcdc -GhostWhite #f8f8ff -Gold #ffd700 -Goldenrod #daa520 -Gray #808080 -Green #008000 -GreenYellow #adff2f -Honeydew #f0fff0 -HotPink #ff69b4 -IndianRed #cd5c5c -Indigo #4b0082 -Ivory #fffff0 -Khaki #f0e68c -Lavender #e6e6fa -LavenderBlush #fff0f5 -LawnGreen #7cfc00 -} - clLemonChiffon = TColor($CDFAFF); // #fffacd -{ -LightBlue #add8e6 -LightCoral #f08080 -LightCyan #e0ffff -LightGoldenrodYellow #fafad2 -LightGreen #90ee90 -} - clLightGrey = TColor($D3D3D3); // #d3d3d3 -{ -LightPink #ffb6c1 -LightSalmon #ffa07a -LightSeaGreen #20b2aa -LightSkyBlue #87cefa -LightSlateGray #778899 -LightSteelBlue #b0c4de -LightYellow #ffffe0 -Lime #00ff00 -LimeGreen #32cd32 -Linen #faf0e6 -Magenta #ff00ff -Maroon #800000 -MediumAquamarine #66cdaa -MediumBlue #0000cd -MediumOrchid #ba55d3 -MediumPurple #9370db -MediumSeaGreen #3cb371 -MediumSlateBlue #7b68ee -MediumSpringGreen #00fa9a -MediumTurquoise #48d1cc -MediumVioletRed #c71585 -MidnightBlue #191970 -MintCream #f5fffa -MistyRose #ffe4e1 -Moccasin #ffe4b5 -NavajoWhite #ffdead -Navy #000080 -OldLace #fdf5e6 -Olive #808000 -OliveDrab #6b8e23 -Orange #ffa500 -OrangeRed #ff4500 -Orchid #da70d6 -PaleGoldenrod #eee8aa -PaleGreen #98fb98 -PaleTurquoise #afeeee -PaleVioletRed #db7093 -PapayaWhip #ffefd5 -PeachPuff #ffdab9 -Peru #cd853f -Pink #ffc0cb -Plum #dda0dd -PowderBlue #b0e0e6 -Purple #800080 -Red #ff0000 -RosyBrown #bc8f8f -RoyalBlue #4169e1 -SaddleBrown #8b4513 -Salmon #fa8072 -SandyBrown #f4a460 -SeaGreen #2e8b57 -Seashell #fff5ee -Sienna #a0522d -Silver #c0c0c0 -SkyBlue #87ceeb -SlateBlue #6a5acd -SlateGray #708090 -Snow #fffafa -SpringGreen #00ff7f -SteelBlue #4682b4 -Tan #d2b48c -Teal #008080 -Thistle #d8bfd8 -Tomato #ff6347 -Turquoise #40e0d0 -Violet #ee82ee -Wheat #f5deb3 -White #ffffff -WhiteSmoke #f5f5f5 -Yellow #ffff00 -YellowGreen #9acd32 -} - - diff --git a/gui/fpguicombobox.inc b/gui/fpguicombobox.inc deleted file mode 100644 index 371113aa..00000000 --- a/gui/fpguicombobox.inc +++ /dev/null @@ -1,288 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - ComboBox class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - - { Combobox widget declarations } - - TFComboBoxPopup = class(TFPopupWindow) - private - FLayout: TFBoxLayout; - FListBox: TFListBox; - public - constructor Create(AOwner: TComponent); override; - property ListBox: TFListBox read FListBox; - end; - - - TFCustomComboBox = class(TFWidget) - private - FItemIndex: Integer; - FItems: TStrings; - FOnChange: TNotifyEvent; - procedure ComboBoxButtonClick(Sender: TObject); - procedure DropDownDeactivate(Sender: TObject); - procedure DropDownDestroy(Sender: TObject); - procedure SetItemIndex(const AValue: Integer); - protected - ComboBoxButton: TFGenericButton; - FDropDown: TFComboBoxPopup; - lbl: TFLabel; - procedure Click; override; - procedure Paint(Canvas: TFCanvas); override; - procedure CalcSizes; override; - procedure Resized; override; - function DistributeEvent(Event: TEventObj): Boolean; override; - property CanExpandWidth default True; -// property DropDownCount: integer read FDropDownCount write FDropDownCount; - property ItemIndex: Integer read FItemIndex write SetItemIndex default -1; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property Items: TStrings read FItems write FItems; - end; - - - TFComboBox = class(TFCustomComboBox) - published - property CanExpandWidth; - property CanExpandHeight; - property Enabled; - property Text; - property ItemIndex; - property OnChange; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - - -{ Combobox widget implementation } - -type - TFArrowButton = class(TFGenericButton) - protected - procedure Paint(Canvas: TFCanvas); override; - procedure CalcSizes; override; - end; - - -procedure TFArrowButton.Paint(Canvas: TFCanvas); -begin - inherited Paint(Canvas); - Style.DrawComboBoxArrow(Canvas, Rect(0, 0, Width, Height), - (wsClicked in WidgetState) and (wsMouseInside in WidgetState), - wsEnabled in WidgetState); -end; - -procedure TFArrowButton.CalcSizes; -begin - FMinSize := Style.GetComboBoxBtnSize; -end; - -constructor TFComboBoxPopup.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - WidgetStyle := WidgetStyle + [wsCaptureMouse, wsClickable, wsOpaque]; - BorderWidth := 1; - Color := clBlack; - Name := '_ComboBoxPopup'; - - FLayout := TFBoxLayout.Create(self); - FLayout.Name := '_VBoxLayout'; - FLayout.Orientation := Vertical; - FLayout.Spacing := 0; - InsertChild(FLayout); - - FListBox := TFListBox.Create(self); - FListBox.Name := '_Listbox'; - FListBox.HotTrack := True; - FLayout.InsertChild(FListBox); -end; - - -// ------------------------------------------------------------------- -// TCustomComboBox -// ------------------------------------------------------------------- - -constructor TFCustomComboBox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FCanExpandWidth := True; - WidgetStyle := WidgetStyle + [wsCaptureMouse, wsClickable, wsOpaque]; - FItems := TStringList.Create; - FItemIndex := -1; - - ComboBoxButton := TFArrowButton.Create(Self); - ComboBoxButton.Name := '_ComboBoxButton'; - ComboBoxButton.Embedded := True; - ComboBoxButton.CanExpandWidth := False; - ComboBoxButton.CanExpandHeight := False; - ComboBoxButton.OnClick := @ComboBoxButtonClick; - ComboBoxButton.SetEmbeddedParent(Self); -end; - -destructor TFCustomComboBox.Destroy; -begin - FDropDown.Free; - inherited Destroy; -end; - -procedure TFCustomComboBox.Paint(Canvas: TFCanvas); -var - Pt: TPoint; - ItemRect: TRect; - ItemFlags: TItemFlags; - c: TFCanvas; - r: TRect; -begin - ItemFlags := []; - Style.DrawEditBox(Canvas, Rect(0, 0, Width, Height)); - - if Text <> '' then - begin - Style.SetUIColor(Canvas, clWindowText); - Pt.x := 4; - Pt.y := (BoundsSize.cy - Canvas.FontCellHeight) div 2; - - if (wsHasFocus in WidgetState) and FindForm.IsActive then - begin - Include(ItemFlags, ifFocused); - Include(ItemFlags, ifSelected); - end; - - ItemRect := Rect(0, 0, (Width - ComboBoxButton.Width), Height); -// InflateRect(ItemRect, -1, -1); - ItemRect.TopLeft := ItemRect.TopLeft + 1; - ItemRect.BottomRight := ItemRect.BottomRight - 2; - - { Text must be clipped before reaching the button } -// try -// Canvas.SaveState; -// writeln(Format('Canvas size Before %d:%d', [Canvas.Width, Canvas.Height])); -// r := Canvas.Transform(ComboBoxButton.BoundsRect); -// writeln(Format(' Bounding rectangle (%d:%d)x(%d:%d)', [BoundsRect.Top, BoundsRect.Left, BoundsRect.Bottom, BoundsRect.Right])); -// writeln(Format(' Canvas rectangle (%d:%d)x(%d:%d)', [Canvas.GetClipRect.Top, Canvas.GetClipRect.Left, Canvas.GetClipRect.Bottom, Canvas.GetClipRect.Right])); -// writeln(Format(' ComboButton rectangle (%d:%d)x(%d:%d)', [r.Top, r.Left, r.Bottom, r.Right])); -// Canvas.IntersectClipRect(r); -// writeln(Format('Canvas size After %d:%d', [Canvas.Width, Canvas.Height])); - - Style.DrawItemBefore(Canvas, ItemRect, ItemFlags); - Style.DrawText(Canvas, Pt, Text, WidgetState); - Style.DrawItemAfter(Canvas, ItemRect, ItemFlags); -// finally -// Canvas.RestoreState; -// end; - end - else - begin - if (wsHasFocus in WidgetState) and FindForm.IsActive then - Style.DrawFocusRect(Canvas, Rect(0, 0, Width, Height)); - end; -end; - -procedure TFCustomComboBox.CalcSizes; -begin - with Style.GetEditBoxBorders do - FMinSize := Size(ComboBoxButton.MinSize.cx, - Max(FindForm.Wnd.Canvas.FontCellHeight, ComboBoxButton.MinSize.cy)) + - TopLeft + BottomRight; -end; - -procedure TFCustomComboBox.Resized; -begin - with Style.GetEditBoxBorders do - ComboBoxButton.SetBounds( - Point(Width - Right - ComboBoxButton.MinSize.cx, Top), - ComboBoxButton.MinSize); -end; - -function TFCustomComboBox.DistributeEvent(Event: TEventObj): Boolean; -begin - Result := Event.SendToChild(ComboBoxButton); -// or inherited DistributeEvent(Event); -end; - -procedure TFCustomComboBox.ComboBoxButtonClick(Sender: TObject); -begin - if Assigned(FDropDown) and FDropDown.Visible then - begin - FDropDown.Close; - Exit; //==> - end; - - if not Assigned(FDropDown) then - begin - FDropDown := TFComboBoxPopup.Create(Self); - FDropDown.OnDestroy := @DropDownDestroy; - FDropDown.ListBox.Items.Text := FItems.Text; - FDropDown.ListBox.FItemIndex := FItemIndex; - FDropDown.ListBox.OnClick := @DropDownDeactivate; - end; - - FDropDown.SetPosition(ClientToScreen(Point(0, Height))); - FDropDown.Show; - FDropDown.Wnd.SetMinMaxClientSize(MaxSize, MaxSize); -end; - -procedure TFCustomComboBox.DropDownDeactivate(Sender: TObject); -begin - LAYOUTTRACE('TCustomComboBox.DropDownDestroy for %s:%s', [Name, ClassName]); - ItemIndex := FDropDown.ListBox.ItemIndex; - FDropDown.Close; - SetFocus; -end; - -procedure TFCustomComboBox.DropDownDestroy(Sender: TObject); -begin - LAYOUTTRACE('TCustomComboBox.DropDownDestroy for %s:%s', [Name, ClassName]); - FDropDown := nil; -end; - -procedure TFCustomComboBox.SetItemIndex(const AValue: Integer); -begin - if FItemIndex <> AValue then - begin - if AValue < FItems.Count then - FItemIndex := AValue; - if FItemIndex = -1 then - Text := '' - else - Text := FItems[FItemIndex]; - - // fire event - if Assigned(OnChange) then - OnChange(Self); - end; -end; - -{ This event causes the combobox to drop open when you click anywhere in the - component, or press the spacebar key. } -procedure TFCustomComboBox.Click; -begin - ComboBoxButtonClick(nil); - inherited Click; -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguicontainer.inc b/gui/fpguicontainer.inc deleted file mode 100644 index dbe87d25..00000000 --- a/gui/fpguicontainer.inc +++ /dev/null @@ -1,88 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Container class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - - { Container widget declarations } - - TFContainerWidget = class(TFWidget) - protected - function DistributeEvent(Event: TEventObj): Boolean; override; - function GetChildCount: Integer; virtual; abstract; - function GetChild(Index: Integer): TFWidget; virtual; abstract; - property ChildCount: Integer read GetChildCount; - property Children[Index: Integer]: TFWidget read GetChild; - // Move to public in decendant classes, if you want them visible - procedure InsertChild(AChild: TFWidget); dynamic; virtual; - procedure RemoveChild(AChild: TFWidget); dynamic; virtual; - public - function GetChildAt(APoint: TPoint): TFWidget; - function ContainsChild(AChild: TFWidget): Boolean; dynamic; abstract; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - -// =================================================================== -// TContainerWidget -// =================================================================== - -function TFContainerWidget.GetChildAt(APoint: TPoint): TFWidget; -var - i: Integer; -begin - for i := 0 to ChildCount - 1 do - begin - Result := Children[i]; - if PtInRect(Result.BoundsRect, APoint) then - exit; - end; - Result := nil; -end; - -function TFContainerWidget.DistributeEvent(Event: TEventObj): Boolean; -var - i: Integer; -begin - // Propagate the event to all children - for i := 0 to ChildCount - 1 do - if Event.SendToChild(Children[i]) then - begin - Result := True; - exit; - end; - // The event hasn't been processed by any child: - Result := inherited DistributeEvent(Event); -end; - -procedure TFContainerWidget.InsertChild(AChild: TFWidget); -begin - // do nothing -end; - -procedure TFContainerWidget.RemoveChild(AChild: TFWidget); -begin - // do nothing -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguidialogs.inc b/gui/fpguidialogs.inc deleted file mode 100644 index 97932917..00000000 --- a/gui/fpguidialogs.inc +++ /dev/null @@ -1,199 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Dialogs class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - - -{$IFDEF read_interface} - - { TFCustomStandardDialog } - - TFCustomStandardDialog = class(TFCustomForm) - private - function GetMessage: string; - procedure SetMessage(const AValue: string); - procedure StdBtnClicked(Sender: TObject); - protected - FButtons: TMsgDlgButtons; - MainLayout, BtnLayout: TFBoxLayout; - Separator: TSeparator; - FMessage: TFLabel; - function ProcessEvent(Event: TEventObj): Boolean; override; - function DistributeEvent(Event: TEventObj): Boolean; override; - procedure CalcSizes; override; - procedure Resized; override; - procedure SetButtons(AButtons: TMsgDlgButtons); - property Buttons: TMsgDlgButtons read FButtons write SetButtons default [mbOk, mbCancel]; - public - constructor Create(AOwner: TComponent); override; - property Message: string read GetMessage write SetMessage; - end; - - - TFStandardDialog = class(TFCustomStandardDialog) - published - property Text; - property OnCreate; - property Buttons; - end; - - - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - - - -// =================================================================== -// TFCustomStandardDialog -// =================================================================== - -// public methods - -constructor TFCustomStandardDialog.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FButtons := [mbOk, mbCancel]; - FBorderWidth := 4; - - MainLayout := TFBoxLayout.Create(Self); - MainLayout.Orientation := Vertical; - Child := MainLayout; - - FMessage := TFLabel.Create(self); - FMessage.CanExpandWidth := True; - MainLayout.InsertChild(FMessage); - - Separator := TSeparator.Create(Self); - MainLayout.InsertChild(Separator); - - BtnLayout := TFBoxLayout.Create(Self); - BtnLayout.Orientation := Horizontal; - BtnLayout.HorzAlign := horzRight; - BtnLayout.VertAlign := vertCenter; - BtnLayout.CanExpandHeight := False; - MainLayout.InsertChild(BtnLayout); - - SetButtons(FButtons); -end; - - -// protected methods - -function TFCustomStandardDialog.ProcessEvent(Event: TEventObj): Boolean; -begin - Result := MainLayout.ProcessEvent(Event) or inherited ProcessEvent(Event); -end; - -function TFCustomStandardDialog.DistributeEvent(Event: TEventObj): Boolean; -begin - Result := Event.SendToChild(MainLayout) or inherited DistributeEvent(Event); -end; - -procedure TFCustomStandardDialog.CalcSizes; -begin - if Assigned(Child) then - begin - FMinSize := Child.MinSize + 2 * BorderWidth; - FDefSize := Child.DefSize + 2 * BorderWidth; - FMaxSize.cx := Min(InfiniteSize, Child.MaxSize.cx + 2 * BorderWidth); - FMaxSize.cy := Min(InfiniteSize, Child.MaxSize.cy + 2 * BorderWidth); - end; - - FMinSize.cx := Max(MinSize.cx, MainLayout.MinSize.cx + 2 * BorderWidth); - Inc(FMinSize.cy, MainLayout.DefSize.cy + BorderWidth); - FDefSize.cx := Max(DefSize.cx, MainLayout.DefSize.cx + 2 * BorderWidth); - FDefSize.cy := Min(InfiniteSize, DefSize.cy); - FMaxSize.cx := Min(MaxSize.cx, MainLayout.MaxSize.cx + 2 * BorderWidth); - FMaxSize.cy := Min(InfiniteSize, MaxSize.cy + MainLayout.DefSize.cy); -end; - -procedure TFCustomStandardDialog.Resized; -begin - if Assigned(Child) then - Child.SetBounds(Point(BorderWidth, BorderWidth), - Size(Width - 2 * BorderWidth, - Height - MainLayout.DefSize.cy - 2 * BorderWidth)); - MainLayout.SetBounds( - Point(BorderWidth, Height - MainLayout.DefSize.cy - BorderWidth), - Size(Width - 2 * BorderWidth, MainLayout.DefSize.cy - BorderWidth)); -end; - -procedure TFCustomStandardDialog.SetButtons(AButtons: TMsgDlgButtons); - - function AddBtn(const AText: String; ADefault: Boolean): TFButton; - begin - Result := TFButton.Create(Self); - Result.Text := AText; - // Result.Default := ADefault; - Result.OnClick := @StdBtnClicked; - Result.Parent := BtnLayout; - end; - -var - i: integer; - b: TFButton; -begin - // remove and free all previous buttons - for i := ComponentCount - 1 downto 0 do - begin - if Components[i] is TFButton then - begin - b := TFButton(Components[i]); - if BtnLayout.ContainsChild(b) then - BtnLayout.RemoveChild(b); - b.Free; - end; - end; - - FButtons := AButtons; - - if mbYes in FButtons then AddBtn(mbText_Yes, False); - if mbNo in FButtons then AddBtn(mbText_No, False); - if mbOk in FButtons then AddBtn(mbText_OK, True); - if mbCancel in FButtons then AddBtn(mbText_Cancel, False); - if mbApply in FButtons then AddBtn(mbText_Apply, False); - if mbAbort in FButtons then AddBtn(mbText_Abort, False); - if mbRetry in FButtons then AddBtn(mbText_Retry, False); - if mbIgnore in FButtons then AddBtn(mbText_Ignore, False); - if mbAll in FButtons then AddBtn(mbText_All, False); - if mbNoToAll in FButtons then AddBtn(mbText_NoToAll, False); - if mbYesToAll in FButtons then AddBtn(mbText_YesToAll, False); - if mbHelp in FButtons then AddBtn(mbText_Help, False); -end; - -function TFCustomStandardDialog.GetMessage: string; -begin - Result := FMessage.Text; -end; - -procedure TFCustomStandardDialog.SetMessage(const AValue: string); -begin - if FMessage.Text <> AValue then - FMessage.Text := AValue; -end; - -procedure TFCustomStandardDialog.StdBtnClicked(Sender: TObject); -begin - Close; -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguiedit.inc b/gui/fpguiedit.inc deleted file mode 100644 index 34e822cc..00000000 --- a/gui/fpguiedit.inc +++ /dev/null @@ -1,430 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Edit class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - - - { TFCustomEdit } - TBorderStyle = (bsNone, bsSingle); - - TFCustomEdit = class(TFWidget) - private - FFontColor: TColor; - FReadOnly: Boolean; - FSelStart: integer; - FSelOffset: integer; - FDrawOffset: integer; - FCursorPos: Integer; - FPasswordChar: Char; - FOnChange: TNotifyEvent; - FBorderStyle: TBorderStyle; - procedure SetFontColor(const AValue: TColor); - procedure SetPasswordChar(APasswordChar: Char); - procedure SetCursorPos(ACursorPos: Integer); - procedure SetBorderStyle(ABorderStyle: TBorderStyle); - procedure DoMousePressed(pEvent: TMousePressedEventObj); - procedure SetReadOnly(const AValue: Boolean); - procedure AdjustCursor; - function GetDrawText: string; - protected - procedure Paint(Canvas: TFCanvas); override; - function ProcessEvent(Event: TEventObj): Boolean; override; - procedure CalcSizes; override; - procedure EvKeyPressed(Key: Word; Shift: TShiftState); override; - procedure EvKeyChar(KeyChar: Char); override; - procedure EvTextChanged; override; - property CanExpandWidth default True; - property Cursor default crIBeam; - property PasswordChar: Char read FPasswordChar write SetPasswordChar default #0; - property CursorPos: Integer read FCursorPos write SetCursorPos; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - property FontColor: TColor read FFontColor write SetFontColor; - property BorderStyle: TBorderStyle read FBorderStyle write SetBorderStyle default bsSingle; - property ReadOnly: Boolean read FReadOnly write SetReadOnly default False; - procedure SetText(const AText: String); override; - public - constructor Create(AOwner: TComponent); override; - constructor Create(const pText: string; pOwner: TComponent); overload; - end; - - - TFEdit = class(TFCustomEdit) - published - property CanExpandWidth; - property Enabled; - property PasswordChar; - property Text; - property OnChange; - property FontColor; - property BorderStyle; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - -// =================================================================== -// TFCustomEdit -// =================================================================== - -constructor TFCustomEdit.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - WidgetStyle := WidgetStyle + [wsCaptureMouse, wsClickable, wsOpaque]; - FCanExpandWidth := True; - FCursor := crIBeam; - FFontColor := clWindowText; - FCursorPos := 0; - FDrawOffset := 0; - FBorderStyle := bsSingle; - FReadOnly := False; -end; - -constructor TFCustomEdit.Create(const pText: string; pOwner: TComponent); -begin - Create(pOwner); - Text := pText; -end; - -procedure TFCustomEdit.SetBorderStyle(ABorderStyle: TBorderStyle); -begin - if FBorderStyle <> ABorderStyle then - begin - FBorderStyle := ABorderStyle; - Redraw; - end; -end; - -procedure TFCustomEdit.Paint(Canvas: TFCanvas); -var - Borders: TRect; - s: string; - c: TGfxColor; - ItemRect: TRect; - tw: integer; - lSideMargins: integer; -begin - Borders := Style.GetEditBoxBorders; - lSideMargins := Borders.Left + Borders.Right; - - ItemRect := Rect(0, 0, BoundsSize.cx, BoundsSize.cy); - case FBorderStyle of - bsNone: - begin - c := Canvas.GetColor; - Style.SetUIColor(Canvas, clWindow); - Style.DrawWindowBackground(Canvas, ItemRect); - Canvas.SetColor(c); - end; - bsSingle: - Style.DrawEditBox(Canvas, ItemRect, ReadOnly); - end; - - // setup the clip rectangle - if not Canvas.IntersectClipRect(Rect(Borders.Left + 1, Borders.Top + 1, - BoundsSize.cx - Borders.Right - 1, BoundsSize.cy - Borders.Bottom - 1)) then - exit; - - // setup the correct font color - if wsEnabled in WidgetState then - Canvas.SetColor(Style.GetUIColor(FFontColor)) - else - Canvas.SetColor(Style.GetUIColor(clGrayText)); - - // paint the text - s := GetDrawText; - Canvas.TextOut(Point(-FDrawOffset + Borders.Left+2, 3), s); - - if wsHasFocus in WidgetState then - begin -(* - // drawing selection - if (FSelOffset <> 0) then - begin - if (wsHasFocus in WidgetState) and FindForm.IsActive then - begin - Include(ItemFlags, ifFocused); - Include(ItemFlags, ifSelected); - end; - - ItemRect.Left := Canvas.TextWidth(Copy(s, 1, CursorPos - FSelOffset)); - ItemRect.Top := 0; - ItemRect.Right := Canvas.TextWidth(Copy(s, 1, CursorPos)); - ItemRect.Bottom := Height; - - Style.DrawItemBefore(Canvas, ItemRect, ItemFlags); - Style.DrawText(Canvas, (Borders.TopLeft + Point(1, 1)), s, WidgetState); - Style.DrawItemAfter(Canvas, ItemRect, ItemFlags); - end; -*) - - // drawing cursor - Canvas.SetColor(Style.GetUIColor(clWindowText)); -// Style.SetUIColor(Canvas, clWindowText); - tw := Canvas.TextWidth(UTF8Copy(s, 1, FCursorPos)); - - // 2 pixel cursor line -// ItemRect.Top := Borders.Top; -// ItemRect.Left := -FDrawOffset + lSideMargins + tw; -// ItemRect.Bottom := BoundsSize.cy - Borders.Bottom; -// ItemRect.Right := ItemRect.Left + 2; -// Canvas.FillRect(ItemRect); - - // 1 pixel cursor line - Canvas.DrawLine( - Point(-FDrawOffset + lSideMargins + tw, Borders.Top), - Point(-FDrawOffset + lSideMargins + tw, BoundsSize.cy - Borders.Bottom)); - end; -end; - -function TFCustomEdit.ProcessEvent(Event: TEventObj): Boolean; -begin - if Event.InheritsFrom(TMousePressedEventObj) then - begin - DoMousePressed(TMousePressedEventObj(Event)); - end; - Result := inherited ProcessEvent(Event); -end; - -procedure TFCustomEdit.EvKeyPressed(Key: Word; Shift: TShiftState); -begin - if Shift * [ssShift, ssAlt, ssCtrl, ssMeta, ssSuper, ssHyper, ssAltGr] = [] then - begin - // Normal typing - no selections - case Key of - keyLeft, keyUp: - if CursorPos > 0 then - CursorPos := CursorPos - 1; - keyRight, keyDown: - if CursorPos < UTF8Length(FText) then - CursorPos := CursorPos + 1; - keyHome: - CursorPos := 0; - keyEnd: - CursorPos := UTF8Length(FText); - else - inherited EvKeyPressed(Key, Shift); - end; - end -{ else if Shift * [ssShift, ssAlt, ssCtrl, ssMeta, ssSuper, ssHyper, ssAltGr] = [ssShift] then - begin - Writeln('2'); - case Key of - keyHome: - begin - FSelOffset := CursorPos; - CursorPos := 0; - end; - keyEnd: - begin - FSelOffset := CursorPos; - CursorPos := Length(Text); - end; - else - EvKeyPressed(Key, Shift); - end; - end -} - else - begin - inherited EvKeyPressed(Key, Shift); - end; - AdjustCursor; - Redraw; -end; - - -procedure TFCustomEdit.EvKeyChar(KeyChar: Char); -begin - case KeyChar of - #8: { Backspace } - if FCursorPos > 0 then - begin - FText := UTF8Copy(FText, 1, FCursorPos - 1) + UTF8Copy(FText, FCursorPos + 1, UTF8Length(FText)); - FCursorPos := FCursorPos - 1; - end; - #127: { Del } - if FCursorPos < UTF8Length(FText) then - begin - FText := UTF8Copy(FText, 1, FCursorPos) + UTF8Copy(FText, FCursorPos + 2, UTF8Length(FText)); - Redraw; - end; - #32..#126, #128..#255: - begin - FText := UTF8Copy(FText, 1, FCursorPos) + KeyChar + UTF8Copy(FText, CursorPos + 1, UTF8Length(FText)); - FCursorPos := FCursorPos + 1; - end; - else - inherited EvKeyChar(KeyChar); - end; - AdjustCursor; -end; - -procedure TFCustomEdit.CalcSizes; -var - Borders: TRect; -begin - Borders := Style.GetEditBoxBorders; - FMinSize := Size(50, Borders.Top + Borders.Bottom + - FindForm.Wnd.Canvas.FontCellHeight + 2); -end; - -procedure TFCustomEdit.EvTextChanged; -begin - Redraw; - if Assigned(OnChange) then - OnChange(Self); -end; - -procedure TFCustomEdit.SetText(const AText: String); -begin - inherited SetText(AText); - FSelOffset := 0; - FCursorPos := UTF8Length(FText); - FSelStart := FCursorPos; - FDrawOffset := 0; - AdjustCursor; -end; - -procedure TFCustomEdit.SetPasswordChar(APasswordChar: Char); -begin - if APasswordChar <> PasswordChar then - begin - FPasswordChar := APasswordChar; - Redraw; - end; -end; - -procedure TFCustomEdit.SetFontColor(const AValue: TColor); -begin - if FFontColor = AValue then exit; - FFontColor := AValue; -end; - -procedure TFCustomEdit.SetCursorPos(ACursorPos: Integer); -begin - if ACursorPos <> CursorPos then - begin - FCursorPos := ACursorPos; - Redraw; - end; -end; - -procedure TFCustomEdit.DoMousePressed(pEvent: TMousePressedEventObj); -var - Borders: TRect; - cp: integer; - cpx: integer; - lSideMargin: integer; - n: integer; - cx: integer; - lText: string; -begin - if (pEvent.Button = mbLeft) then - begin - // searching for the appropriate character position - Borders := Style.GetEditBoxBorders; - lSideMargin := Borders.Left + 1; - - // Make sure we work with the correct displayed text - lText := GetDrawText; - - cp := FCursorPos; - cpx := FindForm.Wnd.Canvas.TextWidth(UTF8Copy(lText, 1, FCursorPos)) - FDrawOffset + lSideMargin; - - for n := 0 to UTF8Length(lText) do - begin - cx := FindForm.Wnd.Canvas.TextWidth(UTF8Copy(lText, 1, n)) - FDrawOffset + lSideMargin; - if abs(cx - pEvent.Position.x) < abs(cpx - pEvent.Position.x) then - begin - cpx := cx; - cp := n; - end; - end; - - FCursorPos := cp; - - if (ssShift in pEvent.Shift) then - begin - FSelOffset := FCursorPos - FSelStart; - end - else - begin - FSelStart := cp; - FSelOffset := 0; - end; - end; -end; - -procedure TFCustomEdit.SetReadOnly(const AValue: Boolean); -begin - if FReadOnly <> AValue then - begin - FReadOnly := AValue; - Redraw; - end; -end; - -procedure TFCustomEdit.AdjustCursor; -var - tw: integer; - VisibleWidth: integer; - Canvas: TFCustomCanvas; - lBorders: TRect; - lSideMargins: integer; -begin - // This is not pretty and needs to change, but if these two tests are not - // here it throws a AV when loading forms - if not Assigned(FindForm) then - Exit; //==> - if not Assigned(FindForm.FWnd) then - Exit; //==> - - Canvas := FindForm.Wnd.Canvas; - tw := Canvas.TextWidth(UTF8Copy(GetDrawText, 1, FCursorPos)); - - lBorders := Style.GetEditBoxBorders; - lSideMargins := lBorders.Left + lBorders.Right; - VisibleWidth := (Width - lSideMargins); - - if tw - FDrawOffset > VisibleWidth - 2 then - begin - FDrawOffset := tw - VisibleWidth + 2; - end - else if tw - FDrawOffset < 0 then - begin - FDrawOffset := tw; - if tw <> 0 then - dec(FDrawOffset, 2); - end; -end; - -// Return the correct text to be displayed -function TFCustomEdit.GetDrawText: string; -begin - if FPasswordChar = #0 then - Result := FText - else - begin - Result := StringOfChar(FPasswordChar, UTF8Length(FText)); - end; -end; - -{$ENDIF read_implementation} diff --git a/gui/fpguiform.inc b/gui/fpguiform.inc deleted file mode 100644 index 66d4c18f..00000000 --- a/gui/fpguiform.inc +++ /dev/null @@ -1,587 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Form class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - - { TFCustomForm } - - TFCustomForm = class(TFBinWidget) - private - FFocusedWidget: TFWidget; - FMouseCaptureWidget: TFWidget; - FLastSetCursor: TFCursor; - FWindowOptions: TFWindowOptions; - FWnd: TFCustomWindow; - FOnCreate: TNotifyEvent; - FOnDestroy: TNotifyEvent; - FOnActivate: TNotifyEvent; - FOnDeactivate: TNotifyEvent; - // Property access - function GetWnd: TFCustomWindow; - procedure SetFocusedWidget(AWidget: TFWidget); - procedure SetMouseCaptureWidget(AWidget: TFWidget); - procedure SetWindowOptions(const AValue: TFWindowOptions); - // fpGFX event handling - procedure WndClose(Sender: TObject); - procedure WndFocusIn(Sender: TObject); - procedure WndFocusOut(Sender: TObject); - procedure WndHide(Sender: TObject); - procedure WndKeyPressed(Sender: TObject; AKey: Word; AShift: TShiftState); - procedure WndKeyReleased(Sender: TObject; AKey: Word; AShift: TShiftState); - procedure WndKeyChar(Sender: TObject; AKeyChar: Char); - procedure WndMouseEnter(Sender: TObject; AShift: TShiftState; const AMousePos: TPoint); - procedure WndMouseLeave(Sender: TObject); - procedure WndMouseMoved(Sender: TObject; AShift: TShiftState; const AMousePos: TPoint); - procedure WndMousePressed(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint); - procedure WndMouseReleased(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint); - procedure WndMouseWheel(Sender: TObject; AShift: TShiftState; AWheelDelta: Single; const AMousePos: TPoint); - procedure WndPaint(Sender: TObject; const ARect: TRect); - procedure WndMove(Sender: TObject); - procedure WndResize(Sender: TObject); - procedure WndShow(Sender: TObject); - protected - FBorderWidth: Integer; - FIsActive: Boolean; - FResizedByUser: Boolean; - FPositionSpecified: Boolean; - procedure Loaded; override; - procedure Paint(Canvas: TFCanvas); override; - procedure Resized; override; - function WidgetCoords(AWidget: TFWidget): TPoint; - function ProcessEvent(Event: TEventObj): Boolean; override; - procedure CalcSizes; override; - procedure EvTextChanged; override; - procedure CreateWnd; - property CanExpandWidth default True; - property CanExpandHeight default True; - property Cursor default crArrow; - property BorderWidth: Integer read FBorderWidth write FBorderWidth; - property OnCreate: TNotifyEvent read FOnCreate write FOnCreate; - property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy; - property OnActivate: TNotifyEvent read FOnActivate write FOnActivate; // Get focus - property OnDeactivate: TNotifyEvent read FOnDeactivate write FOnDeactivate; // Loose focus - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure Show; override; - procedure ShowModal; - procedure Close; virtual; - procedure SetPosition(APosition: TPoint); - property FocusedWidget: TFWidget read FFocusedWidget write SetFocusedWidget; - property IsActive: Boolean read FIsActive; - property MouseCaptureWidget: TFWidget read FMouseCaptureWidget write SetMouseCaptureWidget; - property WindowOptions: TFWindowOptions read FWindowOptions write SetWindowOptions; - property Wnd: TFCustomWindow read GetWnd; - end; - - - TFForm = class(TFCustomForm) - published - property BorderWidth; - property Color; - property Enabled; - property Text; - property WindowOptions; - property OnCreate; - property OnDestroy; - property OnActivate; - property OnDeactivate; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - -// =================================================================== -// TFCustomForm -// =================================================================== - -constructor TFCustomForm.Create(AOwner: TComponent); -begin - if not Assigned(FStyle) then - FStyle := gStyleManager.DefaultStyle; - - inherited Create(AOwner); - - FCanExpandWidth := True; - FCanExpandHeight := True; - FCursor := crArrow; - FWindowOptions := [woWindow]; -end; - - -destructor TFCustomForm.Destroy; -begin - if Assigned(OnDestroy) then - OnDestroy(Self); - if Assigned(FWnd) then - FWnd.Free; - -// GFApplication.RemoveWindow(Self); - - inherited Destroy; -end; - - -procedure TFCustomForm.Show; -begin - LAYOUTTRACE('TFCustomForm.Show for %s:%s', [Name, ClassName]); - - FVisible := True; - GFApplication.AddWindow(Wnd); - Wnd.Show; -end; - -procedure TFCustomForm.ShowModal; -begin - Include(WindowOptions, woModal); - Show; -end; - -procedure TFCustomForm.Close; -begin - LAYOUTTRACE('TFCustomForm.Close for %s:%s', [Name, ClassName]); - - FVisible := False; - - FWnd.Free; - FWnd := nil; -end; - - -procedure TFCustomForm.SetPosition(APosition: TPoint); -begin - if Assigned(FWnd) then - Wnd.SetPosition(APosition) - else - begin - FOrigin := APosition; - FPositionSpecified := True; - end; -end; - - -function TFCustomForm.WidgetCoords(AWidget: TFWidget): TPoint; -begin - Result := Point(0, 0); - while AWidget <> Self do - begin - Result := Result + AWidget.Parent.ClientToWidget(AWidget.Origin); - AWidget := AWidget.Parent; - end; -end; - - -procedure TFCustomForm.Loaded; -begin - inherited Loaded; - if Assigned(OnCreate) then - OnCreate(Self); -end; - - -procedure TFCustomForm.Paint(Canvas: TFCanvas); -begin - inherited Paint(Canvas); - Style.DrawWindowBackground(Canvas, Rect(0, 0, Width, Height)); -end; - - -procedure TFCustomForm.CalcSizes; -begin - if Assigned(Child) then - begin - FMinSize := Child.MinSize + 2 * BorderWidth; - FDefSize := Child.DefSize + 2 * BorderWidth; - FMaxSize.cx := Min(InfiniteSize, Child.MaxSize.cx + 2 * BorderWidth); - FMaxSize.cy := Min(InfiniteSize, Child.MaxSize.cy + 2 * BorderWidth); - end; -end; - - -function TFCustomForm.ProcessEvent(Event: TEventObj): Boolean; -begin - if Event is TDestroyEventObj then - FWnd := nil; - - Result := inherited ProcessEvent(Event); -end; - - -procedure TFCustomForm.EvTextChanged; -begin - if Assigned(FWnd) then - Wnd.Title := Text; -end; - - -procedure TFCustomForm.CreateWnd; -var - ParentWnd: TFCustomWindow; -begin - if Parent is TFCustomForm then - ParentWnd := TFCustomForm(Parent).Wnd - else - ParentWnd := nil; - - FWnd := TFWindow.Create(ParentWnd, WindowOptions); - - if FPositionSpecified then - Wnd.SetPosition(Origin); - - Wnd.OnClose := @WndClose; - Wnd.OnFocusIn := @WndFocusIn; - Wnd.OnFocusOut := @WndFocusOut; - Wnd.OnHide := @WndHide; - Wnd.OnKeyPressed := @WndKeyPressed; - Wnd.OnKeyReleased := @WndKeyReleased; - Wnd.OnKeyChar := @WndKeyChar; - Wnd.OnMouseEnter := @WndMouseEnter; - Wnd.OnMouseLeave := @WndMouseLeave; - Wnd.OnMouseMove := @WndMouseMoved; - Wnd.OnMousePressed := @WndMousePressed; - Wnd.OnMouseReleased := @WndMouseReleased; - Wnd.OnMouseWheel := @WndMouseWheel; - Wnd.OnPaint := @WndPaint; - Wnd.OnMove := @WndMove; - Wnd.OnResize := @WndResize; - Wnd.OnShow := @WndShow; - - if Length(Text) = 0 then - Wnd.Title := GFApplication.Title - else - Wnd.Title := Text; -end; - - -{ -procedure TFCustomForm.ApplyNewLayout; -var - OrigW, OrigH: Integer; -begin - Wnd.SetMinMaxClientSize(MinW, MinH, MaxW, MaxH); - - OrigW := ClientRect.Right; - OrigH := ClientRect.Bottom; - - if (ClientRect.Right < MinW) or (ClientRect.Bottom < MinW) or - (ClientRect.Right > MaxW) or (ClientRect.Bottom > MaxH) then - begin - if ClientRect.Right < MinW then - FClientRect.Right := MinW; - if ClientRect.Bottom < MinH then - FClientRect.Bottom := MinH; - if ClientRect.Right > MaxW then - FClientRect.Right := MaxW; - if ClientRect.Bottom > MaxH then - FClientRect.Bottom := MaxH; -// Wnd.SetClientSize(ClientRect.Right, ClientRect.Bottom); - end; - - if not FResizedByUser then - begin - FClientRect.Right := DefW; - FClientRect.Bottom := DefH; - end; - - if (ClientRect.Right <> OrigW) or (ClientRect.Bottom <> OrigH) then - begin - LAYOUTTRACE('TFCustomForm.EvRecalcLayout for %s:%s: Setting size to %dx%d', - [Name, ClassName, ClientRect.Right, ClientRect.Bottom]); - Wnd.SetClientSize(ClientRect.Right, ClientRect.Bottom); - end; -end;} - - -procedure TFCustomForm.Resized; -begin - ClientRect.Right := Wnd.ClientWidth; - ClientRect.Bottom := Wnd.ClientHeight; - if Assigned(Child) then - Child.SetBounds(Point(BorderWidth, BorderWidth), - TSize(ClientRect.BottomRight) - 2 * BorderWidth); -end; - - -procedure TFCustomForm.SetFocusedWidget(AWidget: TFWidget); -begin - if AWidget <> FocusedWidget then - begin - if Assigned(FocusedWidget) then - begin - Exclude(FFocusedWidget.WidgetState, wsHasFocus); - FocusedWidget.EvFocusChanged; - end; - FFocusedWidget := AWidget; - if Assigned(FocusedWidget) then - begin - Include(FFocusedWidget.WidgetState, wsHasFocus); - FocusedWidget.EvFocusChanged; - end; - end; -end; - -function TFCustomForm.GetWnd: TFCustomWindow; -begin - if not Assigned(FWnd) then - begin - CreateWnd; - // !!!: Doesn't handle a set initial size yet - SendEvent(TCalcSizesEventObj.Create(Self)); - Wnd.SetMinMaxClientSize(MinSize, MaxSize); - Wnd.SetClientSize(DefSize); - end; - Result := FWnd; -end; - - -procedure TFCustomForm.SetMouseCaptureWidget(AWidget: TFWidget); -begin - if AWidget <> FMouseCaptureWidget then - begin - FMouseCaptureWidget := AWidget; - if Assigned(AWidget) then - Wnd.CaptureMouse - else - Wnd.ReleaseMouse; - end; -end; - -procedure TFCustomForm.SetWindowOptions(const AValue: TFWindowOptions); -begin - if FWindowOptions=AValue then exit; - FWindowOptions:=AValue; - if Assigned(FWnd) then Wnd.WindowOptions := AValue; -end; - - -// GfxWindow message handlers - -procedure TFCustomForm.WndClose(Sender: TObject); -begin - SendEvent(TDestroyEventObj.Create(Self)); - FMouseCaptureWidget := nil; -end; - -procedure TFCustomForm.WndFocusIn(Sender: TObject); -begin - FIsActive := True; - if Assigned(FocusedWidget) then - FocusedWidget.EvFocusChanged; - if Assigned(OnActivate) then - OnActivate(Self); -end; - -procedure TFCustomForm.WndFocusOut(Sender: TObject); -begin - FIsActive := False; - if Assigned(FocusedWidget) then - FocusedWidget.EvFocusChanged; - if Assigned(OnDeactivate) then - OnDeactivate(Self); -end; - -procedure TFCustomForm.WndHide(Sender: TObject); -begin - LAYOUTTRACE('TFCustomForm.WndHide for %s:%s', [Name, ClassName]); - if wsIsVisible in WidgetState then - begin - Exclude(WidgetState, wsIsVisible); - SendEvent(TVisibilityChangeEventObj.Create(Self)); - Update; - end; -end; - -procedure TFCustomForm.WndKeyPressed(Sender: TObject; - AKey: Word; AShift: TShiftState); -begin - if Assigned(FocusedWidget) then - FocusedWidget.EvKeyPressed(AKey, AShift) - else - EvKeyPressed(AKey, AShift); -end; - -procedure TFCustomForm.WndKeyReleased(Sender: TObject; - AKey: Word; AShift: TShiftState); -begin - if Assigned(FocusedWidget) then - FocusedWidget.EvKeyReleased(AKey, AShift) - else - EvKeyReleased(AKey, AShift); -end; - -procedure TFCustomForm.WndKeyChar(Sender: TObject; AKeyChar: Char); -begin - if Assigned(FocusedWidget) then - FocusedWidget.EvKeyChar(AKeyChar) - else - EvKeyChar(AKeyChar); -end; - -procedure TFCustomForm.WndMouseEnter(Sender: TObject; - AShift: TShiftState; const AMousePos: TPoint); -begin - if wsEnabled in WidgetState then - DoMouseEnter(AShift, AMousePos); -end; - - -procedure TFCustomForm.WndMouseLeave(Sender: TObject); -begin - if wsEnabled in WidgetState then - SendEvent(TMouseLeaveEventObj.Create(Self)); -end; - - -procedure TFCustomForm.WndMouseMoved(Sender: TObject; - AShift: TShiftState; const AMousePos: TPoint); -{var - dx, dy: Integer; - IsInside: Boolean; -begin - if Assigned(MouseCaptureWidget) then - begin - WidgetCoords(MouseCaptureWidget, dx, dy); - - // Emulate MouseEnter/MouseLeave events - IsInside := (x >= dx) and (y >= dy) and - (x < dx + MouseCaptureWidget.Width) and (y < dy + MouseCaptureWidget.Height); - if IsInside and not (wsMouseInside in MouseCaptureWidget.WidgetState) then - MouseCaptureWidget.EvMouseEnter(Shift, x - dy, y - dy) - else if (not IsInside) and (wsMouseInside in MouseCaptureWidget.WidgetState) then - MouseCaptureWidget.EvMouseLeave; - - MouseCaptureWidget.SendEvent( - TMouseMovedEventObj.Create(Self, Shift, x - dx, y - dy)); - end else} - - procedure SendMouseEvents(Widget: TFWidget; APos: TPoint); - var - LeaveCheckEvent: TMouseLeaveCheckEventObj; - begin - LeaveCheckEvent := TMouseLeaveCheckEventObj.Create(Self, AShift, APos); - LeaveCheckEvent.AddRef; - Widget.SendEvent(LeaveCheckEvent); - Widget.SendEvent(TMouseMoveEventObj.Create(Self, AShift, APos)); - if (LeaveCheckEvent.NewCursor <> crDefault) and - (LeaveCheckEvent.NewCursor <> Wnd.Cursor) then - Wnd.Cursor := LeaveCheckEvent.NewCursor; - LeaveCheckEvent.Free; - end; - -begin - if wsEnabled in WidgetState then - begin - if Assigned(MouseCaptureWidget) then - begin - SendMouseEvents(MouseCaptureWidget, - AMousePos - WidgetCoords(MouseCaptureWidget)); - if not Assigned(MouseCaptureWidget) then - SendMouseEvents(Self, AMousePos); - end else - SendMouseEvents(Self, AMousePos); - end; { if } -end; - - -procedure TFCustomForm.WndMousePressed(Sender: TObject; AButton: TMouseButton; - AShift: TShiftState; const AMousePos: TPoint); -begin - if wsEnabled in WidgetState then - begin - if Assigned(MouseCaptureWidget) then - begin - MouseCaptureWidget.SendEvent( - TMousePressedEventObj.Create(Self, AButton, AShift, - AMousePos - WidgetCoords(MouseCaptureWidget))); - if not Assigned(MouseCaptureWidget) then - SendEvent(TMouseMoveEventObj.Create(Self, AShift, AMousePos)); - end - else - SendEvent(TMousePressedEventObj.Create(Self, AButton, AShift, AMousePos)); - end; { if } -end; - - -procedure TFCustomForm.WndMouseReleased(Sender: TObject; AButton: TMouseButton; - AShift: TShiftState; const AMousePos: TPoint); -begin - if wsEnabled in WidgetState then - if Assigned(MouseCaptureWidget) then - begin - MouseCaptureWidget.SendEvent( - TMouseReleasedEventObj.Create(Self, AButton, AShift, - AMousePos - WidgetCoords(MouseCaptureWidget))); - if not Assigned(MouseCaptureWidget) then - SendEvent(TMouseMoveEventObj.Create(Self, AShift, AMousePos)); - end else - SendEvent(TMouseReleasedEventObj.Create(Self, - AButton, AShift, AMousePos)); -end; - - -procedure TFCustomForm.WndMouseWheel(Sender: TObject; AShift: TShiftState; - AWheelDelta: Single; const AMousePos: TPoint); -begin - if wsEnabled in WidgetState then - SendEvent(TMouseWheelEventObj.Create(Self, AShift, AWheelDelta, AMousePos)); -end; - - -procedure TFCustomForm.WndPaint(Sender: TObject; const ARect: TRect); -begin - LAYOUTTRACE('TFCustomForm.WndPaint for %s:%s (%d/%d-%d/%d)', - [Name, ClassName, ARect.Left, ARect.Top, ARect.Right, ARect.Bottom]); - if wsIsVisible in WidgetState then - SendEvent(TPaintEventObj.Create(Self, TFCanvas(Wnd.Canvas))); -end; - - -procedure TFCustomForm.WndMove(Sender: TObject); -begin - FOrigin := Point(Wnd.Left, Wnd.Top); -end; - - -procedure TFCustomForm.WndResize(Sender: TObject); -begin - LAYOUTTRACE('TFCustomForm.WndResize for %s:%s: New size is %dx%d. Visible? %d', - [Name, ClassName, Wnd.Width, Wnd.Height, Ord(wsIsVisible in WidgetState)]); - if Visible or (wsIsVisible in WidgetState) then - begin - FResizedByUser := (Wnd.Width <> DefSize.cx) or (Wnd.Height <> DefSize.cy); - SetBounds(Origin, gfxBase.Size(Wnd.Width, Wnd.Height)); - end; -end; - - -procedure TFCustomForm.WndShow(Sender: TObject); -begin - LAYOUTTRACE('TFCustomForm.WndShow for %s:%s', [Name, ClassName]); - if not (wsIsVisible in WidgetState) then - begin - Include(WidgetState, wsIsVisible); - SendEvent(TVisibilityChangeEventObj.Create(Self)); - end; -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguigrid.inc b/gui/fpguigrid.inc deleted file mode 100644 index 4747dea6..00000000 --- a/gui/fpguigrid.inc +++ /dev/null @@ -1,657 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Grid class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - -// ------------------------------------------------------------------- -// TFCustomGrid -// ------------------------------------------------------------------- - - EInvalidGridOperation = class(Exception); - - TGridDrawState = set of (gdSelected, gdFocused, gdFixed); - - -// PIntegerArray = ^TIntegerArray; -// TIntegerArray = array[0..(MAXINT div SizeOf(Integer))-1] of Integer; - - - TFCustomGrid = class(TFWidget) - private - FColCount: Integer; - FRowCount: Integer; - FFixedCols: Integer; - FFixedRows: Integer; - FDefaultColWidth: Integer; - FDefaultRowHeight: Integer; - FGridWidth: Integer; - FGridHeight: Integer; - FFixedWidth: Integer; - FFixedHeight: Integer; - FColWidths, FRowHeights: PIntegerArray; - procedure SetColCount(AColCount: Integer); - procedure SetRowCount(ARowCount: Integer); - procedure SetFixedCols(AFixedCols: Integer); - procedure SetFixedRows(AFixedRows: Integer); - procedure SetDefaultColWidth(AWidth: Integer); - procedure SetDefaultRowHeight(AHeight: Integer); - function GetColWidths(ACol: Integer): Integer; - procedure SetColWidths(ACol, AWidth: Integer); - function GetRowHeights(ARow: Integer): Integer; - procedure SetRowHeights(ARow, AHeight: Integer); - procedure HorzScrollBarScroll(Sender: TObject; var APosition: Integer); - procedure VertScrollBarScroll(Sender: TObject; var APosition: Integer); - protected - ScrollingSupport: TScrollingSupport; - procedure Paint(Canvas: TFCanvas); override; - function ProcessEvent(Event: TEventObj): Boolean; override; - function DistributeEvent(Event: TEventObj): Boolean; override; - procedure CalcSizes; override; - procedure Resized; override; - procedure ColWidthsChanged; dynamic; - procedure DrawCell(ACanvas: TFCanvas; ACol, ARow: Integer; ARect: TRect; AState: TGridDrawState); virtual; abstract; - procedure RowHeightsChanged; dynamic; - procedure SizeChanged(OldColCount, OldRowCount: Integer); dynamic; - property CanExpandWidth default True; - property CanExpandHeight default True; - property ColCount: Integer read FColCount write SetColCount default 5; - property RowCount: Integer read FRowCount write SetRowCount default 5; - property FixedCols: Integer read FFixedCols write SetFixedCols default 1; - property FixedRows: Integer read FFixedRows write SetFixedRows default 1; - property GridWidth: Integer read FGridWidth; - property GridHeight: Integer read FGridHeight; - property FixedWidth: Integer read FFixedWidth; - property FixedHeight: Integer read FFixedHeight; - property DefaultColWidth: Integer read FDefaultColWidth write SetDefaultColWidth default 64; - property DefaultRowHeight: Integer read FDefaultRowHeight write SetDefaultRowHeight default 24; - property ColWidths[ACol: Integer]: Integer read GetColWidths write SetColWidths; - property RowHeights[ARow: Integer]: Integer read GetRowHeights write SetRowHeights; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - end; - - -// ------------------------------------------------------------------- -// TFDrawGrid -// ------------------------------------------------------------------- - - TDrawCellEvent = procedure(Sender: TObject; ACanvas: TFCanvas; - ACol, ARow: Integer; Rect: TRect; State: TGridDrawState) of object; - - - TFDrawGrid = class(TFCustomGrid) - private - FOnDrawCell: TDrawCellEvent; - protected - procedure DrawCell(ACanvas: TFCanvas; ACol, ARow: Integer; ARect: TRect; AState: TGridDrawState); override; - public - function CellRect(ACol, ARow: Integer): TRect; - property ColWidths; - property RowHeights; - published - property CanExpandWidth; - property CanExpandHeight; - property ColCount; - property RowCount; - property FixedCols; - property FixedRows; - property DefaultColWidth; - property DefaultRowHeight; - property OnDrawCell: TDrawCellEvent read FOnDrawCell write FOnDrawCell; - end; - - -// ------------------------------------------------------------------- -// TFStringGrid -// ------------------------------------------------------------------- - - PCells = ^TCells; - TCells = array[0..(1 shl 30) div SizeOf(AnsiString)] of AnsiString; - - - TFStringGrid = class(TFDrawGrid) - private - CellStrings: PCells; - function GetCells(ACol, ARow: Integer): String; - procedure SetCells(ACol, ARow: Integer; const AValue: String); - protected - //function GetEditText(ACol, ARow: Integer): String; override; - //procedure SetEditText(ACol, ARow: Integer; const AValue: String); override; - procedure SizeChanged(OldColCount, OldRowCount: Integer); override; - //procedure ColumnMoved(AFrom, ATo: Integer); override; - //procedure RowMoved(AFrom, ATo: Integer); override; - procedure DrawCell(ACanvas: TFCanvas; ACol, ARow: Integer; ARect: TRect; AState: TGridDrawState); override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property Cells[ACol, ARow: Integer]: String read GetCells write SetCells; - property Cols[Index: Integer]: TStrings; - property Objects[ACol, ARow: Integer]: TObject; - property Rows[Index: Integer]: TStrings; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - - -resourcestring - - SGridIndexOutOfRange = 'Grid index out of range'; - -// =================================================================== -// TFCustomGrid -// =================================================================== - -// public methods - -constructor TFCustomGrid.Create(AOwner: TComponent); -var - i: Integer; -begin - inherited Create(AOwner); - WidgetStyle := WidgetStyle + [wsOpaque]; - FCanExpandWidth := True; - FCanExpandHeight := True; - ScrollingSupport := TScrollingSupport.Create(Self); - ScrollingSupport.HorzScrollBar.OnScroll := @HorzScrollBarScroll; - ScrollingSupport.VertScrollBar.OnScroll := @VertScrollBarScroll; - - FDefaultColWidth := 64; - FDefaultRowHeight := 24; - FColCount := 5; - FRowCount := 5; - FFixedCols := 1; - FFixedRows := 1; - GetMem(FColWidths, FColCount * SizeOf(Integer)); - GetMem(FRowHeights, FRowCount * SizeOf(Integer)); - - for i := 0 to 4 do - begin - FColWidths^[i] := FDefaultColWidth; - FRowHeights^[i] := FDefaultRowHeight; - end; - ColWidthsChanged; - RowHeightsChanged; -end; - -destructor TFCustomGrid.Destroy; -begin - FreeMem(FRowHeights); - FreeMem(FColWidths); - ScrollingSupport.Free; - inherited Destroy; -end; - - -// protected methods - -procedure TFCustomGrid.Paint(Canvas: TFCanvas); -var - x1, y1, x2, y2, x, y, Sum: Integer; - CellRect: TRect; - GridDrawState: TGridDrawState; -begin - if not Canvas.IntersectClipRect(ScrollingSupport.ClientRect) then - exit; - - with Canvas.GetClipRect do - begin - x1 := Left; - y1 := Top; - x2 := Right; - y2 := Bottom; - end; - - { Initialize these for the case that the cell drawing loop won't get - executed at all: } - CellRect.Left := 0; - CellRect.Right := 0; - - // Draw the cells - - CellRect.Top := ScrollingSupport.ClientRect.Top; - y := 0; - while y < RowCount do - begin - CellRect.Bottom := CellRect.Top + RowHeights[y]; - if CellRect.Bottom > y1 then - begin - CellRect.Left := ScrollingSupport.ClientRect.Left; - x := 0; - while x < ColCount do - begin - CellRect.Right := CellRect.Left + ColWidths[x]; - if CellRect.Right > x1 then - begin - GridDrawState := []; - if (x < FixedCols) or (y < FixedRows) then - Include(GridDrawState, gdFixed); - - Canvas.SaveState; - if gdFixed in GridDrawState then - begin - with CellRect do - Style.DrawButtonFace(Canvas, - Rect(Left, Top, Right + 1, Bottom + 1), []); - Style.SetUIColor(Canvas, clBtnText); - end else - begin - Style.SetUIColor(Canvas, clWindow); - Canvas.FillRect(CellRect); - Style.SetUIColor(Canvas, clWindowText); - end; - DrawCell(Canvas, x, y, CellRect, GridDrawState); - Canvas.RestoreState; - end; - - CellRect.Left := CellRect.Right + 1; - if CellRect.Left >= x2 then - break; - - Inc(x); - if x = FixedRows then - Inc(x, ScrollingSupport.HorzScrollBar.Position); - end; - end; - - CellRect.Top := CellRect.Bottom + 1; - if CellRect.Top >= y2 then - break; - - Inc(y); - if y = FixedRows then - Inc(y, ScrollingSupport.VertScrollBar.Position); - end; - - - // Draw the grid lines - - Style.SetUIColor(Canvas, cl3DFace); - - y := 0; - Sum := ScrollingSupport.ClientRect.Top; - while y < RowCount do - begin - Inc(Sum, RowHeights[y]); - if (y >= FixedRows) and (Sum >= y1) then - Canvas.DrawLine(Point(ScrollingSupport.ClientRect.Left + FixedWidth, Sum), - Point(CellRect.Right + 1, Sum)); - Inc(Sum); - if Sum >= y2 then - break; - - Inc(y); - if y = FixedRows then - Inc(y, ScrollingSupport.VertScrollBar.Position); - end; - - x := 0; - Sum := ScrollingSupport.ClientRect.Left; - while x < ColCount do - begin - Inc(Sum, ColWidths[x]); - if (x >= FixedCols) and (Sum >= x1) then - Canvas.DrawLine(Point(Sum, ScrollingSupport.ClientRect.Top + FixedHeight), - Point(Sum, CellRect.Bottom)); - Inc(Sum); - if Sum >= x2 then - break; - - Inc(x); - if x = FixedCols then - Inc(x, ScrollingSupport.HorzScrollBar.Position); - end; - - - // Clear the empty space right and below the grid itself - - Style.SetUIColor(Canvas, clWindow); - if CellRect.Right + 1 < x2 then - Canvas.FillRect(Rect(CellRect.Right + 1, y1, x2, y2)); - if CellRect.Bottom + 1 < y2 then - Canvas.FillRect(Rect(x1, CellRect.Top, CellRect.Right + 1, y2)); -end; - -function TFCustomGrid.ProcessEvent(Event: TEventObj): Boolean; -begin - Result := ScrollingSupport.ProcessEvent(Event) or - inherited ProcessEvent(Event); -end; - -function TFCustomGrid.DistributeEvent(Event: TEventObj): Boolean; -begin - Result := ScrollingSupport.DistributeEvent(Event) or - inherited DistributeEvent(Event); -end; - -procedure TFCustomGrid.CalcSizes; -begin - ScrollingSupport.CalcSizes; -end; - -procedure TFCustomGrid.Resized; -begin - ScrollingSupport.Resized; -end; - -procedure TFCustomGrid.ColWidthsChanged; -var - i: Integer; -begin - FGridWidth := 0; - for i := 0 to ColCount - 1 do - Inc(FGridWidth, ColWidths[i] + 1); - if FGridWidth > 0 then - Dec(FGridWidth); - - FFixedWidth := 0; - for i := 0 to FixedCols - 1 do - Inc(FFixedWidth, ColWidths[i] + 1); - if FFixedWidth > 0 then - Dec(FFixedWidth); -end; - -procedure TFCustomGrid.RowHeightsChanged; -var - i: Integer; -begin - FGridHeight := 0; - for i := 0 to RowCount - 1 do - Inc(FGridHeight, RowHeights[i] + 1); - if FGridHeight > 0 then - Dec(FGridHeight); - - FFixedHeight := 0; - for i := 0 to FixedRows - 1 do - Inc(FFixedHeight, RowHeights[i] + 1); - if FFixedHeight > 0 then - Dec(FFixedHeight); -end; - -procedure TFCustomGrid.SizeChanged(OldColCount, OldRowCount: Integer); -begin - Assert(OldColCount = OldColCount); - Assert(OldRowCount = OldRowCount); - // This dynamic method is only used for descendants of TFCustomGrid -end; - - -// private methods - -procedure TFCustomGrid.SetColCount(AColCount: Integer); -var - OldColCount, i: Integer; -begin - if AColCount <> FColCount then - begin - OldColCount := FColCount; - FColCount := AColCount; - - ReallocMem(FColWidths, FColCount * SizeOf(Integer)); - for i := OldColCount to FColCount - 1 do - FColWidths^[i] := FDefaultColWidth; - - ScrollingSupport.HorzScrollBar.Max := ColCount - FixedCols - 1; - - ColWidthsChanged; - SizeChanged(OldColCount, FRowCount); - end; -end; - -procedure TFCustomGrid.SetRowCount(ARowCount: Integer); -var - OldRowCount, i: Integer; -begin - if ARowCount <> FRowCount then - begin - OldRowCount := FRowCount; - FRowCount := ARowCount; - - ReallocMem(FRowHeights, FRowCount * SizeOf(Integer)); - for i := OldRowCount to FRowCount - 1 do - FRowHeights^[i] := FDefaultRowHeight; - - ScrollingSupport.VertScrollBar.Max := RowCount - FixedRows - 1; - - RowHeightsChanged; - SizeChanged(FColCount, OldRowCount); - end; -end; - -procedure TFCustomGrid.SetFixedCols(AFixedCols: Integer); -begin - if AFixedCols <> FixedCols then - begin - FFixedCols := AFixedCols; - ScrollingSupport.HorzScrollBar.Max := ColCount - FixedCols - 1; - end; -end; - -procedure TFCustomGrid.SetFixedRows(AFixedRows: Integer); -begin - if AFixedRows <> FixedRows then - begin - FFixedRows := AFixedRows; - ScrollingSupport.VertScrollBar.Max := RowCount - FixedRows - 1; - end; -end; - -procedure TFCustomGrid.SetDefaultColWidth(AWidth: Integer); -var - i: Integer; -begin - if AWidth <> FDefaultColWidth then - begin - FDefaultColWidth := AWidth; - for i := 0 to FColCount - 1 do - FColWidths^[i] := AWidth; - ColWidthsChanged; - end; -end; - -procedure TFCustomGrid.SetDefaultRowHeight(AHeight: Integer); -var - i: Integer; -begin - if AHeight <> FDefaultRowHeight then - begin - FDefaultRowHeight := AHeight; - for i := 0 to FRowCount - 1 do - FRowHeights^[i] := AHeight; - RowHeightsChanged; - end; -end; - -function TFCustomGrid.GetColWidths(ACol: Integer): Integer; -begin - if (ACol < 0) or (ACol >= FColCount) then - raise EInvalidGridOperation(SGridIndexOutOfRange); - Result := FColWidths^[ACol]; -end; - -procedure TFCustomGrid.SetColWidths(ACol, AWidth: Integer); -begin - if (ACol < 0) or (ACol >= FColCount) then - raise EInvalidGridOperation(SGridIndexOutOfRange); - FColWidths^[ACol] := AWidth; -end; - -function TFCustomGrid.GetRowHeights(ARow: Integer): Integer; -begin - if (ARow < 0) or (ARow >= FRowCount) then - raise EInvalidGridOperation(SGridIndexOutOfRange); - Result := FRowHeights^[ARow]; -end; - -procedure TFCustomGrid.SetRowHeights(ARow, AHeight: Integer); -begin - if (ARow < 0) or (ARow >= FRowCount) then - raise EInvalidGridOperation(SGridIndexOutOfRange); - FRowHeights^[ARow] := AHeight; -end; - -procedure TFCustomGrid.HorzScrollBarScroll(Sender: TObject; - var APosition: Integer); -var - i, Delta: Integer; - r: TRect; -begin - Delta := 0; - if APosition > ScrollingSupport.HorzScrollBar.Position then - for i := ScrollingSupport.HorzScrollBar.Position to APosition - 1 do - Dec(Delta, ColWidths[i + FixedCols] + 1) - else - for i := APosition to ScrollingSupport.HorzScrollBar.Position - 1 do - Inc(Delta, ColWidths[i + FixedCols] + 1); - - // Scroll the horizontal fixed cells - r := ScrollingSupport.ClientRect; - Inc(r.Left, FixedWidth + 1); - if r.Left <= r.Right then - begin - if Delta < 0 then // Scrolling to the right side - Dec(r.Left, Delta) - else // Scrolling to the left side - Dec(r.Right, Delta); - Scroll(r, Delta, 0); - end; -end; - -procedure TFCustomGrid.VertScrollBarScroll(Sender: TObject; - var APosition: Integer); -var - i, Delta: Integer; - r: TRect; -begin - Delta := 0; - if APosition > ScrollingSupport.VertScrollBar.Position then - for i := ScrollingSupport.VertScrollBar.Position to APosition - 1 do - Dec(Delta, RowHeights[i + FixedRows] + 1) - else - for i := APosition to ScrollingSupport.VertScrollBar.Position - 1 do - Inc(Delta, RowHeights[i + FixedRows] + 1); - - // Scroll the grid body - r := ScrollingSupport.ClientRect; - Inc(r.Top, FixedHeight + 1); - if r.Top <= r.Bottom then - begin - if Delta < 0 then // Scrolling downwards - Dec(r.Top, Delta) - else // Scrolling upwards - Dec(r.Bottom, Delta); - Scroll(r, 0, Delta); - end; -end; - - -// ------------------------------------------------------------------- -// TFDrawGrid -// ------------------------------------------------------------------- - -procedure TFDrawGrid.DrawCell(ACanvas: TFCanvas; ACol, ARow: Integer; - ARect: TRect; - AState: TGridDrawState); -begin - if Assigned(OnDrawCell) then - OnDrawCell(Self, ACanvas, ACol, ARow, ARect, AState); -end; - -function TFDrawGrid.CellRect(ACol, ARow: Integer): TRect; -var - i: Integer; -begin - Result.Left := 0; - for i := 0 to ACol - 1 do - Inc(Result.Left, ColWidths[i]); - Result.Right := Result.Left + ColWidths[ACol]; - - Result.Top := 0; - for i := 0 to ARow - 1 do - Inc(Result.Top, RowHeights[i]); - Result.Bottom := Result.Top + RowHeights[ARow]; -end; - - -// ------------------------------------------------------------------- -// TFStringGrid -// ------------------------------------------------------------------- - -function TFStringGrid.GetCells(ACol, ARow: Integer): String; -begin - if (ACol >= 0) and (ARow >= 0) and (ACol < ColCount) and (ARow < RowCount) then - Result := CellStrings^[ARow * ColCount + ACol] - else - SetLength(Result, 0); -end; - -procedure TFStringGrid.SetCells(ACol, ARow: Integer; const AValue: String); -begin - if (ACol >= 0) and (ARow >= 0) and (ACol < ColCount) and (ARow < RowCount) then - CellStrings^[ARow * ColCount + ACol] := AValue; -end; - -procedure TFStringGrid.SizeChanged(OldColCount, OldRowCount: Integer); -var - Count: Integer; -begin - inherited SizeChanged(OldColCount, OldRowCount); - ReallocMem(CellStrings, ColCount * RowCount * SizeOf(AnsiString)); - Count := ColCount * RowCount - OldColCount * OldRowCount; - if Count > 0 then - FillChar(CellStrings^[OldColCount * OldRowCount], - Count * SizeOf(AnsiString), #0); -end; - -procedure TFStringGrid.DrawCell(ACanvas: TFCanvas; ACol, ARow: Integer; - ARect: TRect; - AState: TGridDrawState); -var - s: String; -begin - // WriteLn('TFStringGrid.DrawCell(', ACol, ', ', ARow, ', ', Integer(AState), ');'); - s := Cells[ACol, ARow]; - if Length(s) > 0 then - ACanvas.TextOut(ARect.TopLeft + Point(2, 2), s); - if Assigned(OnDrawCell) then - OnDrawCell(Self, ACanvas, ACol, ARow, ARect, AState); -end; - -constructor TFStringGrid.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - Self.SizeChanged(0, 0); -end; - -destructor TFStringGrid.Destroy; -var - i: Integer; -begin - for i := 0 to RowCount * ColCount - 1 do - CellStrings^[i] := ''; - FreeMem(CellStrings); - inherited Destroy; -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguigroupbox.inc b/gui/fpguigroupbox.inc deleted file mode 100644 index 25c4d70e..00000000 --- a/gui/fpguigroupbox.inc +++ /dev/null @@ -1,106 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - GroupBox class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - - { TCustomGroupBox } - - TFCustomGroupBox = class(TFBinWidget) - protected - procedure Paint(Canvas: TFCanvas); override; - procedure CalcSizes; override; - procedure Resized; override; - public - constructor Create(const pText: string; pOwner: TComponent); overload; - end; - - - TFGroupBox = class(TFCustomGroupBox) - published - property CanExpandWidth; - property CanExpandHeight; - property Enabled; - property Text; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - - - -// =================================================================== -// TCustomGroupBox -// =================================================================== - -procedure TFCustomGroupBox.Paint(Canvas: TFCanvas); -begin - Style.DrawGroupBox(Canvas, Rect(0, 0, Width, Height), Text, WidgetState); -end; - - -procedure TFCustomGroupBox.CalcSizes; -var - Borders: TRect; - LabelWidth: Integer; -begin - LabelWidth := 0; - Borders := Style.GetGroupBoxBorders(TFCanvas(FindForm.Wnd.Canvas), Text, LabelWidth); - FMinSize.cx := Borders.Left + Borders.Right + LabelWidth; - FMinSize.cy := Borders.Top + Borders.Bottom; - if Assigned(Child) then - begin - if Child.MinSize.cx > LabelWidth then - FMinSize.cx := Borders.Left + Borders.Right + Child.MinSize.cx; - Inc(FMinSize.cy, Child.MinSize.cy); - if Child.DefSize.cx > LabelWidth then - FDefSize.cx := Borders.Left + Borders.Right + Child.MinSize.cx; - Inc(FDefSize.cy, Child.DefSize.cy); - if Child.MaxSize.cx > LabelWidth then - FMaxSize.cx := Min(Borders.Left + Borders.Right + Child.MaxSize.cx, InfiniteSize); - FMaxSize.cy := Min(MaxSize.cy + Child.MaxSize.cy, InfiniteSize); - end; -end; - - -procedure TFCustomGroupBox.Resized; -var - LabelWidth: Integer; - Borders: TRect; -begin - LabelWidth := 0; - if Assigned(Child) then - begin - Borders := Style.GetGroupBoxBorders(TFCanvas(FindForm.Wnd.Canvas), Text, LabelWidth); - Child.SetBounds(Borders.TopLeft, Size(Width - Borders.Left - Borders.Right, - Height - Borders.Top - Borders.Bottom)); - end; -end; - - -constructor TFCustomGroupBox.Create(const pText: string; pOwner: TComponent); -begin - Create(pOwner); - Text := pText; -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguilabel.inc b/gui/fpguilabel.inc deleted file mode 100644 index 31f11aef..00000000 --- a/gui/fpguilabel.inc +++ /dev/null @@ -1,104 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Label class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - - - { TFCustomLabel } - - TFCustomLabel = class(TFWidget) - private - FFontColor: TColor; - procedure SetAlignment(AAlignment: TAlignment); - procedure SetFontColor(const AValue: TColor); - protected - FAlignment: TAlignment; - procedure Paint(Canvas: TFCanvas); override; - procedure CalcSizes; override; - property Alignment: TAlignment read FAlignment write SetAlignment; - property FontColor: TColor read FFontColor write SetFontColor; - public - constructor Create(const pText: string; pOwner: TComponent); overload; - end; - - - TFLabel = class(TFCustomLabel) - published - property Alignment default taLeftJustify; - property CanExpandWidth; - property Enabled; - property FontColor; - property Text; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - - -// =================================================================== -// TFCustomLabel -// =================================================================== - -procedure TFCustomLabel.Paint(Canvas: TFCanvas); -var - x: Integer; -begin - Canvas.SetColor(Style.GetUIColor(FFontColor)); - case Alignment of - taLeftJustify: x := 0; - taCenter: x := (BoundsSize.cx - Canvas.TextWidth(Text)) div 2; - taRightJustify: x := BoundsSize.cx - Canvas.TextWidth(Text); - end; - Style.DrawText(Canvas, Point(x, - (BoundsSize.cy - Canvas.FontCellHeight) div 2), Text, WidgetState); -end; - -procedure TFCustomLabel.CalcSizes; -begin - with FindForm.Wnd.Canvas do - FMinSize := Size(TextWidth(Text), FontCellHeight); -end; - -constructor TFCustomLabel.Create(const pText: string; pOwner: TComponent); -begin - Create(pOwner); - FFontColor := clWindowText; - Text := pText; -end; - -procedure TFCustomLabel.SetAlignment(AAlignment: TAlignment); -begin - if AAlignment <> Alignment then - begin - FAlignment := AAlignment; - Redraw; - end; -end; - -procedure TFCustomLabel.SetFontColor(const AValue: TColor); -begin - if FFontColor = AValue then exit; - FFontColor := AValue; -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguilayouts.inc b/gui/fpguilayouts.inc deleted file mode 100644 index cf5d76fe..00000000 --- a/gui/fpguilayouts.inc +++ /dev/null @@ -1,1088 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Layout Managers class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - -// =================================================================== -// Layouts -// =================================================================== - -type - - ELayoutError = class(Exception); - - THorzAlign = (horzLeft, horzCenter, horzRight, horzFill); - TVertAlign = (vertTop, vertCenter, vertBottom, vertFill); - - TFLayoutItem = class(TCollectionItem) - private - FWidget: TFWidget; - published - property Widget: TFWidget read FWidget write FWidget; - end; - - TFWidgetArrayInfo = record - min: Integer; - def: Integer; - max: Integer; - MinFlag: Boolean; - MaxFlag: Boolean; - end; - - TFWidgetArrayInfoArray = array[0..(1 shl 30) div SizeOf(TFWidgetArrayInfo) - 1] of TFWidgetArrayInfo; - PWidgetArrayInfoArray = ^TFWidgetArrayInfoArray; - - - TFLayout = class(TFContainerWidget) - protected - FWidgets: TCollection; - FBorderSpacing: Integer; - IsRecalcingLayout: Boolean; - function GetChildCount: Integer; override; - function GetChild(Index: Integer): TFWidget; override; - property BorderSpacing: Integer read FBorderSpacing write FBorderSpacing; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function ContainsChild(AChild: TFWidget): Boolean; override; - end; - - -// ------------------------------------------------------------------- -// Fixed Layout -// ------------------------------------------------------------------- - - TFFixedItem = class(TFLayoutItem) - public - Left: Integer; - Top: Integer; - end; - - - TFFixedLayout = class(TFLayout) - protected - procedure CalcSizes; override; - procedure Resized; override; - public - constructor Create(AOwner: TComponent); override; - procedure AddWidget(AWidget: TFWidget; ALeft, ATop: Integer); - procedure MoveWidget(AWidget: TFWidget; ALeft, ATop: Integer); - published - property Enabled; - end; - - -// ------------------------------------------------------------------- -// Docking Layout -// ------------------------------------------------------------------- - - TDockingMode = (dmTop, dmBottom, dmLeft, dmRight, dmClient, dmUndocked); - - TFDockingItem = class(TFLayoutItem) - public - Left: Integer; - Top: Integer; - DockingMode: TDockingMode; - end; - - - TFDockingLayout = class(TFLayout) - private - procedure InternalLayoutChildren; - protected - procedure CalcSizes; override; - procedure Resized; override; - public - constructor Create(AOwner: TComponent); override; - procedure AddWidget(AWidget: TFWidget; ADockingMode: TDockingMode); - procedure AddWidget(AWidget: TFWidget; ALeft, ATop: Integer); - published - property Enabled; - end; - - -// ------------------------------------------------------------------- -// Box Layout -// ------------------------------------------------------------------- - - TFCustomBoxLayout = class(TFLayout) - private - FHorzAlign: THorzAlign; - FVertAlign: TVertAlign; - FOrientation: TOrientation; - FSpacing: Integer; - procedure SetOrientation(AOrientation: TOrientation); - protected - procedure CalcSizes; override; - procedure Resized; override; - property HorzAlign: THorzAlign read FHorzAlign write FHorzAlign default horzFill; - property VertAlign: TVertAlign read FVertAlign write FVertAlign default vertFill; - property Orientation: TOrientation read FOrientation write SetOrientation default Horizontal; - property Spacing: Integer read FSpacing write FSpacing default 4; - public - constructor Create(AOwner: TComponent); override; - procedure InsertChild(AChild: TFWidget); override; - procedure RemoveChild(AChild: TFWidget); override; - end; - - - TFBoxLayout = class(TFCustomBoxLayout) - published - property CanExpandWidth; - property CanExpandHeight; - property Enabled; - property BorderSpacing; - property HorzAlign; - property Orientation; - property Spacing; - property VertAlign; - end; - - -// ------------------------------------------------------------------- -// Grid Layout -// ------------------------------------------------------------------- - - TFGridItem = class(TFLayoutItem) - private - FX, FY, FWidth, FHeight: Integer; - public - constructor Create(ACollection: TCollection); override; - published - property x: Integer read FX write FX default 1; - property y: Integer read FY write FY default 1; - property Width: Integer read FWidth write FWidth; - property Height: Integer read FHeight write FHeight; - end; - - - { TFCustomGridLayout } - - TFCustomGridLayout = class(TFLayout) - private - FColCount: Integer; - FRowCount: Integer; - FColSpacing: Integer; - FRowSpacing: Integer; -// FWidgets: TCollection; - procedure SetColCount(AColCount: Integer); - procedure SetRowCount(ARowCount: Integer); - procedure SetColSpacing(AColSpacing: Integer); - procedure SetRowSpacing(ARowSpacing: Integer); - protected - procedure InitSizeInfos(var ColInfos, RowInfos: PWidgetArrayInfoArray); - procedure CalcSizes; override; - procedure Resized; override; - property GridPositions: TCollection read FWidgets write FWidgets; - property ColCount: Integer read FColCount write SetColCount default 2; - property RowCount: Integer read FRowCount write SetRowCount default 2; - property ColSpacing: Integer read FColSpacing write SetColSpacing default 4; - property RowSpacing: Integer read FRowSpacing write SetRowSpacing default 4; - public - constructor Create(AOwner: TComponent); override; - procedure AddWidget(AWidget: TFWidget; x, y, w, h: Integer); - procedure MoveWidget(AWidget: TFWidget; x, y, w, h: Integer); - end; - - - TFGridLayout = class(TFCustomGridLayout) - published - property Enabled; - property ColCount; - property RowCount; - property ColSpacing; - property RowSpacing; - property GridPositions; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - -// =================================================================== -// Common layout widgets implementation -// =================================================================== - -resourcestring - SLayoutWidgetNotFound = 'Layout child widget not found'; - - -procedure AddToSizes(infos: PWidgetArrayInfoArray; count: Integer; TooMuch: Integer); -var - i, add, FoundElements: Integer; -begin - while TooMuch > 0 do - begin - add := TooMuch; - FoundElements := 0; - for i := 0 to count - 1 do - begin - if not infos^[i].MaxFlag then - continue; - Inc(FoundElements); - if infos^[i].def + add > infos^[i].max then - add := infos^[i].max - infos^[i].def; - end; - if FoundElements > 0 then - begin - add := add div FoundElements; - if add <= 0 then - add := 1; - end else - break; - - for i := 0 to count - 1 do - begin - if not infos^[i].MaxFlag then - continue; - Inc(infos^[i].def, add); - Dec(TooMuch, add); - if TooMuch = 0 then - exit; - if infos^[i].def = infos^[i].max then - infos^[i].MaxFlag := False; - end; - end; -end; - -procedure SubFromSizes(infos: PWidgetArrayInfoArray; count: Integer; TooMuch: Integer); -var - i, sub, FoundElements: Integer; -begin - while TooMuch > 0 do - begin - sub := TooMuch; - FoundElements := 0; - for i := 0 to count - 1 do - begin - if not infos^[i].MinFlag then - continue; - Inc(FoundElements); - if infos^[i].def - sub < infos^[i].min then - sub := infos^[i].def - infos^[i].min; - end; - if FoundElements > 0 then - begin - sub := sub div FoundElements; - if sub <= 0 then - sub := 1; - end else - break; - - for i := 0 to count - 1 do - begin - if not infos^[i].MinFlag then - continue; - Dec(infos^[i].def, sub); - Dec(TooMuch, sub); - if TooMuch = 0 then - exit; - if infos^[i].def = infos^[i].min then - infos^[i].MinFlag := False; - end; - end; -end; - -procedure CorrectSizes(infos: PWidgetArrayInfoArray; count: Integer; SizeDiff: Integer); -var - TooMuch: Integer; -begin - TooMuch := SizeDiff; - if TooMuch > 0 then - AddToSizes(infos, count, TooMuch) - else if TooMuch < 0 then - SubFromSizes(infos, count, -TooMuch); -end; - - -// ------------------------------------------------------------------- -// TFLayout -// ------------------------------------------------------------------- - -constructor TFLayout.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FCanExpandWidth := True; - FCanExpandHeight := True; -end; - -destructor TFLayout.Destroy; -begin - FWidgets.Free; - inherited Destroy; -end; - -function TFLayout.ContainsChild(AChild: TFWidget): Boolean; -var - i: Integer; -begin - for i := 0 to FWidgets.Count - 1 do - if TFLayoutItem(FWidgets.Items[i]).Widget = AChild then - begin - Result := True; - Exit; //==> - end; - Result := False; -end; - -function TFLayout.GetChildCount: Integer; -begin - Result := FWidgets.Count; -end; - -function TFLayout.GetChild(Index: Integer): TFWidget; -begin - Result := TFLayoutItem(FWidgets.Items[Index]).Widget; -end; - - -// ------------------------------------------------------------------- -// TFFixedLayout -// ------------------------------------------------------------------- - -{ Find the biggest X and Y coordinates that will cover all Widgets, by looking - at each Widget in the Layout. } -procedure TFFixedLayout.CalcSizes; -var - i: Integer; - item: TFFixedItem; -begin - if FWidgets.Count = 0 then - begin - FDefSize := gfxbase.Size(50, 50) - end - else - begin - for i := 0 to FWidgets.Count - 1 do - begin - item := TFFixedItem(FWidgets.Items[i]); - FDefSize.cx := Max(DefSize.cx, item.Left + item.Widget.DefSize.cx); - FDefSize.cy := Max(DefSize.cy, item.Top + item.Widget.DefSize.cy); - end; - end; { if..else } -end; - -procedure TFFixedLayout.Resized; -var - i: Integer; - item: TFFixedItem; -begin -// writeln('==> ' + Classname + '.Resized'); - - for i := 0 to FWidgets.Count - 1 do - begin - item := TFFixedItem(FWidgets.Items[i]); - item.Widget.SetBounds(item.Widget.Left, item.Widget.Top, item.Widget.Width, item.Widget.Height); - end; -end; - -constructor TFFixedLayout.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FWidgets := TCollection.Create(TFFixedItem); -end; - -procedure TFFixedLayout.AddWidget(AWidget: TFWidget; ALeft, ATop: Integer); -var - item: TFFixedItem; -begin - if not ContainsChild(AWidget) then - begin - item := TFFixedItem(FWidgets.Add); - item.Left := ALeft; - item.Top := ATop; - item.Widget := AWidget; - AWidget.Parent := self; - AWidget.SetBounds(Point(item.Left, item.Top), item.Widget.DefSize); - end; -end; - -procedure TFFixedLayout.MoveWidget(AWidget: TFWidget; ALeft, ATop: Integer); -var - i: integer; - item: TFFixedItem; -begin - for i := 0 to FWidgets.Count - 1 do - begin - item := TFFixedItem(FWidgets.Items[i]); - if item.Widget = AWidget then - begin - item.Left := ALeft; - item.Top := ATop; - AWidget.SetBounds(Point(item.Left, item.Top), item.Widget.DefSize); - Exit; //==> - end; - end; - raise ELayoutError.Create(SLayoutWidgetNotFound); -end; - -{ -procedure TFixedLayout.EvLayoutChildren(Canvas: TGfxCanvas); -var - i: Integer; - item: TFixedItem; -begin - for i := 0 to FWidgets.Count - 1 do - begin - item := TFixedItem(FWidgets.Items[i]); - item.Widget.SetBounds(item.Left, item.Top, item.Widget.DefSize.cx, item.Widget.DefSize.cy); - end; -end; -} - -// ------------------------------------------------------------------- -// TFDockingLayout -// ------------------------------------------------------------------- - -constructor TFDockingLayout.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FWidgets := TCollection.Create(TFDockingItem); -end; - -procedure TFDockingLayout.InternalLayoutChildren; -var - clx, cly, clw, clh: Integer; // Client rectangle - ClientWidget: TFWidget; - i, WidgetW, WidgetH: Integer; - item: TFDockingItem; -begin - clx := 0; - cly := 0; - clw := BoundsSize.cx; - clh := BoundsSize.cy; -//WriteLn('=> DockingLayout.EvLayoutChildren ', BoundsSize.cx, ' x ', BoundsSize.cy); - if (clw = 0) or (clh = 0) then - exit; - - // Process all attached widgets - ClientWidget := nil; - for i := 0 to FWidgets.Count - 1 do - begin - item := TFDockingItem(FWidgets.Items[i]); - case item.DockingMode of - dmLeft: - begin - WidgetW := item.Widget.DefSize.cx; - WidgetH := clh; - item.Left := clx; - item.Top := cly; - Inc(clx, WidgetW); - Dec(clw, WidgetW); - end; - dmTop: - begin - WidgetW := clw; - WidgetH := item.Widget.DefSize.cy; - item.Left := clx; - item.Top := cly; - Inc(cly, WidgetH); - Dec(clh, WidgetH); - end; - dmRight: - begin - WidgetW := item.Widget.DefSize.cx; - WidgetH := clh; - item.Left := clx + clw - WidgetW; - item.Top := cly; - Dec(clw, WidgetW); - end; - dmBottom: - begin - WidgetH := item.Widget.DefSize.cy; - WidgetW := clw; - item.Left := clx; - item.Top := cly + clh - WidgetH; - Dec(clh, WidgetH); - end; - dmClient: - ClientWidget := item.Widget; - end; { case } - if item.DockingMode <> dmClient then - item.Widget.SetBounds(item.Left, item.Top, WidgetW, WidgetH); - end; { for } - if Assigned(ClientWidget) then - ClientWidget.SetBounds(clx, cly, clw, clh); -end; - -procedure TFDockingLayout.CalcSizes; -var - i: Integer; - item: TFDockingItem; - w: TFWidget; - cw: TFWidget; -begin - if FWidgets.Count = 0 then - begin - FDefSize := gfxbase.Size(200, 200); - Exit; //==> - end; - - // Find the client widget (widget with DockingMode "dmClient") - cw := nil; - for i := 0 to FWidgets.Count - 1 do - begin - item := TFDockingItem(FWidgets.Items[i]); - if item.DockingMode = dmClient then - begin - cw := item.Widget; - Break; //==> - end; - end; - - if Assigned(cw) then - begin - FMinSize := cw.MinSize; - FMaxSize := cw.MaxSize; - FDefSize := cw.DefSize; - end - else - FDefSize := gfxbase.Size(200, 200); - - for i := 0 to FWidgets.Count - 1 do - begin - item := TFDockingItem(FWidgets.Items[i]); - w := item.Widget; - case item.DockingMode of - dmTop, dmBottom: - begin - if MinSize.cx < w.MinSize.cx then - FMinSize.cx := w.MinSize.cx; - Inc(FMinSize.cy, w.MinSize.cy); - if MaxSize.cx < w.MaxSize.cx then - FMaxSize.cx := w.MaxSize.cx; - if MaxSize.cy < InfiniteSize then - Inc(FMaxSize.cy, w.MaxSize.cy); - if DefSize.cx < w.DefSize.cx then - FDefSize.cx := w.DefSize.cx; - Inc(FDefSize.cy, w.DefSize.cy); - end; - dmLeft, dmRight: - begin - Inc(FMinSize.cx, w.MinSize.cx); - if MinSize.cy < w.MinSize.cy then - FMinSize.cy := w.MinSize.cy; - if MaxSize.cx < InfiniteSize then - Inc(FMaxSize.cx, w.MaxSize.cx); - if MaxSize.cy < w.MaxSize.cy then - FMaxSize.cy := w.MaxSize.cy; - Inc(FDefSize.cx, w.DefSize.cx); - if DefSize.cy < w.DefSize.cy then - FDefSize.cy := w.DefSize.cy; - end; - end; { case } - end; { for } -end; - -procedure TFDockingLayout.Resized; -begin - inherited Resized; - InternalLayoutChildren; -end; - -procedure TFDockingLayout.AddWidget(AWidget: TFWidget; ADockingMode: TDockingMode); -var - item: TFDockingItem; -begin - if not ContainsChild(AWidget) then - begin - item := TFDockingItem(FWidgets.Add); - item.Widget := AWidget; - item.DockingMode := ADockingMode; - AWidget.Parent := Self; - end; -end; - -procedure TFDockingLayout.AddWidget(AWidget: TFWidget; ALeft, ATop: Integer); -var - item: TFDockingItem; -begin - if not ContainsChild(AWidget) then - begin - item := TFDockingItem(FWidgets.Add); - item.Widget := AWidget; - item.DockingMode := dmUndocked; - item.Left := ALeft; - item.Top := ATop; - AWidget.Parent := Self; - end; -end; - - -// ------------------------------------------------------------------- -// TFCustomBoxLayout -// ------------------------------------------------------------------- - -procedure TFCustomBoxLayout.SetOrientation(AOrientation: TOrientation); -begin - if AOrientation <> FOrientation then - begin - FOrientation := AOrientation; - Update; - end; -end; - - -constructor TFCustomBoxLayout.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FWidgets := TCollection.Create(TFLayoutItem); - FOrientation := Horizontal; - FHorzAlign := horzFill; - FVertAlign := vertFill; - FSpacing := 4; -end; - - -procedure TFCustomBoxLayout.InsertChild(AChild: TFWidget); -var - item: TFLayoutItem; -begin - if not ContainsChild(AChild) then - begin - item := TFLayoutItem(FWidgets.Add); - item.Widget := AChild; - AChild.Parent := Self; - end; -end; - - -procedure TFCustomBoxLayout.RemoveChild(AChild: TFWidget); -var - i: integer; - item: TFLayoutItem; -begin - for i := FWidgets.Count - 1 downto 0 do - begin - item := TFLayoutItem(FWidgets.Items[i]); - if item.Widget = AChild then - begin - item := nil; - FWidgets.Delete(i); - exit; - end - end; - {$Warning Not implemented yet.} -// raise Exception.Create('TCustomBoxLayout.RemoveChild - Not implemented yet'); -end; - - -procedure TFCustomBoxLayout.CalcSizes; -var - i: Integer; - item: TFLayoutItem; -begin - i := (FWidgets.Count - 1) * FSpacing; - if Orientation = Horizontal then - begin - FMinSize := Size(i, 0); - FDefSize := MinSize; - if HorzAlign = horzFill then - FMaxSize.cx := i - else - FMaxSize.cx := InfiniteSize; - FMaxSize.cy := InfiniteSize; - end - else - begin - FMinSize := Size(0, i); - FDefSize := MinSize; - FMaxSize.cx := InfiniteSize; - if VertAlign = vertFill then - FMaxSize.cy := i - else - FMaxSize.cy := InfiniteSize; - end; { if..else } - - for i := 0 to FWidgets.Count - 1 do - begin - item := TFLayoutItem(FWidgets.Items[i]); - if Orientation = Horizontal then - begin - Inc(FMinSize.cx, item.Widget.MinSize.cx); - Inc(FDefSize.cx, item.Widget.DefSize.cx); - FMaxSize.cx := Min(InfiniteSize, MaxSize.cx + item.Widget.MaxSize.cx); - FMaxSize.cy := Min(MaxSize.cy, item.Widget.MaxSize.cy); - if MinSize.cy < item.Widget.MinSize.cy then - FMinSize.cy := item.Widget.MinSize.cy; - if DefSize.cy < item.Widget.DefSize.cy then - FDefSize.cy := item.Widget.DefSize.cy; - if MaxSize.cy > item.Widget.MaxSize.cy then - FMaxSize.cy := item.Widget.MaxSize.cy; - end - else - begin { Vertical } - Inc(FMinSize.cy, item.Widget.MinSize.cy); - Inc(FDefSize.cy, item.Widget.DefSize.cy); - FMaxSize.cx := Min(MaxSize.cx, item.Widget.MaxSize.cx); - FMaxSize.cy := Min(InfiniteSize, MaxSize.cy + item.Widget.MaxSize.cy); - if MinSize.cx < item.Widget.MinSize.cx then - FMinSize.cx := item.Widget.MinSize.cx; - if DefSize.cx < item.Widget.DefSize.cx then - FDefSize.cx := item.Widget.DefSize.cx; - if MaxSize.cx > item.Widget.MaxSize.cx then - FMaxSize.cx := item.Widget.MaxSize.cx; - end; { if..else } - end; - - Inc(FMinSize.cx, 2 * FBorderSpacing); - Inc(FMinSize.cy, 2 * FBorderSpacing); - Inc(FDefSize.cx, 2 * FBorderSpacing); - Inc(FDefSize.cy, 2 * FBorderSpacing); - FMaxSize.cx := Min(InfiniteSize, MaxSize.cx + 2 * FBorderSpacing); - FMaxSize.cy := Min(InfiniteSize, MaxSize.cy + 2 * FBorderSpacing); -end; - -procedure TFCustomBoxLayout.Resized; -var - sizes: PWidgetArrayInfoArray; - i, x, y, xpos, ypos, w, h, sum: Integer; - item: TFLayoutItem; -begin - GetMem(sizes, FWidgets.Count * SizeOf(TFWidgetArrayInfo)); - - for i := 0 to FWidgets.Count - 1 do - begin - sizes^[i].min := 0; - sizes^[i].def := 0; - sizes^[i].max := InfiniteSize; - sizes^[i].MinFlag := True; - sizes^[i].MaxFlag := True; - end; - - if Orientation = Horizontal then - for i := 0 to FWidgets.Count - 1 do - begin - item := TFLayoutItem(FWidgets.Items[i]); - sizes^[i].min := Max(sizes^[i].min, item.Widget.MinSize.cx); - sizes^[i].def := Max(sizes^[i].def, item.Widget.DefSize.cx); - sizes^[i].max := Min(sizes^[i].max, item.Widget.MaxSize.cx); - end - else - for i := 0 to FWidgets.Count - 1 do - begin - item := TFLayoutItem(FWidgets.Items[i]); - sizes^[i].min := Max(sizes^[i].min, item.Widget.MinSize.cy); - sizes^[i].def := Max(sizes^[i].def, item.Widget.DefSize.cy); - sizes^[i].max := Min(sizes^[i].max, item.Widget.MaxSize.cy); - end; - - for i := 0 to FWidgets.Count - 1 do - begin - if sizes^[i].def = 0 then sizes^[i].def := 20; - if sizes^[i].min >= sizes^[i].def then - sizes^[i].MinFlag := False; - if sizes^[i].max <= sizes^[i].def then - sizes^[i].MaxFlag := False; - end; - - if Orientation = Horizontal then - begin - if FHorzAlign = horzFill then - CorrectSizes(sizes, FWidgets.Count, BoundsSize.cx - DefSize.cx) - end else - if FVertAlign = vertFill then - CorrectSizes(sizes, FWidgets.Count, BoundsSize.cy - DefSize.cy); - - sum := (FWidgets.Count - 1) * FSpacing; - for i := 0 to FWidgets.Count - 1 do - Inc(sum, sizes^[i].def); - - if Orientation = Horizontal then - case FHorzAlign of - horzCenter: x := (BoundsSize.cx - sum) div 2; - horzRight: x := BoundsSize.cx - FBorderSpacing - sum; - else x := FBorderSpacing; - end - else - case FVertAlign of - vertCenter: y := (BoundsSize.cy - sum) div 2; - vertBottom: y := BoundsSize.cy - FBorderSpacing - sum; - else y := FBorderSpacing; - end; - - for i := 0 to FWidgets.Count - 1 do - begin - item := TFLayoutItem(FWidgets.Items[i]); - if Orientation = Horizontal then - begin - xpos := x; - w := sizes^[i].def; - h := Min(BoundsSize.cy, item.Widget.DefSize.cy); - case FVertAlign of - vertCenter: ypos := (BoundsSize.cy - h) div 2; - vertBottom: ypos := BoundsSize.cy - FBorderSpacing - h; - else ypos := FBorderSpacing; - end; - Inc(x, sizes^[i].def + FSpacing); - if FVertAlign = vertFill then - h := Min(BoundsSize.cy, item.Widget.MaxSize.cy); - end - else - begin - ypos := y; - w := Min(BoundsSize.cx, item.Widget.DefSize.cx); - h := sizes^[i].def; - case FHorzAlign of - horzCenter: xpos := (BoundsSize.cx - w) div 2; - horzRight : xpos := BoundsSize.cx - FBorderSpacing - w; - else xpos := FBorderSpacing; - end; - Inc(y, sizes^[i].def + FSpacing); - if FHorzAlign = horzFill then - w := Min(BoundsSize.cx, item.Widget.MaxSize.cx); - end; - item.Widget.SetBounds(Point(xpos, ypos), Size(w, h)); - end; - - FreeMem(sizes); -end; - - -// ------------------------------------------------------------------- -// TFCustomGridLayout -// ------------------------------------------------------------------- - -constructor TFGridItem.Create(ACollection: TCollection); -begin - inherited Create(ACollection); - Width := 1; - Height := 1; -end; - - -procedure TFCustomGridLayout.SetColCount(AColCount: Integer); -begin - if AColCount <> FColCount then - begin - FColCount := AColCount; - Update; - end; -end; - - -procedure TFCustomGridLayout.SetRowCount(ARowCount: Integer); -begin - if ARowCount <> FRowCount then - begin - FRowCount := ARowCount; - Update; - end; -end; - - -procedure TFCustomGridLayout.SetColSpacing(AColSpacing: Integer); -begin - if AColSpacing <> FColSpacing then - begin - FColSpacing := AColSpacing; - Update; - end; -end; - - -procedure TFCustomGridLayout.SetRowSpacing(ARowSpacing: Integer); -begin - if ARowSpacing <> FRowSpacing then - begin - FRowSpacing := ARowSpacing; - Update; - end; -end; - - -procedure TFCustomGridLayout.InitSizeInfos(var ColInfos, RowInfos: PWidgetArrayInfoArray); -var - i: Integer; - item: TFGridItem; -begin - GetMem(ColInfos, FColCount * SizeOf(TFWidgetArrayInfo)); - GetMem(RowInfos, FRowCount * SizeOf(TFWidgetArrayInfo)); - - for i := 0 to FColCount - 1 do - begin - ColInfos^[i].min := 0; - ColInfos^[i].def := 0; - ColInfos^[i].max := InfiniteSize; - ColInfos^[i].MinFlag := True; - ColInfos^[i].MaxFlag := True; - end; - - for i := 0 to FRowCount - 1 do - begin - RowInfos^[i].min := 0; - RowInfos^[i].def := 0; - RowInfos^[i].max := InfiniteSize; - RowInfos^[i].MinFlag := True; - RowInfos^[i].MaxFlag := True; - end; - - for i := 0 to FWidgets.Count - 1 do - begin - item := TFGridItem(FWidgets.Items[i]); - ColInfos^[item.x].min := Max(ColInfos^[item.x].min, item.Widget.MinSize.cx); - ColInfos^[item.x].def := Max(ColInfos^[item.x].def, item.Widget.DefSize.cx); - ColInfos^[item.x].max := Min(ColInfos^[item.x].max, item.Widget.MaxSize.cx); - RowInfos^[item.y].min := Max(RowInfos^[item.y].min, item.Widget.MinSize.cy); - RowInfos^[item.y].def := Max(RowInfos^[item.y].def, item.Widget.DefSize.cy); - RowInfos^[item.y].max := Min(RowInfos^[item.y].max, item.Widget.MaxSize.cy); - end; - - for i := 0 to FColCount - 1 do - begin - if ColInfos^[i].def = 0 then - ColInfos^[i].def := 20; - if ColInfos^[i].min >= ColInfos^[i].def then - ColInfos^[i].MinFlag := False; - if ColInfos^[i].max <= ColInfos^[i].def then - ColInfos^[i].MaxFlag := False; - end; - - for i := 0 to FRowCount - 1 do - begin - if RowInfos^[i].def = 0 then - RowInfos^[i].def := 20; - if RowInfos^[i].min >= RowInfos^[i].def then - RowInfos^[i].MinFlag := False; - if RowInfos^[i].max <= RowInfos^[i].def then - RowInfos^[i].MaxFlag := False; - end; -end; - - -procedure TFCustomGridLayout.CalcSizes; -var - ColInfos, RowInfos: PWidgetArrayInfoArray; - i: Integer; -begin - MinSize.cx := (FColCount - 1) * FColSpacing; - MinSize.cy := (FRowCount - 1) * FRowSpacing; - DefSize.cx := (FColCount - 1) * FColSpacing; - DefSize.cy := (FRowCount - 1) * FRowSpacing; - MaxSize.cx := (FColCount - 1) * FColSpacing; - MaxSize.cy := (FRowCount - 1) * FRowSpacing; - - InitSizeInfos(ColInfos, RowInfos); - - for i := 0 to FColCount - 1 do - begin - Inc(FMinSize.cx, ColInfos^[i].min); - Inc(FDefSize.cx, ColInfos^[i].def); - FMaxSize.cx := Min(InfiniteSize, MaxSize.cx + ColInfos^[i].max); - end; - - for i := 0 to FRowCount - 1 do - begin - Inc(FMinSize.cy, RowInfos^[i].min); - Inc(FDefSize.cy, RowInfos^[i].def); - FMaxSize.cy := Min(InfiniteSize, MaxSize.cy + RowInfos^[i].max); - end; - - FreeMem(RowInfos); - FreeMem(ColInfos); -end; - - -procedure TFCustomGridLayout.Resized; -var - ColInfos, RowInfos: PWidgetArrayInfoArray; - i, j, x, y, w, h: Integer; - item: TFGridItem; -begin - InitSizeInfos(ColInfos, RowInfos); - - CorrectSizes(ColInfos, FColCount, BoundsSize.cx - DefSize.cx); - CorrectSizes(RowInfos, FRowCount, BoundsSize.cy - DefSize.cy); - - for i := 0 to FWidgets.Count - 1 do - begin - item := TFGridItem(FWidgets.Items[i]); - x := 0; - for j := 0 to item.x - 1 do - Inc(x, ColInfos^[j].def); - y := 0; - for j := 0 to item.y - 1 do - Inc(y, RowInfos^[j].def); - w := 0; - for j := 0 to item.Width - 1 do - Inc(w, ColInfos^[item.x + j].def); - h := 0; - for j := 0 to item.Height - 1 do - Inc(h, RowInfos^[item.y + j].def); - Inc(w, (item.Width - 1) * FColSpacing); - Inc(h, (item.Height - 1) * FRowSpacing); - item.Widget.SetBounds(Point(x + item.x * FColSpacing, - y + item.y * FRowSpacing), Size(w, h)); - end; - - FreeMem(ColInfos); - FreeMem(RowInfos); -end; - -constructor TFCustomGridLayout.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FWidgets := TCollection.Create(TFGridItem); - FColCount := 2; - FRowCount := 2; - FColSpacing := 4; - FRowSpacing := 4; -end; - -procedure TFCustomGridLayout.AddWidget(AWidget: TFWidget; x, y, w, h: Integer); -var - item: TFGridItem; -begin - if not ContainsChild(AWidget) then - begin - item := TFGridItem(FWidgets.Add); - item.Widget := AWidget; - item.x := x; - item.y := y; - item.Width := w; - item.Height := h; - AWidget.Parent := Self; - end; -end; - -procedure TFCustomGridLayout.MoveWidget(AWidget: TFWidget; x, y, w, h: Integer); -var - i: integer; - item: TFGridItem; -begin - for i := 0 to FWidgets.Count - 1 do - begin - item := TFGridItem(FWidgets.Items[i]); - if item.Widget = AWidget then - begin - item.x := x; - item.y := y; - item.Width := w; - item.Height := h; - Update; - exit; - end; - end; - raise ELayoutError.Create(SLayoutWidgetNotFound); -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguilistbox.inc b/gui/fpguilistbox.inc deleted file mode 100644 index abea4016..00000000 --- a/gui/fpguilistbox.inc +++ /dev/null @@ -1,430 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - ListBox class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{ Listbox widget implementation } - -{$IFDEF read_interface} - - { TFCustomListBox } - - TFCustomListBox = class(TFWidget) - private - FHotTrack: Boolean; - FItems: TStrings; - FItemIndex: Integer; - function EvMousePressed(Event: TMousePressedEventObj): Boolean; - function EvMouseReleased(Event: TMouseReleasedEventObj): Boolean; - function EvMouseMoved(Event: TMouseMoveEventObj): Boolean; - function ProcessMouseEvent(Event: TMouseEventObj): Boolean; - protected - ScrollingSupport: TScrollingSupport; - FMaxItemWidth: Integer; - ItemHeight: Integer; - procedure Paint(Canvas: TFCanvas); override; - function ProcessEvent(Event: TEventObj): Boolean; override; - function DistributeEvent(Event: TEventObj): Boolean; override; - procedure EvKeyPressed(Key: Word; Shift: TShiftState); override; - procedure CalcSizes; override; - procedure Resized; override; - procedure RecalcWidth; - procedure UpdateScrollBars; - function RedrawItem(AIndex: Integer): TRect; - property CanExpandWidth default True; - property CanExpandHeight default True; - property HotTrack: Boolean read FHotTrack write FHotTrack default False; - property ItemIndex: Integer read FItemIndex write FItemIndex default -1; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property Items: TStrings read FItems write FItems; - end; - - - TFListBox = class(TFCustomListBox) - published - // TWidget properties - property OnClick; - property Enabled; - // TCustomListBox properties - property HotTrack; - property Items; - property ItemIndex; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - -// =================================================================== -// TFListBoxStrings -// =================================================================== - -type - - TFListBoxStrings = class(TStringList) - protected - ListBox: TFCustomListBox; - procedure SetUpdateState(Updating: Boolean); override; - public - constructor Create(AListBox: TFCustomListBox); - function Add(const s: String): Integer; override; - end; - - -constructor TFListBoxStrings.Create(AListBox: TFCustomListBox); -begin - inherited Create; - ListBox := AListBox; -end; - -function TFListBoxStrings.Add(const s: String): Integer; -var - ItemWidth: Integer; -begin - Result := inherited Add(s); - if Assigned(ListBox.FindForm) and Assigned(ListBox.FindForm.Wnd) then - begin - ItemWidth := ListBox.FindForm.Wnd.Canvas.TextWidth(s) + 4; - if ItemWidth > ListBox.FMaxItemWidth then - ListBox.FMaxItemWidth := ItemWidth; - ListBox.UpdateScrollBars; - end; -end; - -procedure TFListBoxStrings.SetUpdateState(Updating: Boolean); -begin - if not Updating then - ListBox.RecalcWidth; -end; - - -// =================================================================== -// TCustomListBox -// =================================================================== - -constructor TFCustomListBox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - WidgetStyle := WidgetStyle + [wsCaptureMouse, wsClickable, wsOpaque]; - FCanExpandWidth := True; - FCanExpandHeight := True; - - ScrollingSupport := TScrollingSupport.Create(Self); - ScrollingSupport.HorzScrollBar.OnScroll := @ScrollingSupport.DefHorzScrollHandler; - ScrollingSupport.VertScrollBar.OnScroll := @ScrollingSupport.DefVertScrollHandler; - Items := TFListBoxStrings.Create(Self); - FItemIndex := -1; - UpdateScrollBars; -end; - -destructor TFCustomListBox.Destroy; -begin - Items.Free; - ScrollingSupport.Free; - inherited Destroy; -end; - -procedure TFCustomListBox.Paint(Canvas: TFCanvas); -var - i, StartIndex, EndIndex: Integer; - ItemRect: TRect; - ItemFlags: TItemFlags; -begin - inherited Paint(Canvas); - - if not Canvas.IntersectClipRect(ScrollingSupport.ClientRect) then - exit; //==> - - Style.SetUIColor(Canvas, clWindow); -// Style.DrawWindowBackground(Canvas, ScrollingSupport.ClientRect); - Canvas.FillRect(ScrollingSupport.ClientRect); - Style.SetUIColor(Canvas, clWindowText); - - with ScrollingSupport.VertScrollBar do - begin - StartIndex := Position div ItemHeight; - EndIndex := (Position + PageSize) div ItemHeight; - end; - - Canvas.AppendTranslation(ScrollingSupport.ClientRect.TopLeft - - ScrollingSupport.ScrollPos); - - if StartIndex < 0 then - StartIndex := 0; - if EndIndex >= Items.Count then - EndIndex := Items.Count - 1; - - for i := StartIndex to EndIndex do - begin - Canvas.SaveState; - - ItemRect.Left := ScrollingSupport.HorzScrollBar.Position; - ItemRect.Top := i * ItemHeight; - ItemRect.Right := ScrollingSupport.ClientRect.Right - - ScrollingSupport.ClientRect.Left + - ScrollingSupport.HorzScrollBar.Position; - ItemRect.Bottom := (i + 1) * ItemHeight; - - Canvas.IntersectClipRect(ItemRect); - - ItemFlags := []; - if (wsHasFocus in WidgetState) and ((i = ItemIndex) or - ((ItemIndex = -1) and (i = 0))) then - Include(ItemFlags, ifFocused); - if i = ItemIndex then - Include(ItemFlags, ifSelected); - - Style.DrawItemBefore(Canvas, ItemRect, ItemFlags); -// Canvas.TextOut(Point(2, i * ItemHeight), Items[i]); - Style.DrawText(Canvas, Point(2, i * ItemHeight), Items[i], WidgetState); - Style.DrawItemAfter(Canvas, ItemRect, ItemFlags); - - Canvas.RestoreState; - end; -end; - -function TFCustomListBox.ProcessEvent(Event: TEventObj): Boolean; -begin - if Event.InheritsFrom(TMousePressedEventObj) then - Result := ScrollingSupport.ProcessEvent(Event) or - EvMousePressed(TMousePressedEventObj(Event)) or - inherited ProcessEvent(Event) - else if Event.InheritsFrom(TMouseReleasedEventObj) then - Result := ScrollingSupport.ProcessEvent(Event) or - EvMouseReleased(TMouseReleasedEventObj(Event)) or - inherited ProcessEvent(Event) - else if Event.InheritsFrom(TMouseMoveEventObj) then - Result := ScrollingSupport.ProcessEvent(Event) or - EvMouseMoved(TMouseMoveEventObj(Event)) or - inherited ProcessEvent(Event) - else - Result := ScrollingSupport.ProcessEvent(Event) or - inherited ProcessEvent(Event); -end; - -function TFCustomListBox.DistributeEvent(Event: TEventObj): Boolean; -begin - Result := ScrollingSupport.DistributeEvent(Event) or - inherited DistributeEvent(Event); -end; - -procedure TFCustomListBox.EvKeyPressed(Key: Word; Shift: TShiftState); -var - mshift: TShiftState; - HorzScrollBar: TFScrollBar; - VertScrollBar: TFScrollBar; - r: TRect; -begin -// writeln('Before FItemIndex=' + IntToStr(FItemIndex)); - HorzScrollBar := ScrollingSupport.HorzScrollBar; - VertScrollBar := ScrollingSupport.VertScrollBar; - - mshift := Shift * [ssShift, ssAlt, ssCtrl, ssMeta, ssSuper, ssHyper, ssAltGr]; - if mshift = [] then - case Key of -// keyLeft: -// HorzScrollBar.ButtonUpClick(nil); -// keyRight: -// HorzScrollBar.ButtonDownClick(nil); - keyUp: - begin -// writeln('keyup'); - if FItemIndex > 0 then - begin - RedrawItem(ItemIndex); - Dec(FItemIndex); - r := RedrawItem(ItemIndex); - // we should only call this when focus rect is out of view - if not PtInRect(ScrollingSupport.ClientRect, Point(r.Left, r.Top)) then - begin - VertScrollBar.ButtonUpClick(nil); - end; - end; - end; - keyDown: - begin -// writeln('keydown'); - if FItemIndex < (Items.Count - 1) then - begin - RedrawItem(ItemIndex); - Inc(FItemIndex); - r := RedrawItem(ItemIndex); - // we should only call this when focus rect is out of view - if not PtInRect(ScrollingSupport.ClientRect, Point(r.Left, r.Bottom)) then - begin - VertScrollBar.ButtonDownClick(nil); - end; - end; - end; - keyPageUp: - VertScrollBar.PageUp; - keyPageDown: - VertScrollBar.PageDown; - keyHome: - begin - RedrawItem(ItemIndex); - FItemIndex := 0; - RedrawItem(ItemIndex); - VertScrollBar.Position := 0; - end; - keyEnd: - begin - RedrawItem(ItemIndex); - FItemIndex := (Items.Count - 1); - RedrawItem(ItemIndex); - VertScrollBar.Position := VertScrollBar.Max - VertScrollBar.PageSize; - end; - keyReturn: - begin - if Assigned(OnClick) then - OnClick(Self); - end; - end - else if mshift = [ssShift] then - case Key of - keyPageUp: - HorzScrollBar.PageUp; - keyPageDown: - HorzScrollBar.PageDown; - keyHome: - HorzScrollBar.Position := 0; - keyEnd: - HorzScrollBar.Position := HorzScrollBar.Max - HorzScrollBar.PageSize; - end - else - inherited EvKeyPressed(Key, Shift); - -// writeln('After FItemIndex=' + IntToStr(FItemIndex)); -end; - -procedure TFCustomListBox.CalcSizes; -begin - ScrollingSupport.CalcSizes; - ItemHeight := FindForm.Wnd.Canvas.FontCellHeight; - ScrollingSupport.VertScrollBar.SmallChange := ItemHeight; - RecalcWidth; -end; - -procedure TFCustomListBox.Resized; -begin - ScrollingSupport.Resized; - UpdateScrollBars; -end; - -procedure TFCustomListBox.RecalcWidth; -var - i, ItemWidth: Integer; -begin - if (not Assigned(FindForm)) or (not Assigned(FindForm.Wnd)) then - exit; //==> - - FMaxItemWidth := 0; - for i := 0 to Items.Count - 1 do - begin - ItemWidth := FindForm.Wnd.Canvas.TextWidth(Items[i]) + 4; - if ItemWidth > FMaxItemWidth then - FMaxItemWidth := ItemWidth; - end; - UpdateScrollBars; -end; - -procedure TFCustomListBox.UpdateScrollBars; -begin - ScrollingSupport.SetVirtualSize( - Size(FMaxItemWidth, Items.Count * ItemHeight - 1)); -end; - -function TFCustomListBox.RedrawItem(AIndex: Integer): TRect; -var - ItemRect: TRect; -begin - if AIndex < 0 then - Exit; //==> - ItemRect := ScrollingSupport.ClientRect; - Inc(ItemRect.Top, AIndex * ItemHeight - ScrollingSupport.VertScrollBar.Position); - if (ItemRect.Top > ScrollingSupport.ClientRect.Bottom) or - (ItemRect.Top + ItemHeight <= ScrollingSupport.ClientRect.Top) then - Exit; //==> - ItemRect.Bottom := Min(ItemRect.Top + ItemHeight, ScrollingSupport.ClientRect.Bottom); - Redraw(ItemRect); - Result := ItemRect; -end; - - -// private methods - -function TFCustomListBox.EvMousePressed(Event: TMousePressedEventObj): Boolean; -begin - if HotTrack then - Result := False - else if Event.Button = mbLeft then - Result := ProcessMouseEvent(Event) - else - Result := False; -end; - -function TFCustomListBox.EvMouseReleased(Event: TMouseReleasedEventObj): Boolean; -begin - if HotTrack and (Event.Button = mbLeft) then - Result := ProcessMouseEvent(Event) - else - Result := False; -end; - -function TFCustomListBox.EvMouseMoved(Event: TMouseMoveEventObj): Boolean; -begin - if HotTrack then - Result := ProcessMouseEvent(Event) - else - Result := False; -end; - -function TFCustomListBox.ProcessMouseEvent(Event: TMouseEventObj): Boolean; -var - Index: Integer; -begin - if not PtInRect(ScrollingSupport.ClientRect, Event.Position) then - begin - Result := False; - Exit; //==> - end; - - Index := (Event.Position.y - ScrollingSupport.ClientRect.Top + - ScrollingSupport.VertScrollBar.Position) div ItemHeight; - if (Index >= 0) and (Index < Items.Count) and ((Index <> ItemIndex) or - (HotTrack and Event.InheritsFrom(TMouseReleasedEventObj))) then - begin - RedrawItem(ItemIndex); - FItemIndex := Index; - RedrawItem(ItemIndex); - if (not Event.InheritsFrom(TMouseMoveEventObj)) and Assigned(OnClick) then - OnClick(Self); - end; - -{ !!!: Re-include this for correct focus handling. But at the moment a focus - change results in a complete widget redraw, which is not very brilliant. } -// inherited ProcessEvent(Event); - - Result := True; -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguimemo.inc b/gui/fpguimemo.inc deleted file mode 100644 index f1774c17..00000000 --- a/gui/fpguimemo.inc +++ /dev/null @@ -1,295 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Memo class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - - - { TFCustomMemo } - - TFCustomMemo = class(TFWidget) - private - FLines: TStrings; - function EvMousePressed(Event: TMousePressedEventObj): Boolean; - function EvMouseReleased(Event: TMouseReleasedEventObj): Boolean; - function EvMouseMoved(Event: TMouseMoveEventObj): Boolean; - function ProcessMouseEvent(Event: TMouseEventObj): Boolean; - protected - FScrollingSupport: TScrollingSupport; - FMaxItemWidth: Integer; - FItemHeight: Integer; - procedure SetLines(const AValue: TStrings); - procedure Paint(Canvas: TFCanvas); override; - function ProcessEvent(Event: TEventObj): Boolean; override; - function DistributeEvent(Event: TEventObj): Boolean; override; - procedure CalcSizes; override; - procedure UpdateScrollBars; - procedure RecalcWidth; - procedure Resized; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - property Lines: TStrings read FLines write SetLines; - end; - - - TFMemo = class(TFCustomMemo) - published -// property Alignment; -// property BorderStyle; -// property Color; - property Enabled; - property Lines; -// property MaxLength; - end; -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - -type - - TFMemoStrings = class(TStringList) - protected - Memo: TFCustomMemo; - procedure SetUpdateState(Updating: Boolean); override; - public - constructor Create(AMemo: TFCustomMemo); - function Add(const s: String): Integer; override; - end; - - -constructor TFMemoStrings.Create(AMemo: TFCustomMemo); -begin - inherited Create; - Memo := AMemo; -end; - -function TFMemoStrings.Add(const s: String): Integer; -var - ItemWidth: Integer; -begin - Result := inherited Add(s); - if Assigned(Memo.FindForm) and Assigned(Memo.FindForm.Wnd) then - begin - ItemWidth := Memo.FindForm.Wnd.Canvas.TextWidth(s) + 4; - if ItemWidth > Memo.FMaxItemWidth then - Memo.FMaxItemWidth := ItemWidth; - Memo.UpdateScrollBars; - end; -end; - -procedure TFMemoStrings.SetUpdateState(Updating: Boolean); -begin - if not Updating then - Memo.RecalcWidth; -end; - - -{ TFCustomMemo } - -function TFCustomMemo.EvMousePressed(Event: TMousePressedEventObj): Boolean; -begin - -end; - -function TFCustomMemo.EvMouseReleased(Event: TMouseReleasedEventObj): Boolean; -begin - -end; - -function TFCustomMemo.EvMouseMoved(Event: TMouseMoveEventObj): Boolean; -begin - -end; - -function TFCustomMemo.ProcessMouseEvent(Event: TMouseEventObj): Boolean; -var - Index: Integer; -begin - if not PtInRect(FScrollingSupport.ClientRect, Event.Position) then - begin - Result := False; - exit; - end; -{ // Graeme: TODO - - Index := (Event.Position.y - FScrollingSupport.ClientRect.Top + - FScrollingSupport.VerTFScrollBar.Position) div FItemHeight; - if (Index >= 0) and (Index < FLines.Count) and ((Index <> FItemIndex) or - (HotTrack and Event.InheritsFrom(TMouseReleasedEventObj))) then - begin - RedrawItem(ItemIndex); - FItemIndex := Index; - RedrawItem(ItemIndex); - if (not Event.InheritsFrom(TMouseMoveEventObj)) and Assigned(OnClick) then - OnClick(Self); - end; -} - Result := True; -end; - -procedure TFCustomMemo.SetLines(const AValue: TStrings); -begin - FLines.Assign(AValue); -end; - -procedure TFCustomMemo.Paint(Canvas: TFCanvas); -var - i, StartIndex, EndIndex: Integer; - ItemRect: TRect; - ItemFlags: TItemFlags; -begin - inherited Paint(Canvas); - - if not Canvas.IntersectClipRect(FScrollingSupport.ClientRect) then - Exit; //==> - - Style.SetUIColor(Canvas, clWindow); - Canvas.FillRect(FScrollingSupport.ClientRect); - Style.SetUIColor(Canvas, clWindowText); - - with FScrollingSupport.VertScrollBar do - begin - StartIndex := Position div FItemHeight; - EndIndex := (Position + PageSize) div FItemHeight; - end; - - Canvas.AppendTranslation(FScrollingSupport.ClientRect.TopLeft - FScrollingSupport.ScrollPos); - - if StartIndex < 0 then - StartIndex := 0; - if EndIndex >= FLines.Count then - EndIndex := FLines.Count - 1; - - for i := StartIndex to EndIndex do - begin - Canvas.SaveState; - - ItemRect.Left := FScrollingSupport.HorzScrollBar.Position; - ItemRect.Top := i * FItemHeight; - ItemRect.Right := FScrollingSupport.ClientRect.Right - - FScrollingSupport.ClientRect.Left - + FScrollingSupport.HorzScrollBar.Position; - ItemRect.Bottom := (i + 1) * FItemHeight; - - Canvas.IntersectClipRect(ItemRect); - - ItemFlags := []; -// if (wsHasFocus in WidgetState) and ((i = ItemIndex) or -// ((ItemIndex = -1) and (i = 0))) then -// Include(ItemFlags, ifFocused); -// if i = ItemIndex then -// Include(ItemFlags, ifSelected); - -// Style.DrawItemBefore(Canvas, ItemRect, ItemFlags); - Style.DrawText(Canvas, Point(2, i * FItemHeight), FLines[i], WidgetState); -// Style.DrawItemAfter(Canvas, ItemRect, ItemFlags); - - Canvas.RestoreState; - end; -end; - -function TFCustomMemo.ProcessEvent(Event: TEventObj): Boolean; -begin - if Event.InheritsFrom(TMousePressedEventObj) then - Result := FScrollingSupport.ProcessEvent(Event) or - EvMousePressed(TMousePressedEventObj(Event)) or - inherited ProcessEvent(Event) - else if Event.InheritsFrom(TMouseReleasedEventObj) then - Result := FScrollingSupport.ProcessEvent(Event) or - EvMouseReleased(TMouseReleasedEventObj(Event)) or - inherited ProcessEvent(Event) - else if Event.InheritsFrom(TMouseMoveEventObj) then - Result := FScrollingSupport.ProcessEvent(Event) or - EvMouseMoved(TMouseMoveEventObj(Event)) or - inherited ProcessEvent(Event) - else - Result := FScrollingSupport.ProcessEvent(Event) or - inherited ProcessEvent(Event); -end; - -function TFCustomMemo.DistributeEvent(Event: TEventObj): Boolean; -begin - Result := FScrollingSupport.DistributeEvent(Event) or - inherited DistributeEvent(Event); -end; - -procedure TFCustomMemo.CalcSizes; -begin - FScrollingSupport.CalcSizes; - FItemHeight := FindForm.Wnd.Canvas.FontCellHeight; - FScrollingSupport.VertScrollBar.SmallChange := FItemHeight; - RecalcWidth; -end; - -procedure TFCustomMemo.UpdateScrollBars; -begin - FScrollingSupport.SetVirtualSize(Size(FMaxItemWidth, FLines.Count * FItemHeight - 1)); -end; - -procedure TFCustomMemo.RecalcWidth; -var - i, ItemWidth: Integer; -begin - if (not Assigned(FindForm)) or (not Assigned(FindForm.Wnd)) then - Exit; //==> - - FMaxItemWidth := 0; - for i := 0 to FLines.Count - 1 do - begin - ItemWidth := FindForm.Wnd.Canvas.TextWidth(FLines[i]) + 4; - if ItemWidth > FMaxItemWidth then - FMaxItemWidth := ItemWidth; - end; - UpdateScrollBars; -end; - -procedure TFCustomMemo.Resized; -begin - FScrollingSupport.Resized; - UpdateScrollBars; -end; - -constructor TFCustomMemo.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - WidgetStyle := WidgetStyle + [wsCaptureMouse, wsClickable, wsOpaque]; - FCanExpandWidth := True; - FCanExpandHeight := True; - - FScrollingSupport := TScrollingSupport.Create(Self); - FScrollingSupport.HorzScrollBar.OnScroll := @FScrollingSupport.DefHorzScrollHandler; - FScrollingSupport.VertScrollBar.OnScroll := @FScrollingSupport.DefVertScrollHandler; - - FLines := TFMemoStrings.Create(self); -// SetBounds(10, 10, 180, 90); - UpdateScrollBars; -end; - -destructor TFCustomMemo.Destroy; -begin - FLines.Free; - FScrollingSupport.Free; - inherited Destroy; -end; - - -{$ENDIF read_implementation} - - diff --git a/gui/fpguimenus.inc b/gui/fpguimenus.inc deleted file mode 100644 index 8a2c121b..00000000 --- a/gui/fpguimenus.inc +++ /dev/null @@ -1,246 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Menu class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - - // forward class declarations - TFPopupMenu = class; - TFMenuBar = class; - - { TFMenuItem } - - TFMenuItem = class(TFCustomPanel) - private - FHotKeyDef: string; - FSeparator: boolean; - FSubMenu: TFPopupMenu; - function GetSubMenu: TFPopupMenu; - procedure InternalShowPopupMenu; - protected - procedure Paint(Canvas: TFCanvas); override; - function ProcessEvent(Event: TEventObj): Boolean; override; - procedure Click; override; - public - constructor Create(const pText: string; pOwner: TComponent); overload; - destructor Destroy; override; - property SubMenu: TFPopupMenu read GetSubMenu; - published - property Separator: boolean read FSeparator write FSeparator; - property HotKeyDef: string read FHotKeyDef write FHotKeyDef; - property Text; - property Visible; - property Enabled; - end; - - - { TFPopupMenu } - - TFPopupMenu = class(TFPopupWindow) - private - FMenu: TFMenuBar; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function AddMenu(const pTitle: string): TFMenuItem; - function AddMenu(const pTitle: string; const pHotKeyDef: string; pHandlerProc: TNotifyEvent): TFMenuItem; - end; - - - { TFMenuBar } - - TFMenuBar = class(TFCustomBoxLayout) - public - constructor Create(AOwner: TComponent); override; - function AddMenu(const pTitle: string): TFMenuItem; - function AddMenu(const pTitle: string; const pHotKeyDef: string; pHandlerProc: TNotifyEvent): TFMenuItem; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - -{ TFMenuItem } - -function TFMenuItem.GetSubMenu: TFPopupMenu; -begin - if not Assigned(FSubMenu) then - FSubMenu := TFPopupMenu.Create(self); - Result := FSubMenu; -end; - -procedure TFMenuItem.InternalShowPopupMenu; -begin - if Assigned(FSubMenu) and FSubMenu.Visible then - begin -// writeln('Closing submenu'); - FSubMenu.Close; - Exit; //==> - end; - - if not Assigned(FSubMenu) then - begin -// writeln('Creating submenu'); - FSubMenu := TFPopupMenu.Create(Self); - end; - -// writeln('set submenu position...'); - FSubMenu.SetPosition(ClientToScreen(Point(0, Height))); -// writeln('show submenu...'); - FSubMenu.Show; - FSubMenu.Wnd.SetMinMaxClientSize(MaxSize, MaxSize); -end; - -procedure TFMenuItem.Paint(Canvas: TFCanvas); -begin - if (wsClicked in WidgetState) or (wsMouseInside in WidgetState) then - FBevelStyle := bsRaised -// else if (wsClicked in WidgetState) then -// FBevelStyle := bsLowered - else - FBevelStyle := bsPlain; - - inherited Paint(Canvas); -end; - -function TFMenuItem.ProcessEvent(Event: TEventObj): Boolean; -begin - {$IFDEF DEBUG} - if Event.InheritsFrom(TMouseEnterEventObj) then - writeln(Format('MouseEnter for %s:%s', [Text, Classname])) - else if Event.InheritsFrom(TMouseLeaveEventObj) then - writeln(Format('MouseLeave for %s:%s', [Text, Classname])); - {$ENDIF} - - if Event.InheritsFrom(TMouseEnterEventObj) then - begin - Include(WidgetState, wsMouseInside); - Redraw; - result := True; - end - else if Event.InheritsFrom(TMouseLeaveEventObj) then - begin - Exclude(WidgetState, wsMouseInside); - Redraw; - result := True; - end - else - result := inherited ProcessEvent(Event); -end; - -procedure TFMenuItem.Click; -begin - if (wsMouseInside in WidgetState) and Assigned(FSubMenu) then - begin -// writeln('Passed'); - InternalShowPopupMenu; - end - else - begin -// writeln('Failed'); - inherited Click; - end; - - if FindForm is TFPopupMenu then - TFPopupMenu(FindForm).Close; -end; - -constructor TFMenuItem.Create(const pText: string; pOwner: TComponent); -begin - inherited Create(pText, pOwner); - WidgetStyle := WidgetStyle + [wsCaptureMouse, wsClickable, wsOpaque]; - FBevelStyle := bsPlain; -end; - -destructor TFMenuItem.Destroy; -begin - if Assigned(FSubMenu) then - FSubMenu.Free; - inherited Destroy; -end; - -{ TFPopupMenu } - -constructor TFPopupMenu.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - WidgetStyle := WidgetStyle + [wsCaptureMouse, wsClickable, wsOpaque]; - BorderWidth := 1; - Color := clBlack; - Name := '_MenuPopup'; - Visible := False; - - FMenu := TFMenuBar.Create(self); - FMenu.Name := '_VBoxMenu'; - FMenu.Orientation := Vertical; - FMenu.Spacing := 0; - InsertChild(FMenu); -end; - -destructor TFPopupMenu.Destroy; -begin - FMenu.Free; - inherited Destroy; -end; - -function TFPopupMenu.AddMenu(const pTitle: string): TFMenuItem; -begin - Result := FMenu.AddMenu(pTitle); -end; - -function TFPopupMenu.AddMenu(const pTitle: string; const pHotKeyDef: string; - pHandlerProc: TNotifyEvent): TFMenuItem; -begin - Result := FMenu.AddMenu(pTitle, photKeyDef, pHandlerProc); -end; - -{ TFMenuBar } - -constructor TFMenuBar.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - WidgetStyle := WidgetStyle + [wsCaptureMouse, wsClickable, wsOpaque]; - FCanExpandHeight := False; - Spacing := 0; -end; - -function TFMenuBar.AddMenu(const pTitle: string): TFMenuItem; -begin - Result := TFMenuItem.Create(pTitle, self); - InsertChild(Result); -end; - - -function TFMenuBar.AddMenu(const pTitle: string; const pHotKeyDef: string; - pHandlerProc: TNotifyEvent): TFMenuItem; -begin - Result := AddMenu(pTitle); - if pTitle <> '-' then - begin - Result.Text := pTitle; - Result.HotKeyDef := pHotKeyDef; - Result.OnClick := pHandlerProc; - end - else - Result.Separator := True; -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguipackage.lpk b/gui/fpguipackage.lpk deleted file mode 100644 index 3f214145..00000000 --- a/gui/fpguipackage.lpk +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0"?> -<CONFIG> - <Package Version="2"> - <PathDelim Value="\"/> - <Name Value="fpguipackage"/> - <Author Value="Graeme Geldenhuys"/> - <CompilerOptions> - <Version Value="5"/> - <PathDelim Value="\"/> - <SearchPaths> - <OtherUnitFiles Value="db\"/> - <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> - </SearchPaths> - <Parsing> - <SyntaxOptions> - <AllowLabel Value="False"/> - </SyntaxOptions> - </Parsing> - <CodeGeneration> - <Generate Value="Faster"/> - </CodeGeneration> - <Other> - <CustomOptions Value="-dDEBUGx -"/> - <CompilerPath Value="$(CompPath)"/> - </Other> - </CompilerOptions> - <Description Value="Free Pascal Graphical User Interface -"/> - <License Value="Modified LGPL -"/> - <Version Minor="4"/> - <Files Count="6"> - <Item1> - <Filename Value="fpgui.pas"/> - <UnitName Value="fpGUI"/> - </Item1> - <Item2> - <Filename Value="stylemanager.pas"/> - <UnitName Value="StyleManager"/> - </Item2> - <Item3> - <Filename Value="windowsstyle.pas"/> - <UnitName Value="WindowsStyle"/> - </Item3> - <Item4> - <Filename Value="motifstyle.pas"/> - <UnitName Value="MotifStyle"/> - </Item4> - <Item5> - <Filename Value="opensoftstyle.pas"/> - <UnitName Value="OpenSoftStyle"/> - </Item5> - <Item6> - <Filename Value="db\fpgui_db.pas"/> - <UnitName Value="fpGUI_DB"/> - </Item6> - </Files> - <LazDoc Paths="..\docs\xml\gui\"/> - <RequiredPkgs Count="2"> - <Item1> - <PackageName Value="fpgfxpackage"/> - <MinVersion Minor="4" Valid="True"/> - </Item1> - <Item2> - <PackageName Value="FCL"/> - <MinVersion Major="1" Valid="True"/> - </Item2> - </RequiredPkgs> - <UsageOptions> - <UnitPath Value="$(PkgOutDir)\"/> - </UsageOptions> - <PublishOptions> - <Version Value="2"/> - <DestinationDirectory Value="$(TestDir)\publishedpackage\"/> - <IgnoreBinaries Value="False"/> - </PublishOptions> - </Package> -</CONFIG> diff --git a/gui/fpguipackage.pas b/gui/fpguipackage.pas deleted file mode 100644 index 1052517f..00000000 --- a/gui/fpguipackage.pas +++ /dev/null @@ -1,14 +0,0 @@ -{ This file was automatically created by Lazarus. Do not edit! -This source is only used to compile and install the package. - } - -unit fpguipackage; - -interface - -uses - fpGUI, StyleManager, WindowsStyle, MotifStyle, OpenSoftStyle, fpGUI_DB; - -implementation - -end. diff --git a/gui/fpguipanel.inc b/gui/fpguipanel.inc deleted file mode 100644 index b0fbf655..00000000 --- a/gui/fpguipanel.inc +++ /dev/null @@ -1,126 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Panel class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{ - Panel implementation. I mixture of Delphi's TPanel and TBevel. The class - name might change to Frame. -} - -{$IFDEF read_interface} - - TFCustomPanel = class(TFBinWidget) - private - FBevelStyle: TBevelStyle; - procedure SetBevelStyle(const AValue: TBevelStyle); - protected - procedure Paint(Canvas: TFCanvas); override; - procedure CalcSizes; override; - procedure Resized; override; - property BevelStyle: TBevelStyle read FBevelStyle write SetBevelStyle; - {$Note Still outstanding is the Shape and Color properties for starters } - public - constructor Create(const pText: string; pOwner: TComponent); overload; - end; - - - TFPanel = class(TFCustomPanel) - published - property CanExpandWidth; - property CanExpandHeight; - property Enabled; - property Text; - property BevelStyle; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - -procedure TFCustomPanel.SetBevelStyle(const AValue: TBevelStyle); -begin - if FBevelStyle = AValue then exit; - FBevelStyle := AValue; - Redraw; -end; - -procedure TFCustomPanel.Paint(Canvas: TFCanvas); -var - Pt: TPoint; -begin - inherited Paint(Canvas); - Style.DrawPanel(Canvas, Rect(0, 0, Width, Height), FBevelStyle); - - if Text <> '' then - begin - Canvas.SetColor(Style.GetUIColor(clBtnText)); - Pt.x := (BoundsSize.cx - Canvas.TextWidth(Text)) div 2; - Pt.y := (BoundsSize.cy - Canvas.FontCellHeight) div 2; - Style.DrawText(Canvas, Pt, Text, WidgetState); - end; -end; - -procedure TFCustomPanel.CalcSizes; -var - Borders: TRect; - LabelWidth: Integer; -begin - Borders := Style.GetGroupBoxBorders(TFCanvas(FindForm.Wnd.Canvas), Text, LabelWidth); - FMinSize.cx := Borders.Left + Borders.Right + LabelWidth; - FMinSize.cy := Borders.Top + Borders.Bottom; - if Assigned(Child) then - begin - if Child.MinSize.cx > LabelWidth then - FMinSize.cx := Borders.Left + Borders.Right + Child.MinSize.cx; - Inc(FMinSize.cy, Child.MinSize.cy); - if Child.DefSize.cx > LabelWidth then - FDefSize.cx := Borders.Left + Borders.Right + Child.MinSize.cx; - Inc(FDefSize.cy, Child.DefSize.cy); - if Child.MaxSize.cx > LabelWidth then - FMaxSize.cx := Min(Borders.Left + Borders.Right + Child.MaxSize.cx, InfiniteSize); - FMaxSize.cy := Min(MaxSize.cy + Child.MaxSize.cy, InfiniteSize); - end; -end; - -procedure TFCustomPanel.Resized; -var - LabelWidth: Integer; - Borders: TRect; -begin - LabelWidth := 0; - if Assigned(Child) then - begin - Borders := Style.GetGroupBoxBorders(TFCanvas(FindForm.Wnd.Canvas), Text, LabelWidth); - Child.SetBounds(Borders.TopLeft, Size(Width - Borders.Left - Borders.Right, - Height - Borders.Top - Borders.Bottom)); - end; -end; - -constructor TFCustomPanel.Create(const pText: string; pOwner: TComponent); -begin - Create(pOwner); - FCanExpandWidth := True; - FCanExpandHeight := True; - Text := pText; - FBevelStyle := bsRaised; -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguipopupwindow.inc b/gui/fpguipopupwindow.inc deleted file mode 100644 index 8a995e6b..00000000 --- a/gui/fpguipopupwindow.inc +++ /dev/null @@ -1,57 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - PopupWindow class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - - TFPopupWindow = class(TFCustomForm) - public - constructor Create(AOwner: TComponent); override; - procedure Show; override; - procedure Close; override; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - -constructor TFPopupWindow.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FParent := nil; - FWindowOptions := FWindowOptions + [woBorderless, woPopup]; -end; - - -procedure TFPopupWindow.Show; -begin - inherited Show; - LAYOUTTRACE('TFPopupWindow.Show for %s:%s', [Name, ClassName]); - Wnd.CaptureMouse; -end; - - -procedure TFPopupWindow.Close; -begin - Wnd.ReleaseMouse; - inherited Close; -end; - -{$ENDIF read_implementation} - diff --git a/gui/fpguiprogressbar.inc b/gui/fpguiprogressbar.inc deleted file mode 100644 index 0f8f4dd0..00000000 --- a/gui/fpguiprogressbar.inc +++ /dev/null @@ -1,159 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Progress Bar class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{ - Progress Bar implementation -} - -{$IFDEF read_interface} - - { TCustomProgressBar } - - TFCustomProgressBar = class(TFCustomPanel) - private - FFillColor: TColor; - FMax: integer; - FMin: integer; - FPosition: integer; - FShowPercentage: Boolean; - procedure SetFillColor(const AValue: TColor); - procedure SetMax(const AValue: integer); - procedure SetMin(const AValue: integer); - procedure SetPosition(const AValue: integer); - procedure SetShowPercentage(const AValue: Boolean); - protected - procedure Paint(Canvas: TFCanvas); override; - property FillColor: TColor read FFillColor write SetFillColor default clRed; - property Position: integer read FPosition write SetPosition; - property Min: integer read FMin write SetMin default 0; - property Max: integer read FMax write SetMax default 100; - property ShowPercentage: Boolean read FShowPercentage write SetShowPercentage default True; - public - constructor Create(const pText: string; pOwner: TComponent); overload; - end; - - - TFProgressBar = class(TFCustomProgressBar) - published - property CanExpandWidth; - property CanExpandHeight; - property Enabled; -// property Text; - property FillColor; - property Position; - property Min; - property Max; - property ShowPercentage; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - -procedure TFCustomProgressBar.SetFillColor(const AValue: TColor); -begin - if FFillColor = AValue then exit; - FFillColor := AValue; - Redraw; -end; - -procedure TFCustomProgressBar.SetMax(const AValue: integer); -begin - if FMax = AValue then exit; - FMax := AValue; - if FPosition > FMax then - FPosition := FMax; - Redraw; -end; - -procedure TFCustomProgressBar.SetMin(const AValue: integer); -begin - if FMin = AValue then exit; - FMin := AValue; - if FPosition < FMin then - FPosition := FMin; - Redraw; -end; - -procedure TFCustomProgressBar.SetPosition(const AValue: integer); -begin - if FPosition = AValue then - exit; //==> - if (AValue >= Min) and (AValue <= Max) then - begin - FPosition := AValue; - Redraw; - end; -end; - -procedure TFCustomProgressBar.SetShowPercentage(const AValue: Boolean); -begin - if FShowPercentage = AValue then - Exit; //==> - FShowPercentage := AValue; - Redraw; -end; - -procedure TFCustomProgressBar.Paint(Canvas: TFCanvas); -var - Pt: TPoint; - r: TRect; - p: integer; - percent: integer; - t: string; -begin - FText := ''; - inherited Paint(Canvas); - Canvas.SetColor(Style.GetUIColor(FFillColor)); - - percent := (100 div (Max - Min)) * FPosition; - p := (percent * (Width - 3)) div 100; - - r := Rect( - ClientRect.Left + 3, - ClientRect.Top + 3, - p, - ClientRect.Bottom - 3); - Canvas.FillRect(r); - - if FShowPercentage then - begin - t := IntToStr(percent) + '%'; - Pt.x := (Width - Canvas.TextWidth(t)) div 2; - Pt.y := (Height - Canvas.FontCellHeight) div 2; - Canvas.SetColor(Style.GetUIColor(clBtnText)); - Style.DrawText(Canvas, Pt, t, WidgetState); - end; -end; - -constructor TFCustomProgressBar.Create(const pText: string; pOwner: TComponent); -begin - inherited Create(pText, pOwner); - FCanExpandHeight := False; - FBevelStyle := bsLowered; - FFillColor := clRed; - FMin := 0; - FMax := 100; - FShowPercentage := True; -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguiradiobutton.inc b/gui/fpguiradiobutton.inc deleted file mode 100644 index 58240ac6..00000000 --- a/gui/fpguiradiobutton.inc +++ /dev/null @@ -1,139 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - RadioButton class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - - { TFCustomRadioButton } - - TFCustomRadioButton = class(TFWidget) - private - procedure SetChecked(AChecked: Boolean); - protected - FChecked: Boolean; - FLabelPos: TPoint; - procedure Click; override; - procedure Paint(Canvas: TFCanvas); override; - procedure CalcSizes; override; - property Checked: Boolean read FChecked write SetChecked; - public - constructor Create(AOwner: TComponent); override; - constructor Create(const pText: string; pOwner: TComponent); overload; - end; - - - TFRadioButton = class(TFCustomRadioButton) - published - property CanExpandWidth; - property CanExpandHeight; - property Enabled; - property Checked; - property Text; - property OnClick; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - - -// =================================================================== -// TFCustomRadioButton -// =================================================================== - -constructor TFCustomRadioButton.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - WidgetStyle := WidgetStyle + [wsCaptureMouse, wsClickable]; -end; - - -constructor TFCustomRadioButton.Create(const pText: string; pOwner: TComponent); -begin - Create(pOwner); - Text := pText; -end; - - -procedure TFCustomRadioButton.Click; -begin - if not Checked then - SetChecked(True); - inherited Click; -end; - - -procedure TFCustomRadioButton.Paint(Canvas: TFCanvas); -var - FontHeight: Integer; - LabelRect: TRect; - Flags: TFCheckboxFlags; -begin - FontHeight := Canvas.FontCellHeight; - LabelRect.Left := FLabelPos.x; - LabelRect.Top := FLabelPos.y + (Height - MinSize.cy) div 2; - LabelRect.Right := LabelRect.Left + Canvas.TextWidth(Text); - LabelRect.Bottom := LabelRect.Top + FontHeight; - - Flags := []; - if (wsClicked in WidgetState) and (wsMouseInside in WidgetState) then - Include(Flags, cbIsPressed); - if (wsHasFocus in WidgetState) and FindForm.IsActive then - Include(Flags, cbHasFocus); - if wsEnabled in WidgetState then - Include(Flags, cbIsEnabled); - if Checked then - Include(Flags, cbIsChecked); - - Style.DrawRadioButton(Canvas, Rect(0, 0, Width, Height), LabelRect, Flags); - Canvas.SetColor(Style.GetUIColor(clWindowText)); - Style.DrawText(Canvas, LabelRect.TopLeft, Text, WidgetState); -end; - -procedure TFCustomRadioButton.CalcSizes; -begin - with FindForm.Wnd.Canvas do - Style.GetRadioButtonLayout(gfxbase.Size(TextWidth(Text), FontCellHeight), - FMinSize, FLabelPos); -end; - -procedure TFCustomRadioButton.SetChecked(AChecked: Boolean); -var - i: Integer; - Child: TFWidget; -begin - if AChecked <> Checked then - begin - FChecked := AChecked; - Redraw; - - if Checked and Assigned(Parent) and - Parent.InheritsFrom(TFContainerWidget) then - for i := 0 to TFContainerWidget(Parent).ChildCount - 1 do - begin - Child := TFContainerWidget(Parent).Children[i]; - if (Child <> Self) and Child.InheritsFrom(TFCustomRadioButton) then - TFCustomRadioButton(Child).Checked := False; - end; - end; -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguiscrollbar.inc b/gui/fpguiscrollbar.inc deleted file mode 100644 index c3dfa195..00000000 --- a/gui/fpguiscrollbar.inc +++ /dev/null @@ -1,723 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - ScrollBar class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - - // !!!: Add argument which indicates the type of scrolling - TScrollEvent = procedure(Sender: TObject; var APosition: Integer) of object; - - - TFCustomScrollBar = class(TFWidget) - private - FOrientation: TOrientation; - FMin: Integer; - FMax: Integer; - FPageSize: Integer; - FPosition: Integer; - FSmallChange: Integer; - FLargeChange: Integer; - FOnChange: TNotifyEvent; - FOnScroll: TScrollEvent; - ButtonUp: TFGenericButton; - ButtonDown: TFGenericButton; - Slider: TFWidget; - Embedded: Boolean; // for internal embedded usage! - - // Event handling - procedure ButtonUpClick(Sender: TObject); - procedure ButtonDownClick(Sender: TObject); - // Property access - procedure SetOrientation(AOrientation: TOrientation); - procedure SetMin(AMin: Integer); - procedure SetMax(AMax: Integer); - procedure SetPageSize(APageSize: Integer); - procedure SetPosition(APosition: Integer); - // Helpers - function GetButtonSize: Integer; - function ClipPosition(APosition: Integer): Integer; - procedure UpdateBar; - protected - function DistributeEvent(Event: TEventObj): Boolean; override; - procedure Paint(Canvas: TFCanvas); override; - procedure CalcSizes; override; - procedure Resized; override; - property Orientation: TOrientation read FOrientation write SetOrientation; - property Min: Integer read FMin write SetMin default 0; - property Max: Integer read FMax write SetMax default 100; - property PageSize: Integer read FPageSize write SetPageSize; - property Position: Integer read FPosition write SetPosition default 0; - property SmallChange: Integer read FSmallChange write FSmallChange default 1; - property LargeChange: Integer read FLargeChange write FLargeChange default 0; - property OnChange: TNotifyEvent read FOnChange write FOnChange; - property OnScroll: TScrollEvent read FOnScroll write FOnScroll; - public - constructor Create(AOwner: TComponent); override; - procedure LineUp; - procedure LineDown; - procedure PageUp; - procedure PageDown; - end; - - - TFScrollBar = class(TFCustomScrollBar) - published - property Enabled; - property Orientation; - property Min; - property Max; - property PageSize; - property Position; - property SmallChange; - property LargeChange; - property OnChange; - property OnScroll; - end; - - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - - - -// =================================================================== -// TFCustomScrollBar and helper classes -// =================================================================== - -// ------------------------------------------------------------------- -// TFScrollBarButton -// ------------------------------------------------------------------- - -type - { Private button type only used for scrollbars. } - TFScrollBarButton = class(TFGenericButton) - protected - procedure Paint(Canvas: TFCanvas); override; - procedure CalcSizes; override; - public - Direction: TArrowDirection; - end; - - -procedure TFScrollBarButton.Paint(Canvas: TFCanvas); -begin - inherited Paint(Canvas); - Style.DrawScrollBarButton(Canvas, Rect(0, 0, BoundsSize.cx, BoundsSize.cy), - Direction, (wsClicked in WidgetState) and (wsMouseInside in WidgetState), - wsEnabled in WidgetState); -end; - - -procedure TFScrollBarButton.CalcSizes; -begin - ASSERT(Owner is TFCustomScrollBar); - FMinSize := Style.GetScrollBarBtnSize(TFCustomScrollBar(Owner).Orientation); -end; - - -// ------------------------------------------------------------------- -// TFScrollBarSlider -// ------------------------------------------------------------------- - -type - TFScrollBarSlider = class(TFWidget) - private - function EvMousePressed(Event: TMousePressedEventObj): Boolean; - function EvMouseReleased(Event: TMouseReleasedEventObj): Boolean; - function EvMouseMove(Event: TMouseMoveEventObj): Boolean; - protected - ButtonPos: Integer; - ButtonSize: Integer; - IsDraggingButton: Boolean; - PrevAreaPressed: Boolean; - NextAreaPressed: Boolean; - DragStartMousePos: Integer; - DragStarTFButtonPos: Integer; -// ButtonMoveSavedPosition: Integer; - procedure Paint(Canvas: TFCanvas); override; - function ProcessEvent(Event: TEventObj): Boolean; override; - procedure CalcSizes; override; - function CalcPosition: Integer; - public - constructor Create(AOwner: TComponent); override; - procedure UpdateBar; - end; - - -constructor TFScrollBarSlider.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - WidgetStyle := WidgetStyle + [wsCaptureMouse, wsClickable, wsOpaque]; -end; - -procedure TFScrollBarSlider.UpdateBar; -var - Size: Integer; -begin - ASSERT(Owner is TFCustomScrollBar); - - if Visible then - begin - with TFCustomScrollBar(Owner) do - begin - if (Min = Max) or (Max - Min = PageSize - 1) then - ButtonPos := 0 - else - begin - if Orientation = Horizontal then - Size := Self.BoundsSize.cx - else - Size := Self.BoundsSize.cy; - - if PageSize = 0 then - ButtonPos := (Position - Min) * (Size - ButtonSize) div (Max - Min) - else - ButtonPos := (Position - Min) * - (Size - ButtonSize) div (Max - Min - PageSize + 1); - end; - ButtonSize := GetButtonSize; - end; - Redraw; - end; -end; - -procedure TFScrollBarSlider.Paint(Canvas: TFCanvas); -var - Size: Integer; - r: TRect; - StartPos, EndPos: PInteger; - Color2: TColor; -begin - ASSERT(Owner is TFCustomScrollBar); - inherited Paint(Canvas); - - if TFCustomScrollBar(Owner).Orientation = Horizontal then - begin - r.Top := 0; - r.Bottom := Height; - StartPos := @r.Left; - EndPos := @r.Right; - Size := Width; - end else - begin - r.Left := 0; - r.Right := Width; - StartPos := @r.Top; - EndPos := @r.Bottom; - Size := Height; - end; - - if ButtonPos > 0 then - begin - if PrevAreaPressed then - Color2 := cl3DDkShadow - else - Color2 := cl3DLight; - Canvas.SetColor(GetAvgColor(Style.GetUIColor(clScrollBar), - Style.GetUIColor(Color2))); - StartPos^ := 0; - EndPos^ := ButtonPos; - Canvas.FillRect(r); - end; - if ButtonPos + ButtonSize < Size then - begin - if NextAreaPressed then - Color2 := cl3DDkShadow - else - Color2 := cl3DLight; - Canvas.SetColor(GetAvgColor(Style.GetUIColor(clScrollBar), - Style.GetUIColor(Color2))); - StartPos^ := ButtonPos + ButtonSize; - EndPos^ := Size; - Canvas.FillRect(r); - end; - - StartPos^ := ButtonPos; - EndPos^ := ButtonPos + ButtonSize; - Style.DrawButtonFace(Canvas, r, [btnIsEmbedded]); -end; - -function TFScrollBarSlider.ProcessEvent(Event: TEventObj): Boolean; -begin - Result := False; - if Event.InheritsFrom(TMousePressedEventObj) then - Result := EvMousePressed(TMousePressedEventObj(Event)) - else if Event.InheritsFrom(TMouseReleasedEventObj) then - Result := EvMouseReleased(TMouseReleasedEventObj(Event)) - else if Event.InheritsFrom(TMouseMoveEventObj) then - Result := EvMouseMove(TMouseMoveEventObj(Event)); - - if not Result then - Result := inherited ProcessEvent(Event); - - if Event.InheritsFrom(TVisibilityChangeEventObj) and Visible then - UpdateBar; -end; - -function TFScrollBarSlider.EvMousePressed(Event: TMousePressedEventObj): Boolean; -var - Pos: Integer; -begin - Result := inherited ProcessEvent(Event); // For mouse grabbing support - - if Event.Button <> mbLeft then - Exit; //==> - - if TFCustomScrollBar(Owner).Orientation = Horizontal then - Pos := Event.Position.x - else - Pos := Event.Position.y; - - if Pos < ButtonPos then - begin - PrevAreaPressed := True; - TFCustomScrollBar(Owner).PageUp - end - else if Pos > ButtonPos + ButtonSize then - begin - NextAreaPressed := True; - TFCustomScrollBar(Owner).PageDown - end - else - begin - IsDraggingButton := True; - DragStartMousePos := Pos; - DragStarTFButtonPos := ButtonPos; - end; - - Result := True; -end; - -function TFScrollBarSlider.EvMouseReleased(Event: TMouseReleasedEventObj): Boolean; -var - NewPosition: Integer; -begin - Result := inherited ProcessEvent(Event); // For mouse grabbing support - - if Event.Button <> mbLeft then - Exit; //==> - - if IsDraggingButton then - begin - IsDraggingButton := False; - NewPosition := CalcPosition; - if NewPosition <> TFCustomScrollBar(Owner).Position then - begin - if Assigned(TFCustomScrollBar(Owner).OnScroll) then - TFCustomScrollBar(Owner).OnScroll(Owner, NewPosition); - TFCustomScrollBar(Owner).FPosition := NewPosition; - end; - if (NewPosition <> DragStartMousePos) and - Assigned(TFCustomScrollBar(Owner).OnChange) then - TFCustomScrollBar(Owner).OnChange(Self); - UpdateBar; - end - else if PrevAreaPressed then - begin - PrevAreaPressed := False; - Redraw; - end - else if NextAreaPressed then - begin - NextAreaPressed := False; - Redraw; - end; - Result := True; -end; - -function TFScrollBarSlider.EvMouseMove(Event: TMouseMoveEventObj): Boolean; -var - Pos, Size, VirtualPos: Integer; -begin - if IsDraggingButton then - begin -// We can maybe make this a scrollbar option. Reset scrollbar thumb when -// mouse moves out of bounds of scrollbar. For now it is just anoying. -// if wsMouseInside in WidgetState then -// begin - if TFCustomScrollBar(Owner).Orientation = Horizontal then - begin - Pos := Event.Position.x; - Size := Width; - end else - begin - Pos := Event.Position.y; - Size := Height; - end; -// end -// else -// begin -// Pos := DragStartMousePos; -// if TFCustomScrollBar(Owner).Orientation = Horizontal then -// Size := Width -// else -// Size := Height; -// end; { if/else } - - ButtonPos := ClipMinMax(DragStarTFButtonPos + Pos - DragStartMousePos, - 0, Size - ButtonSize); - VirtualPos := CalcPosition; - - if VirtualPos <> TFCustomScrollBar(Owner).Position then - begin - if Assigned(TFCustomScrollBar(Owner).OnScroll) then - TFCustomScrollBar(Owner).OnScroll(Owner, VirtualPos); - TFCustomScrollBar(Owner).FPosition := VirtualPos; - end; - - Redraw; - Result := True - end - else - Result := False; -end; - -procedure TFScrollBarSlider.CalcSizes; -begin - if TFCustomScrollBar(Owner).Orientation = Horizontal then - FDefSize.cx := Style.GetScrollBarBtnSize(Horizontal).cy * 5 - else - FDefSize.cy := Style.GetScrollBarBtnSize(Vertical).cx * 5; -end; - -function TFScrollBarSlider.CalcPosition: Integer; -var - Size: Integer; - lOwner: TFCustomScrollBar; -begin - Assert(Owner is TFCustomScrollBar); - lOwner := TFCustomScrollBar(Owner); - - if lOwner.Orientation = Horizontal then - Size := Width - else - Size := Height; - - if Size = ButtonSize then - lOwner.Position := 0 - else - begin - if lOwner.PageSize = 0 then - Result := ButtonPos * (lOwner.Max - lOwner.Min + 1) - else - Result := ButtonPos * (lOwner.Max - lOwner.Min - lOwner.PageSize + 2); - Result := Result div (Size - ButtonSize); - Result := Result + lOwner.Min; - end; - Result := lOwner.ClipPosition(Result); -end; - - -// ------------------------------------------------------------------- -// TFCustomScrollBar -// ------------------------------------------------------------------- - -constructor TFCustomScrollBar.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - Include(WidgetStyle, wsOpaque); - Embedded := False; - - FMax := 100; - FSmallChange := 1; - - ButtonUp := TFScrollBarButton.Create(Self); - ButtonUp.Name := '_ScrollBarButtonUp'; - TFScrollBarButton(ButtonUp).Direction := arrowLeft; - ButtonUp.Embedded := True; - ButtonUp.CanExpandWidth := False; - ButtonUp.CanExpandHeight := False; - ButtonUp.OnClick := @ButtonUpClick; - ButtonUp.SetEmbeddedParent(Self); - - Slider := TFScrollBarSlider.Create(Self); - Slider.Name := '_ScrollBarSlider'; - Slider.SetEmbeddedParent(Self); - - ButtonDown := TFScrollBarButton.Create(Self); - ButtonDown.Name := '_ScrollBarButtonDown'; - TFScrollBarButton(ButtonDown).Direction := arrowRight; - ButtonDown.Embedded := True; - ButtonDown.CanExpandWidth := False; - ButtonDown.CanExpandHeight := False; - ButtonDown.OnClick := @ButtonDownClick; - ButtonDown.SetEmbeddedParent(Self); -end; - -procedure TFCustomScrollBar.LineUp; -begin - Position := Position - SmallChange; -end; - -procedure TFCustomScrollBar.LineDown; -begin - Position := Position + SmallChange; -end; - -procedure TFCustomScrollBar.PageUp; -var - Diff: Integer; -begin - if LargeChange = 0 then - begin - Diff := (Max - Min + 6) div 10; - if Diff = 0 then - Inc(Diff); - Position := Position - Diff; - end else - Position := Position - LargeChange; -end; - - -procedure TFCustomScrollBar.PageDown; -var - Diff: Integer; -begin - if LargeChange = 0 then - begin - Diff := (Max - Min + 6) div 10; - if Diff = 0 then - Inc(Diff); - Position := Position + Diff; - end else - Position := Position + LargeChange; -end; - - -function TFCustomScrollBar.DistributeEvent(Event: TEventObj): Boolean; -begin - Result := Event.SendToChild(Slider) or Event.SendToChild(ButtonUp) or - Event.SendToChild(ButtonDown); -end; - - -procedure TFCustomScrollBar.Paint(Canvas: TFCanvas); -begin - if not Embedded then - Style.DrawScrollBarBorder(Canvas, Rect(0, 0, Width, Height)); -end; - - -procedure TFCustomScrollBar.CalcSizes; -begin - if Orientation = Horizontal then - begin - FMinSize.cx := ButtonUp.DefSize.cx + Slider.MinSize.cx + ButtonDown.DefSize.cx; - FMinSize.cy := ButtonUp.DefSize.cy; - FDefSize.cx := ButtonUp.DefSize.cx + Slider.DefSize.cx + ButtonDown.DefSize.cx; - FDefSize.cy := ButtonUp.DefSize.cy; - FMaxSize.cx := InfiniteSize; - FMaxSize.cy := ButtonUp.DefSize.cy; - end else - begin - FMinSize.cx := ButtonUp.DefSize.cx; - FMinSize.cy := ButtonUp.DefSize.cy + Slider.MinSize.cy + ButtonDown.DefSize.cy; - FDefSize.cx := ButtonUp.DefSize.cx; - FDefSize.cy := ButtonUp.DefSize.cy + Slider.DefSize.cy + ButtonDown.DefSize.cy; - FMaxSize.cx := ButtonUp.DefSize.cx; - FMaxSize.cy := InfiniteSize; - end; - - if not Embedded then - with Style.GetScrollBarBorders(Orientation) do - begin - Inc(FMinSize.cx, Left + Right); - Inc(FMinSize.cy, Top + Bottom); - FDefSize.cx := Math.Min(DefSize.cx + Left + Right, InfiniteSize); - FDefSize.cy := Math.Min(DefSize.cy + Top + Bottom, InfiniteSize); - FMaxSize.cx := Math.Min(MaxSize.cx + Left + Right, InfiniteSize); - FMaxSize.cy := Math.Min(MaxSize.cy + Top + Bottom, InfiniteSize); - end; -end; - - -procedure TFCustomScrollBar.Resized; -var - r: TRect; -begin - if not Embedded then - with Style.GetScrollBarBorders(Orientation) do - begin - r.Left := Left; - r.Top := Top; - r.Right := Width - Right; - r.Bottom := Height - Bottom; - end - else - begin - r.Left := 0; - r.Top := 0; - r.Right := Width; - r.Bottom := Height; - end; - - with r do - if Orientation = Horizontal then - begin - ButtonUp.SetBounds(TopLeft, Size(ButtonUp.DefSize.cx, Bottom - Top)); - ButtonDown.SetBounds(Point(Right - ButtonDown.DefSize.cx, Top), - Size(ButtonDown.DefSize.cx, Bottom - Top)); - Slider.SetBounds(Point(Left + ButtonUp.DefSize.cx, Top), - Size(Right - Left - ButtonUp.DefSize.cx - ButtonDown.DefSize.cx, - Bottom - Top)); - end - else - begin - ButtonUp.SetBounds(TopLeft, Size(Right - Left, ButtonDown.DefSize.cy)); - ButtonDown.SetBounds(Point(Left, Bottom - ButtonDown.DefSize.cy), - Size(Right - Left, ButtonDown.DefSize.cy)); - Slider.SetBounds(Point(Left, Top + ButtonUp.DefSize.cy), - Size(Right - Left, - Bottom - Top - ButtonUp.DefSize.cy - ButtonDown.DefSize.cy)); - end; - - UpdateBar; -end; - - -procedure TFCustomScrollBar.ButtonUpClick(Sender: TObject); -begin - LineUp; -end; - - -procedure TFCustomScrollBar.ButtonDownClick(Sender: TObject); -begin - LineDown; -end; - - -procedure TFCustomScrollBar.SetOrientation(AOrientation: TOrientation); -begin - if AOrientation <> Orientation then - begin - FOrientation := AOrientation; - if Orientation = Horizontal then - begin - TFScrollBarButton(ButtonUp).Direction := arrowLeft; - TFScrollBarButton(ButtonDown).Direction := arrowRight; - end else - begin - TFScrollBarButton(ButtonUp).Direction := arrowUp; - TFScrollBarButton(ButtonDown).Direction := arrowDown; - end; - end; -end; - - -procedure TFCustomScrollBar.SetMin(AMin: Integer); -begin - if AMin <> FMin then - begin - FMin := AMin; - Position := Position; // Do range clipping - UpdateBar; - end; -end; - - -procedure TFCustomScrollBar.SetMax(AMax: Integer); -begin - if AMax <> FMax then - begin - FMax := AMax; - Position := Position; // Do range clipping - UpdateBar; - end; -end; - - -procedure TFCustomScrollBar.SetPageSize(APageSize: Integer); -begin - if FPageSize <> APageSize then - begin - FPageSize := APageSize; - Position := Position; // Do range clipping - UpdateBar; - end; -end; - - -procedure TFCustomScrollBar.SetPosition(APosition: Integer); -begin - APosition := ClipPosition(APosition); - - if (APosition <> Position) and Assigned(OnScroll) then - OnScroll(Self, APosition); - - if APosition <> Position then - begin - FPosition := APosition; - UpdateBar; - if Assigned(OnChange) then - OnChange(Self); - end; -end; - - -function TFCustomScrollBar.GetButtonSize: Integer; -var - Size: Integer; -begin - if PageSize = 0 then - if Orientation = Horizontal then - Result := Height - else - Result := Width - else - begin - if Orientation = Horizontal then - Size := Slider.Width - else - Size := Slider.Height; - Result := Math.Max(Style.GetScrollBarBtnMinSize, - PageSize * Size div Math.Max(1, Max - Min + 1)); - if Result > Size then - Result := Size; - end; -end; - - -function TFCustomScrollBar.ClipPosition(APosition: Integer): Integer; -begin - if APosition > (Max - PageSize) then - begin - if PageSize = 0 then - Result := Max - else - Result := Max - PageSize + 1; - end - else - Result := APosition; - if Result < Min then - Result := Min; -end; - - -procedure TFCustomScrollBar.UpdateBar; -begin - if Embedded then - Visible := (Max > Min) and ((PageSize = 0) or (PageSize <= Max - Min)); - TFScrollBarSlider(Slider).UpdateBar; -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguiscrollbox.inc b/gui/fpguiscrollbox.inc deleted file mode 100644 index d374da10..00000000 --- a/gui/fpguiscrollbox.inc +++ /dev/null @@ -1,428 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - ScrollBox class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{ Scrolling support implementation } - -{$IFDEF read_interface} - - TScrollingSupport = class - private - Parent: TFWidget; - FBorders: TRect; - FClientRect: TRect; - FVirtualSize: TSize; - FHorzScrollBar, FVertScrollBar: TFScrollBar; - FOnClientRectChange: TNotifyEvent; - function EvMouseWheel(Event: TMouseWheelEventObj): Boolean; - procedure EvKeyPressed(Key: Word; Shift: TShiftState); - protected - public - constructor Create(AParent: TFWidget); - destructor Destroy; override; - function ProcessEvent(Event: TEventObj): Boolean; - function DistributeEvent(Event: TEventObj): Boolean; - function SendToChild(AChild: TFWidget; Event: TEventObj): Boolean; - procedure CalcSizes; - procedure Resized; - function CalcClientSize(AHorzBarVisible, AVertBarVisible: Boolean): TSize; - procedure SetVirtualSize(const ASize: TSize); - function ScrollPos: TPoint; - procedure DefHorzScrollHandler(Sender: TObject; var APosition: Integer); - procedure DefVertScrollHandler(Sender: TObject; var APosition: Integer); - property Borders: TRect read FBorders; - property ClientRect: TRect read FClientRect; - property HorzScrollBar: TFScrollBar read FHorzScrollBar; - property VertScrollBar: TFScrollBar read FVertScrollBar; - property OnClientRectChange: TNotifyEvent read FOnClientRectChange write FOnClientRectChange; - end; - - - TFCustomScrollBox = class(TFWidget) - protected - ScrollingSupport: TScrollingSupport; - procedure Paint(Canvas: TFCanvas); override; - function ProcessEvent(Event: TEventObj): Boolean; override; - function DistributeEvent(Event: TEventObj): Boolean; override; - procedure CalcSizes; override; - procedure Resized; override; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - end; - - - TFScrollBox = class(TFCustomScrollBox) - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - -// =================================================================== -// TScrollingSupport -// =================================================================== - -constructor TScrollingSupport.Create(AParent: TFWidget); -begin - Parent := AParent; - - FHorzScrollBar := TFScrollBar.Create(Parent); - HorzScrollBar.Name := '_Scrolling_HorzBar'; - HorzScrollBar.Embedded := True; - HorzScrollBar.SetEmbeddedParent(Parent); - - FVertScrollBar := TFScrollBar.Create(Parent); - VertScrollBar.Name := '_Scrolling_VertBar'; - VertScrollBar.Orientation := Vertical; - VertScrollBar.Embedded := True; - VertScrollBar.SetEmbeddedParent(Parent); -end; - -destructor TScrollingSupport.Destroy; -begin - inherited Destroy; -end; - -function TScrollingSupport.ProcessEvent(Event: TEventObj): Boolean; -var - HorzScrollBarHeight, VertScrollBarWidth: Integer; - Canvas: TFCanvas; -begin - if Event.InheritsFrom(TPaintEventObj) then - begin - if HorzScrollBar.Visible then - HorzScrollBarHeight := HorzScrollBar.MinSize.cy - else - HorzScrollBarHeight := 0; - - if VertScrollBar.Visible then - VertScrollBarWidth := VertScrollBar.MinSize.cx - else - VertScrollBarWidth := 0; - - Canvas := TPaintEventObj(Event).Canvas; - Parent.Style.DrawScrollBoxBorder(Canvas, - Rect(0, 0, Parent.Width, Parent.Height)); - Parent.Style.DrawWindowBackground(Canvas, Rect(VertScrollBar.Left, - HorzScrollBar.Top, VertScrollBar.Left + VertScrollBarWidth, - HorzScrollBar.Top + HorzScrollBarHeight)); - Result := False; - end else if Event.InheritsFrom(TMouseWheelEventObj) then - Result := EvMouseWheel(TMouseWheelEventObj(Event)) - else if Event.InheritsFrom(TMouseWheelEventObj) then - Result := EvMouseWheel(TMouseWheelEventObj(Event)) - else - Result := False; -end; - -function TScrollingSupport.DistributeEvent(Event: TEventObj): Boolean; -begin - Result := Event.SendToChild(HorzScrollBar) or - Event.SendToChild(VertScrollBar); -end; - -function TScrollingSupport.SendToChild(AChild: TFWidget; - Event: TEventObj): Boolean; -var - Canvas: TFCanvas; - OldMatrix: TGfxMatrix; -begin - if Event.InheritsFrom(TPreparePaintEventObj) then - begin - Canvas := TPaintEventObj(Event).Canvas; - OldMatrix := Canvas.Matrix; - Canvas.AppendTranslation(Point(ClientRect.Left - HorzScrollBar.Position, - ClientRect.Top - VertScrollBar.Position)); - Result := Event.SendToChild(AChild); - Canvas.Matrix := OldMatrix; - end else if Event.InheritsFrom(TPaintEventObj) then - begin - Canvas := TPaintEventObj(Event).Canvas; - Canvas.SaveState; - try - Canvas.AppendTranslation(Point(-HorzScrollBar.Position, -VertScrollBar.Position)); - if Canvas.IntersectClipRect(ClientRect) {and Canvas.IntersectClipRect( - Rect(AChild.Left + ClientRect.Left, AChild.Top + ClientRect.Top, - AChild.Left + AChild.Width + ClientRect.Left, - AChild.Top + AChild.Height + ClientRect.Top))} then - begin - {Canvas.AppendTranslation(AChild.Left + ClientRect.Left, - AChild.Top + ClientRect.Top); - Inc(Event.RefCount); - Result := AChild.SendEvent(Event);} - Canvas.AppendTranslation(ClientRect.TopLeft); - Result := Event.SendToChild(AChild); - end else - Result := False; - finally - Canvas.RestoreState; - end; - end else - Result := Event.SendToChild(AChild); -end; - -procedure TScrollingSupport.CalcSizes; -begin - FBorders := Parent.Style.GetScrollBoxBorders; - with Parent, Borders do - begin - FMinSize := HorzScrollBar.MinSize + VertScrollBar.MinSize + - TopLeft + BottomRight; - FDefSize := HorzScrollBar.DefSize + VertScrollBar.DefSize + - TopLeft + BottomRight; - end; -end; - -procedure TScrollingSupport.Resized; -var - HorzScrollBarHeight, VertScrollBarWidth: Integer; - - procedure CalcScrollBarSizes; - begin - if HorzScrollBar.Visible then - HorzScrollBarHeight := HorzScrollBar.MinSize.cy - else - HorzScrollBarHeight := 0; - - if VertScrollBar.Visible then - VertScrollBarWidth := VertScrollBar.MinSize.cx - else - VertScrollBarWidth := 0; - end; - -var - Canvas: TFCanvas; - HorzBarVisible, VertBarVisible, - LastHorzBarVisible, LastVertBarVisible: Boolean; -begin - HorzBarVisible := HorzScrollBar.Visible; - VertBarVisible := VertScrollBar.Visible; - LastHorzBarVisible := not HorzBarVisible; - - if FVirtualSize <> gfxbase.Size(0, 0) then - with Size(ClientRect) do - begin - HorzScrollBar.PageSize := cx; - VertScrollBar.PageSize := cy; - end; - - FBorders := Parent.Style.GetScrollBoxBorders; - with FBorders do - begin - while (HorzBarVisible <> LastHorzBarVisible) or - (VertBarVisible <> LastVertBarVisible) do - begin - LastHorzBarVisible := HorzBarVisible; - LastVertBarVisible := VertBarVisible; - CalcScrollBarSizes; - HorzScrollBar.SetBounds( - Point(Left, Parent.Height - HorzScrollBar.MinSize.cy - Bottom), - Size(Parent.Width - VertScrollBarWidth - Left - Right, HorzScrollBar.MinSize.cy)); - VertScrollBar.SetBounds( - Point(Parent.Width - VertScrollBar.MinSize.cx - Right, Top), - Size(VertScrollBar.MinSize.cx, Parent.Height - HorzScrollBarHeight - Top - Bottom)); - - ClientRect.Left := Left; - ClientRect.Top := Top; - ClientRect.Right := Parent.Width - Right - VertScrollBarWidth; - ClientRect.Bottom := Parent.Height - Bottom - HorzScrollBarHeight; - if Assigned(OnClientRectChange) then - OnClientRectChange(Self); - - HorzBarVisible := HorzScrollBar.Visible; - VertBarVisible := VertScrollBar.Visible; - end; - end; -end; - -function TScrollingSupport.CalcClientSize(AHorzBarVisible, - AVertBarVisible: Boolean): TSize; -begin - FBorders := Parent.Style.GetScrollBoxBorders; - Result := Parent.BoundsSize - Borders.TopLeft - Borders.BottomRight; - if AVertBarVisible then - Dec(Result.cx, VertScrollBar.MinSize.cx); - if AHorzBarVisible then - Dec(Result.cy, HorzScrollBar.MinSize.cy); -end; - -procedure TScrollingSupport.SetVirtualSize(const ASize: TSize); -begin - FVirtualSize := ASize; - HorzScrollBar.Max := FVirtualSize.cx; - VertScrollBar.Max := FVirtualSize.cy; -end; - -function TScrollingSupport.ScrollPos: TPoint; -begin - Result.x := HorzScrollBar.Position; - Result.y := VertScrollBar.Position; -end; - -procedure TScrollingSupport.DefHorzScrollHandler(Sender: TObject; var APosition: Integer); -var - Delta: Integer; - r: TRect; -begin - Delta := HorzScrollBar.Position - APosition; - r := ClientRect; - if Delta < 0 then // Scrolling to the right side - Dec(r.Left, Delta) - else // Scrolling to the left side - Dec(r.Right, Delta); - Parent.Scroll(r, Delta, 0); -end; - -procedure TScrollingSupport.DefVertScrollHandler(Sender: TObject; - var APosition: Integer); -var - Delta: Integer; - r: TRect; -begin - Delta := VertScrollBar.Position - APosition; - r := ClientRect; - if Delta < 0 then // Scrolling downwards - Dec(r.Top, Delta) - else // Scrolling upwards - Dec(r.Bottom, Delta); - Parent.Scroll(r, 0, Delta); -end; - -function TScrollingSupport.EvMouseWheel(Event: TMouseWheelEventObj): Boolean; -var - mshift: TShiftState; -begin - if Parent.DistributeEvent(Event) then - Exit; //==> - - mshift := Event.Shift * [ssShift, ssAlt, ssCtrl, ssMeta, - ssSuper, ssHyper, ssAltGr]; - - if not VertScrollBar.Visible then - Include(mshift, ssShift); - - if mshift = [] then - VertScrollBar.Position := VertScrollBar.Position + - Round(Event.WheelDelta * VertScrollBar.SmallChange) - else if mshift = [ssShift] then - HorzScrollBar.Position := HorzScrollBar.Position + - Round(Event.WheelDelta * VertScrollBar.SmallChange); - Result := True; -end; - -procedure TScrollingSupport.EvKeyPressed(Key: Word; Shift: TShiftState); -var - mshift: TShiftState; -begin -{ - mshift := Shift * [ssShift, ssAlt, ssCtrl, ssMeta, ssSuper, ssHyper, ssAltGr]; - if mshift = [] then - case Key of - keyLeft: - HorzScrollBar.ButtonUpClick(nil); - keyRight: - HorzScrollBar.ButtonDownClick(nil); - keyUp: - VertScrollBar.ButtonUpClick(nil); - keyDown: - VertScrollBar.ButtonDownClick(nil); - keyPageUp: - VertScrollBar.PageUp; - keyPageDown: - VertScrollBar.PageDown; - keyHome: - VertScrollBar.Position := 0; - keyEnd: - VertScrollBar.Position := VertScrollBar.Max - VertScrollBar.PageSize; - end - else if mshift = [ssShift] then - case Key of - keyPageUp: - HorzScrollBar.PageUp; - keyPageDown: - HorzScrollBar.PageDown; - keyHome: - HorzScrollBar.Position := 0; - keyEnd: - HorzScrollBar.Position := HorzScrollBar.Max - HorzScrollBar.PageSize; - end - else - inherited EvKeyPressed(Key, Shift); -} -end; - - - -// =================================================================== -// TFCustomScrollBox -// =================================================================== - -constructor TFCustomScrollBox.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - WidgetStyle := WidgetStyle + [wsClickable, wsOpaque]; - FCanExpandWidth := True; - FCanExpandHeight := True; - ScrollingSupport := TScrollingSupport.Create(Self); -end; - -destructor TFCustomScrollBox.Destroy; -begin - ScrollingSupport.Free; - inherited Destroy; -end; - - -// Protected methods - -procedure TFCustomScrollBox.Paint(Canvas: TFCanvas); -begin - Assert(Canvas = Canvas); -{ - Style.DrawWindowBackground(Canvas, Rect(HorzScrollBar.Left, - VertScrollBar.Top, HorzScrollBar.Left + HorzScrollBar.Width, - VertScrollBar.Top + VertScrollBar.Height));} -end; - -function TFCustomScrollBox.ProcessEvent(Event: TEventObj): Boolean; -begin - Result := ScrollingSupport.ProcessEvent(Event) or - inherited ProcessEvent(Event); -end; - -function TFCustomScrollBox.DistributeEvent(Event: TEventObj): Boolean; -begin - Result := ScrollingSupport.DistributeEvent(Event) or - inherited DistributeEvent(Event); -end; - -procedure TFCustomScrollBox.CalcSizes; -begin - ScrollingSupport.CalcSizes; -end; - -procedure TFCustomScrollBox.Resized; -begin - ScrollingSupport.Resized; -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguiseparator.inc b/gui/fpguiseparator.inc deleted file mode 100644 index d415956d..00000000 --- a/gui/fpguiseparator.inc +++ /dev/null @@ -1,103 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Separator class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - - TCustomSeparator = class(TFWidget) - private - procedure SetOrientation(AOrientation: TOrientation); - procedure SetSpacing(ASpacing: Integer); - protected - FOrientation: TOrientation; - FSpacing: Integer; - procedure Paint(Canvas: TFCanvas); override; - procedure CalcSizes; override; - property Orientation: TOrientation read FOrientation write SetOrientation default Horizontal; - property Spacing: Integer read FSpacing write SetSpacing default 4; - public - constructor Create(AOwner: TComponent); override; - end; - - - TSeparator = class(TCustomSeparator) - published - property Enabled; - property Orientation; - property Spacing; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - - - -// =================================================================== -// TCustomSeparator -// =================================================================== - -constructor TCustomSeparator.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - FCanExpandWidth := True; - FSpacing := 4; -end; - -procedure TCustomSeparator.Paint(Canvas: TFCanvas); -begin - Style.DrawSeparator(Canvas, Rect(0, 0, Width, Height), Orientation); -end; - -procedure TCustomSeparator.CalcSizes; -begin - if Orientation = Horizontal then - begin - FCanExpandWidth := True; - FCanExpandHeight := False; - FMinSize.cy := Style.GetSeparatorSize + 2 * Spacing - end else - begin - FCanExpandWidth := False; - FCanExpandHeight := True; - FMinSize.cx := Style.GetSeparatorSize + 2 * Spacing; - end; -end; - -procedure TCustomSeparator.SetOrientation(AOrientation: TOrientation); -begin - if AOrientation <> Orientation then - begin - FOrientation := AOrientation; - Update; - end; -end; - -procedure TCustomSeparator.SetSpacing(ASpacing: Integer); -begin - if ASpacing <> Spacing then - begin - FSpacing := ASpacing; - Update; - end; -end; - - -{$ENDIF read_implementation} - diff --git a/gui/fpguistyle.inc b/gui/fpguistyle.inc deleted file mode 100644 index 991c85b5..00000000 --- a/gui/fpguistyle.inc +++ /dev/null @@ -1,834 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Style class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{ - Default style implementation -} - -{$IFDEF read_interface} - - { Possible styles } - TItemFlags = set of (ifFocused, ifSelected, ifDeactivated); - - { Possible arrow directions } - TArrowDirection = (arrowUp, arrowDown, arrowLeft, arrowRight); - - { Abstract Style declarations } - TStyleAbs = class(TObject) - protected - UIColorCache: array[0..$18] of TGfxColor; - public - constructor Create; virtual; - // Colors - procedure UpdateUIColorCache; - function GetGUIColor(Color: TColor): TGfxColor; virtual; abstract; - function GetUIColor(AColor: TColor): TGfxColor; - procedure SetUIColor(Canvas: TFCanvas; Color: TColor); - // General - procedure DrawText(Canvas: TFCanvas; const APosition: TPoint; const AText: String; State: TFWidgetState); virtual; abstract; - procedure DrawItemBefore(Canvas: TFCanvas; const ARect: TRect; Flags: TItemFlags); virtual; abstract; - procedure DrawItemAfter(Canvas: TFCanvas; const ARect: TRect; Flags: TItemFlags); virtual; abstract; - procedure Draw3DFrame(Canvas: TFCanvas; const ARect: TRect; Color1, Color2, Color3, Color4: TColor); virtual; abstract; - procedure DrawFocusRect(Canvas: TFCanvas; const ARect: TRect); virtual; abstract; - procedure DrawSunkenOuterBorder(Canvas: TFCanvas; const ARect: TRect); virtual; abstract; - procedure DrawRaisedOuterBorder(Canvas: TFCanvas; const ARect: TRect); virtual; abstract; - // Windows - procedure DrawWindowBackground(Canvas: TFCanvas; const ARect: TRect); virtual; abstract; - // Buttons - procedure DrawButtonFace(Canvas: TFCanvas; const ARect: TRect; Flags: TFButtonFlags); virtual; abstract; - function GetButtonBorders: TRect; virtual; abstract; - // Separators - function GetSeparatorSize: Integer; virtual; abstract; - procedure DrawSeparator(Canvas: TFCanvas; const ARect: TRect; AOrientation: TOrientation); virtual; abstract; - // Group boxes - procedure DrawGroupBox(Canvas: TFCanvas; const ARect: TRect; const ALabel: String; WidgetState: TFWidgetState); virtual; abstract; - function GetGroupBoxBorders(Canvas: TFCanvas; const ALabel: String; var LabelWidth: Integer): TRect; virtual; abstract; - // Edit widgets - procedure DrawEditBox(Canvas: TFCanvas; const ARect: TRect; const IsReadOnly: Boolean = False); virtual; abstract; - function GetEditBoxBorders: TRect; virtual; abstract; - // Check boxes - procedure DrawCheckBox(Canvas: TFCanvas; const ARect, LabelRect: TRect; Flags: TFCheckboxFlags); virtual; abstract; - procedure GetCheckboxLayout(const LabelSize: TSize; var TotalSize: TSize; var LabelPos: TPoint); virtual; abstract; - // Radio buttons - procedure DrawRadioButton(Canvas: TFCanvas; const ARect, LabelRect: TRect; Flags: TFCheckboxFlags); virtual; abstract; - procedure GetRadioButtonLayout(const LabelSize: TSize; var TotalSize: TSize; var LabelPos: TPoint); virtual; abstract; - // Combo boxes - function GetComboBoxArrowSize: TSize; virtual; abstract; - procedure DrawComboBoxArrow(Canvas: TFCanvas; const ARect: TRect; IsPressed, IsEnabled: Boolean); virtual; abstract; - function GetComboBoxBtnSize: TSize; virtual; abstract; - // Scroll bars - function GetScrollBarBorders(Orientation: TOrientation): TRect; virtual; abstract; - function GetScrollBarBtnSize(Orientation: TOrientation): TSize; virtual; abstract; - function GetScrollBarBtnMinSize: Integer; virtual; abstract; - procedure DrawScrollBarBorder(Canvas: TFCanvas; const ARect: TRect); virtual; abstract; - procedure DrawScrollBarButton(Canvas: TFCanvas; const ARect: TRect; Direction: TArrowDirection; IsPressed, IsEnabled: Boolean); virtual; abstract; - // Scroll boxes - function GetScrollBoxBorders: TRect; virtual; abstract; - procedure DrawScrollBoxBorder(Canvas: TFCanvas; const ARect: TRect); virtual; abstract; - // Menus - function GetMenuBorders(pCanvas: TFCanvas; const pText: string; var pTextWidth: Integer): TRect; virtual; abstract; - // Panel/Frame - function GetPanelBorders: TRect; virtual; abstract; - procedure DrawPanel(Canvas: TFCanvas; const ARect: TRect; ABevelStyle: TBevelStyle); virtual; abstract; - end; - - - { TDefaultStyle } - - TBasicStyle = class(TStyleAbs) - private - FImageCanvas: TFCanvas; - FMaskCanvas: TFCanvas; - protected - procedure DrawDirectionArrows(ACanvas: TFCanvas; const ARect: TRect; ADirection: TArrowDirection); - procedure DrawCheckBoxCheck(ACanvas: TFCanvas; const ARect: TRect; AFlags: TFCheckboxFlags); - public - constructor Create; override; - destructor Destroy; override; - // Colors - function GetGUIColor(Color: TColor): TGfxColor; override; - // General - procedure DrawText(Canvas: TFCanvas; const APosition: TPoint; const AText: String; State: TFWidgetState); override; - procedure DrawItemBefore(Canvas: TFCanvas; const ARect: TRect; Flags: TItemFlags); override; - procedure DrawItemAfter(Canvas: TFCanvas; const ARect: TRect; Flags: TItemFlags); override; - procedure Draw3DFrame(Canvas: TFCanvas; const ARect: TRect; Color1, Color2, Color3, Color4: TColor); override; - procedure DrawFocusRect(Canvas: TFCanvas; const ARect: TRect); override; - procedure DrawSunkenOuterBorder(Canvas: TFCanvas; const ARect: TRect); override; - procedure DrawRaisedOuterBorder(Canvas: TFCanvas; const ARect: TRect); override; - // Windows - procedure DrawWindowBackground(Canvas: TFCanvas; const ARect: TRect); override; - // Buttons - procedure DrawButtonFace(Canvas: TFCanvas; const ARect: TRect; Flags: TFButtonFlags); override; - function GetButtonBorders: TRect; override; - // Separators - procedure DrawSeparator(Canvas: TFCanvas; const ARect: TRect; AOrientation: TOrientation); override; - function GetSeparatorSize: Integer; override; - // Group boxes - procedure DrawGroupBox(Canvas: TFCanvas; const ARect: TRect; const ALabel: String; WidgetState: TFWidgetState); override; - function GetGroupBoxBorders(Canvas: TFCanvas; const ALabel: String; var LabelWidth: Integer): TRect; override; - // Edit widgets - procedure DrawEditBox(Canvas: TFCanvas; const ARect: TRect; const IsReadOnly: Boolean = False); override; - function GetEditBoxBorders: TRect; override; - // Check boxes - procedure DrawCheckBox(Canvas: TFCanvas; const ARect, LabelRect: TRect; Flags: TFCheckboxFlags); override; - procedure GetCheckboxLayout(const LabelSize: TSize; var TotalSize: TSize; var LabelPos: TPoint); override; - // Radio buttons - procedure DrawRadioButton(Canvas: TFCanvas; const ARect, LabelRect: TRect; Flags: TFCheckboxFlags); override; - procedure GetRadioButtonLayout(const LabelSize: TSize; var TotalSize: TSize; var LabelPos: TPoint); override; - // Combo boxes - procedure DrawComboBoxArrow(Canvas: TFCanvas; const ARect: TRect; IsPressed, IsEnabled: Boolean); override; - function GetComboBoxArrowSize: TSize; override; - function GetComboBoxBtnSize: TSize; override; - // Scroll bars - function GetScrollBarBorders(Orientation: TOrientation): TRect; override; - function GetScrollBarBtnSize(Orientation: TOrientation): TSize; override; - function GetScrollBarBtnMinSize: Integer; override; - procedure DrawScrollBarBorder(Canvas: TFCanvas; const ARect: TRect); override; - procedure DrawScrollBarButton(Canvas: TFCanvas; const ARect: TRect; Direction: TArrowDirection; IsPressed, IsEnabled: Boolean); override; - // Scroll boxes - function GetScrollBoxBorders: TRect; override; - procedure DrawScrollBoxBorder(Canvas: TFCanvas; const ARect: TRect); override; - // Menus - function GetMenuBorders(pCanvas: TFCanvas; const pText: string; var pTextWidth: Integer): TRect; override; - // Panel/Frame - function GetPanelBorders: TRect; override; - procedure DrawPanel(Canvas: TFCanvas; const ARect: TRect; ABevelStyle: TBevelStyle); override; - end; - - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - - -{ TStyleAbs } - -constructor TStyleAbs.Create; -begin - inherited Create; - UpdateUIColorCache; -end; - - -procedure TStyleAbs.UpdateUIColorCache; -var - i: TColor; -begin - for i := 0 to $18 do - UIColorCache[i] := GetGUIColor(TColor(i + clScrollBar)); -end; - - -function TStyleAbs.GetUIColor(AColor: TColor): TGfxColor; -begin - if (AColor >= clScrollBar) and (AColor <= clScrollBar + $18) then - Result := UIColorCache[TColor(AColor - clScrollBar)] - else - begin -// Result := colBlack; - Result.Red := (AColor and $ff) * 257; - Result.Green := ((AColor shr 8) and $ff) * 257; - Result.Blue := ((AColor shr 16) and $ff) * 257; - Result.Alpha := 0; - end; -end; - - -procedure TStyleAbs.SetUIColor(Canvas: TFCanvas; Color: TColor); -var - lGfxColor: TGfxColor; -begin - if (Color >= clScrollBar) and (Color <= clScrollBar + $18) then - Canvas.SetColor(UIColorCache[TColor(Color - clScrollBar)]) - else - begin - lGfxColor.Red := (Color and $ff) * 257; - lGfxColor.Green := ((Color shr 8) and $ff) * 257; - lGfxColor.Blue := ((Color shr 16) and $ff) * 257; - lGfxColor.Alpha := 0; - Canvas.SetColor(lGfxColor); - end; -end; - - -{ TBasicStyle } - -const - rgbaDkWhite: TGfxColor = (Red: $e000; Green: $e000; Blue: $e000; Alpha: 0); - - -{ This gets platform specific colors and focus rectangle styles } -{$IFDEF MSWINDOWS} - {$I win32/defstyle.inc} -{$ENDIF} -{$IFDEF UNIX} - {$I defimpl/defstyle.inc} -{$ENDIF} - -procedure TBasicStyle.DrawDirectionArrows(ACanvas: TFCanvas; - const ARect: TRect; ADirection: TArrowDirection); -var - peekx, peeky: Cardinal; - basex, basey: Cardinal; - side, margin: Cardinal; -begin - side := (ARect.Right div 4) + 1; - margin := side; - - if ADirection in [arrowUp, arrowDown] then - begin - peekx := ARect.Left+(ARect.Right div 2); - if ADirection = arrowDown then - begin - peeky := ARect.Top + ARect.Bottom - margin; - basey := peeky-side; - end - else - begin // up - peeky := ARect.Top+margin; - basey := peeky+side; - end; - LAYOUTTRACE('Triangle Points (%d,%d)(%d,%d)(%d,%d)', - [peekx, peeky, peekx+side, basey, peekx-side, basey]); - - ACanvas.FillTriangle(Point(peekx, peeky), Point(peekx+side, basey), Point(peekx-side, basey)); - end - else // horizontal - begin - peeky := ARect.Top + (ARect.Bottom div 2); - if ADirection = arrowRight then - begin - peekx := ARect.Left + ARect.Right - margin; - basex := peekx - side; - end - else // left - begin - peekx := ARect.Left + margin; - basex := peekx + side; - end; - LAYOUTTRACE('Triangle Points (%d,%d)(%d,%d)(%d,%d)', - [peekx, peeky, basex, peeky-side, basex, peeky+side]); - ACanvas.FillTriangle(Point(peekx, peeky), Point(basex, peeky-side), Point(basex, peeky+side)); - end; -end; - -procedure TBasicStyle.DrawCheckBoxCheck(ACanvas: TFCanvas; - const ARect: TRect; AFlags: TFCheckboxFlags); -begin - if (cbIsEnabled in AFlags) then - SetUIColor(ACanvas, clBtnText) - else - SetUIColor(ACanvas, cl3DShadow); - - {$Note As soon as canvas supports a Pen, we need to set the PenWidth} - if (cbIsChecked in AFlags) then - begin - ACanvas.DrawLine(Point(ARect.Left+1, ARect.Top+1), Point(ARect.Right, ARect.Bottom)); - ACanvas.DrawLine(Point(ARect.Left+2, ARect.Top+1), Point(ARect.Right, ARect.Bottom-1)); - ACanvas.DrawLine(Point(ARect.Left+1, ARect.Top+2), Point(ARect.Right-1, ARect.Bottom)); - - ACanvas.DrawLine(Point(ARect.Right-1, ARect.Top+1), Point(ARect.Left, ARect.Bottom)); - ACanvas.DrawLine(Point(ARect.Right-2, ARect.Top+1), Point(ARect.Left, ARect.Bottom-1)); - ACanvas.DrawLine(Point(ARect.Right-1, ARect.Top+2), Point(ARect.Left+1, ARect.Bottom)); - end; -end; - -constructor TBasicStyle.Create; -const - // 60x12 pixel 4bpp bitmap - RadioBitmapData: array[0..359] of Byte = ( - $00, $00, $22, $22, $00, $00, $00, $00, $22, $22, $00, $00, $00, $00, $22, $22, $00, $00, $00, $00, $22, $22, $00, $00, $00, $00, $22, $22, $00, $00, - $00, $22, $11, $11, $22, $00, $00, $22, $11, $11, $22, $00, $00, $22, $11, $11, $22, $00, $00, $22, $11, $11, $22, $00, $00, $22, $11, $11, $22, $00, - $02, $11, $77, $77, $11, $50, $02, $11, $77, $77, $11, $50, $02, $11, $33, $33, $11, $50, $02, $11, $33, $33, $11, $50, $02, $11, $33, $33, $11, $50, - $02, $17, $77, $77, $74, $50, $02, $17, $77, $77, $74, $50, $02, $13, $33, $33, $34, $50, $02, $13, $33, $33, $34, $50, $02, $13, $33, $33, $34, $50, - $21, $77, $77, $77, $77, $45, $21, $77, $76, $67, $77, $45, $21, $33, $33, $33, $33, $45, $21, $33, $36, $63, $33, $45, $21, $33, $32, $23, $33, $45, - $21, $77, $77, $77, $77, $45, $21, $77, $66, $66, $77, $45, $21, $33, $33, $33, $33, $45, $21, $33, $66, $66, $33, $45, $21, $33, $22, $22, $33, $45, - $21, $77, $77, $77, $77, $45, $21, $77, $66, $66, $77, $45, $21, $33, $33, $33, $33, $45, $21, $33, $66, $66, $33, $45, $21, $33, $22, $22, $33, $45, - $21, $77, $77, $77, $77, $45, $21, $77, $76, $67, $77, $45, $21, $33, $33, $33, $33, $45, $21, $33, $36, $63, $33, $45, $21, $33, $32, $23, $33, $45, - $02, $17, $77, $77, $74, $50, $02, $17, $77, $77, $74, $50, $02, $13, $33, $33, $34, $50, $02, $13, $33, $33, $34, $50, $02, $13, $33, $33, $34, $50, - $02, $44, $77, $77, $44, $50, $02, $44, $77, $77, $44, $50, $02, $44, $33, $33, $44, $50, $02, $44, $33, $33, $44, $50, $02, $44, $33, $33, $44, $50, - $00, $55, $44, $44, $55, $00, $00, $55, $44, $44, $55, $00, $00, $55, $44, $44, $55, $00, $00, $55, $44, $44, $55, $00, $00, $55, $44, $44, $55, $00, - $00, $00, $55, $55, $00, $00, $00, $00, $55, $55, $00, $00, $00, $00, $55, $55, $00, $00, $00, $00, $55, $55, $00, $00, $00, $00, $55, $55, $00, $00 - ); - - // 12x12 pixel monochrome bitmap - RadioMaskData: array[0..23] of Byte = ($0f, $00, $3f, $c0, $7f, $e0, $7f, - $e0, $ff, $f0, $ff, $f0, $ff, $f0, $ff, $f0, $7f, $e0, $7f, $e0, $3f, $c0, - $0f, $00); - - // 65x13 pixel 4bpp bitmap - CheckBoxBitmapData: array[0..428] of Byte = ( - $22, $22, $22, $22, $22, $22, $52, $22, $22, $22, $22, $22, $25, $22, $22, $22, $22, $22, $22, $52, $22, $22, $22, $22, $22, $25, $22, $22, $22, $22, $22, $22, $50, - $21, $11, $11, $11, $11, $14, $52, $11, $11, $11, $11, $11, $45, $21, $11, $11, $11, $11, $14, $52, $11, $11, $11, $11, $11, $45, $21, $11, $11, $11, $11, $14, $50, - $21, $77, $77, $77, $77, $74, $52, $17, $77, $77, $77, $77, $45, $21, $33, $33, $33, $33, $34, $52, $13, $33, $33, $33, $33, $45, $21, $33, $33, $33, $33, $34, $50, - $21, $77, $77, $77, $77, $74, $52, $17, $77, $77, $77, $67, $45, $21, $33, $33, $33, $33, $34, $52, $13, $33, $33, $33, $63, $45, $21, $33, $33, $33, $32, $34, $50, - $21, $77, $77, $77, $77, $74, $52, $17, $77, $77, $76, $67, $45, $21, $33, $33, $33, $33, $34, $52, $13, $33, $33, $36, $63, $45, $21, $33, $33, $33, $22, $34, $50, - $21, $77, $77, $77, $77, $74, $52, $17, $67, $77, $66, $67, $45, $21, $33, $33, $33, $33, $34, $52, $13, $63, $33, $66, $63, $45, $21, $32, $33, $32, $22, $34, $50, - $21, $77, $77, $77, $77, $74, $52, $17, $66, $76, $66, $77, $45, $21, $33, $33, $33, $33, $34, $52, $13, $66, $36, $66, $33, $45, $21, $32, $23, $22, $23, $34, $50, - $21, $77, $77, $77, $77, $74, $52, $17, $66, $66, $67, $77, $45, $21, $33, $33, $33, $33, $34, $52, $13, $66, $66, $63, $33, $45, $21, $32, $22, $22, $33, $34, $50, - $21, $77, $77, $77, $77, $74, $52, $17, $76, $66, $77, $77, $45, $21, $33, $33, $33, $33, $34, $52, $13, $36, $66, $33, $33, $45, $21, $33, $22, $23, $33, $34, $50, - $21, $77, $77, $77, $77, $74, $52, $17, $77, $67, $77, $77, $45, $21, $33, $33, $33, $33, $34, $52, $13, $33, $63, $33, $33, $45, $21, $33, $32, $33, $33, $34, $50, - $21, $77, $77, $77, $77, $74, $52, $17, $77, $77, $77, $77, $45, $21, $33, $33, $33, $33, $34, $52, $13, $33, $33, $33, $33, $45, $21, $33, $33, $33, $33, $34, $50, - $24, $44, $44, $44, $44, $44, $52, $44, $44, $44, $44, $44, $45, $24, $44, $44, $44, $44, $44, $52, $44, $44, $44, $44, $44, $45, $24, $44, $44, $44, $44, $44, $50, - $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $55, $50 - ); - - // 64x8 pixel 4bpp bitmap - ArrowBitmapData: array[0..255] of Byte = ( - $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $13, $33, $33, $31, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $23, $33, $33, $23, $33, $33, - $33, $33, $33, $33, $33, $33, $33, $33, $33, $31, $13, $33, $33, $31, $13, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $32, $25, $33, $33, $22, $33, $33, - $33, $31, $33, $33, $11, $11, $11, $13, $33, $11, $13, $33, $33, $31, $11, $33, $33, $32, $33, $33, $22, $22, $22, $23, $33, $22, $25, $33, $33, $22, $23, $33, - $33, $11, $13, $33, $31, $11, $11, $33, $31, $11, $13, $33, $33, $31, $11, $13, $33, $22, $23, $33, $32, $22, $22, $55, $32, $22, $25, $33, $33, $22, $22, $33, - $31, $11, $11, $33, $33, $11, $13, $33, $33, $11, $13, $33, $33, $31, $11, $33, $32, $22, $22, $33, $33, $22, $25, $53, $33, $22, $25, $33, $33, $22, $25, $53, - $11, $11, $11, $13, $33, $31, $33, $33, $33, $31, $13, $33, $33, $31, $13, $33, $22, $22, $22, $23, $33, $32, $55, $33, $33, $32, $25, $33, $33, $22, $55, $33, - $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $13, $33, $33, $31, $33, $33, $35, $55, $55, $55, $33, $33, $53, $33, $33, $33, $25, $33, $33, $25, $53, $33, - $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $33, $35, $33, $33, $35, $33, $33 - ); - -var - PalData: array[0..7] of TGfxColor; - Palette: TGfxPalette; - Bitmap: TFBitmap; -begin - inherited Create; - - FImageCanvas := TFCanvas(GFScreen.CreateBitmapCanvas(65, 33)); - FMaskCanvas := TFCanvas(GFScreen.CreateMonoBitmapCanvas(12, 12)); - - PalData[0] := colMagenta; - PalData[1] := GetGUIColor(cl3DDkShadow); - PalData[2] := GetGUIColor(cl3DShadow); - PalData[3] := GetGUIColor(cl3DFace); - PalData[4] := GetGUIColor(cl3DLight); - PalData[5] := GetGUIColor(cl3DHighlight); - PalData[6] := GetGUIColor(clWindowText); - PalData[7] := GetGUIColor(clWindow); - Palette := TGfxPalette.Create(8, @PalData); - - Bitmap := TFBitmap.Create(60, 12, PixelFormatPal4A); - BitMap.Palette := Palette; - BitMap.SetPixelsFromData(@RadioBitmapData, 30); - FImageCanvas.DrawImage(Bitmap, Point(0,0)); - Bitmap.Free; - - Bitmap := TFBitmap.Create(12, 12, PixelFormatMono); - Bitmap.SetPixelsFromData(@RadioMaskData, 2); - FMaskCanvas.DrawImage(Bitmap, Point(0, 0)); - Bitmap.Free; - - Palette := TGfxPalette.Create(8, @PalData); - Bitmap := TFBitmap.Create(66, 13, PixelFormatPal4); - BitMap.Palette := Palette; - BitMap.SetPixelsFromData(@CheckBoxBitmapData, 33); - FImageCanvas.DrawImage(Bitmap, Point(0, 12)); - Bitmap.Free; - - Palette := TGfxPalette.Create(8, @PalData); - Bitmap := TFBitmap.Create(64, 8, PixelFormatPal4); - BitMap.Palette := Palette; - BitMap.SetPixelsFromData(@ArrowBitmapData, 32); - FImageCanvas.DrawImage(Bitmap, Point(0, 25)); - Bitmap.Free; - - Palette.Release; -end; - -destructor TBasicStyle.Destroy; -begin - FImageCanvas.Free; - FMaskCanvas.Free; - inherited Destroy; -end; - -// helper functions - - -{ Draws a 3D frame, its thickness is 2 pixels. The 4 given colors are used in - this way: - Color1: Outer frame left & top - Color2: Inner frame left & top - Color3: Outer frame right & bottom - Color4: Inner frame right & bottom -} - -procedure TBasicStyle.Draw3DFrame(Canvas: TFCanvas; const ARect: TRect; - Color1, Color2, Color3, Color4: TColor); -begin - with ARect do - begin - SetUIColor(Canvas, Color1); - {Canvas.DrawPolyLine([Point(Left, Bottom - 2), TopLeft, - Point(Right - 1, Top)]);} - Canvas.DrawLine(Point(Left, Bottom - 2), TopLeft); - Canvas.DrawLine(TopLeft, Point(Right - 1, Top)); - SetUIColor(Canvas, Color2); - {Canvas.DrawPolyLine([Point(Left + 1, Bottom - 3), Point(Left + 1, Top + 1), - Point(Right - 2, Top + 1)]);} - Canvas.DrawLine(Point(Left + 1, Bottom - 3), Point(Left + 1, Top + 1)); - Canvas.DrawLine(Point(Left + 1, Top + 1), Point(Right - 2, Top + 1)); - SetUIColor(Canvas, Color3); - {Canvas.DrawPolyLine([Point(Left, Bottom - 1), Point(Right - 1, Bottom - 1), - Point(Right - 1, Top - 1)]);} - Canvas.DrawLine(Point(Left, Bottom - 1), Point(Right - 1, Bottom - 1)); - Canvas.DrawLine(Point(Right - 1, Bottom - 1), Point(Right - 1, Top - 1)); - SetUIColor(Canvas, Color4); - {Canvas.DrawPolyLine([Point(Left + 1, Bottom - 2), - Point(Right - 2, Bottom - 2), Point(Right - 2, Top)]);} - Canvas.DrawLine(Point(Left + 1, Bottom - 2), Point(Right - 2, Bottom - 2)); - Canvas.DrawLine(Point(Right - 2, Bottom - 2), Point(Right - 2, Top)); - end; -end; - -procedure TBasicStyle.DrawSunkenOuterBorder(Canvas: TFCanvas; - const ARect: TRect); -begin - with ARect do - begin - SetUIColor(Canvas, cl3DShadow); - Canvas.DrawLine(Point(Left, Bottom - 2), TopLeft); - Canvas.DrawLine(TopLeft, Point(Right, Top)); - SetUIColor(Canvas, cl3DHighlight); - Canvas.DrawLine(Point(Left, Bottom - 1), Point(Right - 1, Bottom - 1)); - Canvas.DrawLine(Point(Right - 1, Bottom - 1), Point(Right - 1, Top - 1)); - end; -end; - -procedure TBasicStyle.DrawRaisedOuterBorder(Canvas: TFCanvas; - const ARect: TRect); -begin - with ARect do - begin - SetUIColor(Canvas, cl3DHighlight); - Canvas.DrawLine(Point(Left, Bottom - 2), TopLeft); - Canvas.DrawLine(TopLeft, Point(Right, Top)); - SetUIColor(Canvas, cl3DShadow); - Canvas.DrawLine(Point(Left, Bottom - 1), Point(Right - 1, Bottom - 1)); - Canvas.DrawLine(Point(Right - 1, Bottom - 1), Point(Right - 1, Top - 1)); - end; -end; - -procedure TBasicStyle.DrawText(Canvas: TFCanvas; const APosition: TPoint; - const AText: String; State: TFWidgetState); -begin - if not (wsEnabled in State) then - begin - SetUIColor(Canvas, cl3DHighlight); - Canvas.TextOut(APosition + Point(1, 1), AText); - SetUIColor(Canvas, cl3DShadow); - end; - Canvas.TextOut(APosition, AText); -end; - -procedure TBasicStyle.DrawItemBefore(Canvas: TFCanvas; const ARect: TRect; - Flags: TItemFlags); -begin - if ifSelected in Flags then - begin - SetUIColor(Canvas, clHighlight); - Canvas.FillRect(ARect); - SetUIColor(Canvas, clHighlightText); - end; -end; - -procedure TBasicStyle.DrawItemAfter(Canvas: TFCanvas; const ARect: TRect; - Flags: TItemFlags); -begin - if ifFocused in Flags then - DrawFocusRect(Canvas, ARect); -end; - -procedure TBasicStyle.DrawWindowBackground(Canvas: TFCanvas; - const ARect: TRect); -begin -// SetUIColor(Canvas, cl3DFace); - Canvas.FillRect(ARect); -end; - -procedure TBasicStyle.DrawButtonFace(Canvas: TFCanvas; const ARect: TRect; - Flags: TFButtonFlags); -var - r: TRect; -begin - r := ARect; - - if btnIsSelected in Flags then - begin - SetUIColor(Canvas, cl3DDkShadow); - Canvas.DrawRect(r); - Inc(r.Left); - Inc(r.Top); - Dec(r.Right); - Dec(r.Bottom); - end; - - if btnIsPressed in Flags then - begin - SetUIColor(Canvas, cl3DShadow); - Canvas.DrawRect(r); - Inc(r.Left); - Inc(r.Top); - Dec(r.Right); - Dec(r.Bottom); - end else - begin - if btnIsEmbedded in Flags then - Draw3DFrame(Canvas, r, cl3DLight, cl3DHighlight, cl3DDkShadow, cl3DShadow) - else - Draw3DFrame(Canvas, r, cl3DHighlight, cl3DLight, cl3DDkShadow, cl3DShadow); - Inc(r.Left, 2); - Inc(r.Top, 2); - Dec(r.Right, 2); - Dec(r.Bottom, 2); - end; - - SetUIColor(Canvas, cl3DFace); - Canvas.FillRect(r); - - if btnHasFocus in Flags then - begin - r.Left := ARect.Left + 4; - r.Top := ARect.Top + 4; - r.Right := ARect.Right - 4; - r.Bottom := ARect.Bottom - 4; - DrawFocusRect(Canvas, r); - end; -end; - -function TBasicStyle.GetButtonBorders: TRect; -begin - Result := Rect(5, 5, 5, 5); -end; - -function TBasicStyle.GetSeparatorSize: Integer; -begin - Result := 2; -end; - -procedure TBasicStyle.DrawSeparator(Canvas: TFCanvas; const ARect: TRect; - AOrientation: TOrientation); -var - r: TRect; -begin - with ARect do - if AOrientation = Horizontal then - r := Rect(Left, Top + (Bottom - Top) div 2 - 1, Right, - Top + (Bottom - Top) div 2 + 1) - else - r := Rect(Left + (Right - Left) div 2 - 1, Top, - Left + (Right - Left) div 2 + 1, Bottom); - DrawSunkenOuterBorder(Canvas, r); -end; - -procedure TBasicStyle.DrawGroupBox(Canvas: TFCanvas; const ARect: TRect; - const ALabel: String; WidgetState: TFWidgetState); -var - TitleWidth, TitleHeight, TopLine: Integer; -begin - TitleWidth := Canvas.TextWidth(ALabel); - TitleHeight := Canvas.FontCellHeight; - TopLine := ARect.Top + TitleHeight div 3; - - SetUIColor(Canvas, cl3DHighlight); - with ARect do - begin - Canvas.DrawLine(Point(Left + TitleWidth + 10, TopLine + 1), Point(Right - 1, TopLine + 1)); { top - right of text } - Canvas.DrawLine(Point(Right - 1, TopLine + 1), Point(Right - 1, Bottom - 1)); { right } - Canvas.DrawLine(Point(Right - 1, Bottom - 1), Point(Left + 1, Bottom - 1)); { bottom } - Canvas.DrawLine(Point(Left + 1, Bottom - 1), Point(Left + 1, TopLine + 1)); { left } - Canvas.DrawLine(Point(Left + 1, TopLine + 1), Point(Left + 8, TopLine + 1)); { top - left of text } - end; - - SetUIColor(Canvas, cl3DShadow); - with ARect do - begin - Canvas.DrawLine(Point(Left + TitleWidth + 10, TopLine), Point(Right - 2, TopLine)); - Canvas.DrawLine(Point(Right - 2, TopLine), Point(Right - 2, Bottom - 2)); - Canvas.DrawLine(Point(Right - 2, Bottom - 2), Point(Left, Bottom - 2)); - Canvas.DrawLine(Point(Left, Bottom - 2), Point(Left, TopLine)); - Canvas.DrawLine(Point(Left, TopLine), Point(Left + 8, TopLine)); - end; - - SetUIColor(Canvas, clWindowText); - if ALabel <> '' then - DrawText(Canvas, ARect.TopLeft + Point(9, 0), ALabel, WidgetState); -end; - -function TBasicStyle.GetGroupBoxBorders(Canvas: TFCanvas; - const ALabel: String; var LabelWidth: Integer): TRect; -begin - Result := Rect(6, Canvas.FontCellHeight + 4, 6, 6); - LabelWidth := Canvas.TextWidth(ALabel) + 6; -end; - -procedure TBasicStyle.DrawEditBox(Canvas: TFCanvas; const ARect: TRect; const IsReadOnly: Boolean); -begin - Draw3DFrame(Canvas, ARect, cl3DShadow, cl3DDkShadow, cl3DHighlight, cl3DFace); - if IsReadOnly then - SetUIColor(Canvas, cl3DFace) - else - SetUIColor(Canvas, clWindow); - with ARect do - Canvas.FillRect(Rect(Left + 2, Top + 2, Right - 2, Bottom - 2)); -end; - -function TBasicStyle.GetEditBoxBorders: TRect; -begin - Result := Rect(2, 2, 2, 2); -end; - -procedure TBasicStyle.DrawCheckBox(Canvas: TFCanvas; - const ARect, LabelRect: TRect; Flags: TFCheckboxFlags); -var - r: TRect; -begin - SetUIColor(Canvas, cl3DFace); - Canvas.FillRect(ARect); - - r.Left := ARect.Left; - r.Top := ARect.Top + (ARect.Bottom - ARect.Top - 13) div 2; - r.Right := 13; - r.Bottom := r.Top + 13; - DrawEditBox(Canvas, r); - - inc(r.Left,2); - inc(r.Top,2); - dec(r.Right,3); - dec(r.Bottom,3); - DrawCheckBoxCheck(Canvas, r, Flags); - - if cbHasFocus in Flags then - with LabelRect do - DrawFocusRect(Canvas, Rect(Left - 2, Top - 2, Right + 2, Bottom + 2)); -end; - -procedure TBasicStyle.GetCheckboxLayout(const LabelSize: TSize; - var TotalSize: TSize; var LabelPos: TPoint); -begin - TotalSize := Size(LabelSize.cx + 21, Max(13, LabelSize.cy + 4)); - LabelPos := Point(19, (TotalSize.cy - LabelSize.cy) div 2); -end; - - -procedure TBasicStyle.DrawRadioButton(Canvas: TFCanvas; - const ARect, LabelRect: TRect; Flags: TFCheckboxFlags); -var - Index, BtnY: Integer; - r: TRect; -begin - with ARect do - begin - BtnY := Top + (Bottom - Top - 12) div 2; - if cbIsEnabled in Flags then - begin - Index := Ord(cbIsChecked in Flags); - if cbIsPressed in Flags then - Inc(Index, 2); - end else - Index := 2 + Ord(cbIsChecked in Flags) * 2; - - Canvas.MaskedCopyRect(FImageCanvas, FMaskCanvas, - Rect(Index * 12, 0, (Index + 1) * 12, 12), - Point(0, 0), Point(Left, BtnY)); - end; - - if cbHasFocus in Flags then - with LabelRect do - DrawFocusRect(Canvas, Rect(Left - 2, Top - 2, Right + 2, Bottom + 2)); -end; - -procedure TBasicStyle.GetRadioButtonLayout(const LabelSize: TSize; - var TotalSize: TSize; var LabelPos: TPoint); -begin - TotalSize := Size(LabelSize.cx + 20, Max(12, LabelSize.cy + 4)); - LabelPos := Point(18, (TotalSize.cy - LabelSize.cy) div 2); -end; - -function TBasicStyle.GetComboBoxArrowSize: TSize; -begin - Result.cx := 17; - Result.cy := 17; -end; - -function TBasicStyle.GetComboBoxBtnSize: TSize; -begin - Result.cx := 18; - Result.cy := 18; -end; - -procedure TBasicStyle.DrawComboBoxArrow(Canvas: TFCanvas; - const ARect: TRect; IsPressed, IsEnabled: Boolean); -var - r: TRect; -begin - r := ARect; - if IsEnabled then - begin - Canvas.SetColor(GetGUIColor(clBtnText)); - if IsPressed then - begin - r.Top := ARect.Top + 1; - r.Left := ARect.Left + 1; - end; - end - else - Canvas.SetColor(GetGUIColor(cl3DShadow)); - - DrawDirectionArrows(Canvas, r, arrowDown); -end; - -function TBasicStyle.GetScrollBarBorders(Orientation: TOrientation): TRect; -begin - Result := Rect(1, 1, 1, 1); -end; - -function TBasicStyle.GetScrollBarBtnSize(Orientation: TOrientation): TSize; -begin - Result.cx := 18; - Result.cy := 18; -end; - -function TBasicStyle.GetScrollBarBtnMinSize: Integer; -begin - Result := 30; -end; - -procedure TBasicStyle.DrawScrollBarBorder(Canvas: TFCanvas; - const ARect: TRect); -begin - with ARect do - begin - SetUIColor(Canvas, cl3DShadow); - Canvas.DrawLine(Point(Left, Bottom - 1), TopLeft); - Canvas.DrawLine(TopLeft, Point(Right, Top)); - - SetUIColor(Canvas, cl3DHighlight); - Canvas.DrawLine(Point(Left + 1, Bottom - 1), Point(Right - 1, Bottom - 1)); - Canvas.DrawLine(Point(Right - 1, Bottom - 1), Point(Right - 1, Top)); - - SetUIColor(Canvas, cl3DFace); - Canvas.FillRect(Rect(Left, Bottom - 1, Left + 1, Bottom)); - Canvas.FillRect(Rect(Right - 1, Top, Right, Top + 1)); - end; -end; - -procedure TBasicStyle.DrawScrollBarButton(Canvas: TFCanvas; - const ARect: TRect; Direction: TArrowDirection; - IsPressed, IsEnabled: Boolean); -var - r: TRect; -begin - r := ARect; - if IsEnabled then - begin - SetUIColor(Canvas, clBtnText); - if IsPressed then - begin - r.Top := ARect.Top + 1; - r.Left := ARect.Left + 1; - end; - end - else - SetUIColor(Canvas, cl3DShadow); - - DrawDirectionArrows(Canvas, r, Direction); -end; - -function TBasicStyle.GetScrollBoxBorders: TRect; -begin - Result := Rect(2, 2, 2, 2); -end; - -procedure TBasicStyle.DrawScrollBoxBorder(Canvas: TFCanvas; const ARect: TRect); -begin - Draw3DFrame(Canvas, ARect, cl3DShadow, cl3DDkShadow, - cl3DHighlight, cl3DLight); -end; - -function TBasicStyle.GetMenuBorders(pCanvas: TFCanvas; const pText: string; - var pTextWidth: Integer): TRect; -begin - pTextWidth := pCanvas.TextWidth(pText) + 6; -// Result := Rect(2, 2, 6, pCanvas.FontCellHeight+4); - Result := Rect(6, 2, 2, 2); -// Result := Rect(6, pCanvas.FontCellHeight + 4, 6, 6); -end; - -function TBasicStyle.GetPanelBorders: TRect; -begin - Result := Rect(5, 5, 5, 5); -end; - -procedure TBasicStyle.DrawPanel(Canvas: TFCanvas; const ARect: TRect; - ABevelStyle: TBevelStyle); -begin - // bsPlain, bsLowered, bsRaised - if ABevelStyle = bsPlain then - DrawWindowBackground(Canvas, ARect) - else if ABevelStyle = bsLowered then - DrawSunkenOuterBorder(Canvas, ARect) - else - DrawRaisedOuterBorder(Canvas, ARect); -// Draw3DFrame(Canvas, ARect, cl3DHighlight, cl3DFace, cl3DFace, cl3DShadow); -end; - - - -{$ENDIF read_implementation} - diff --git a/gui/fpguiwidget.inc b/gui/fpguiwidget.inc deleted file mode 100644 index 249c1ce2..00000000 --- a/gui/fpguiwidget.inc +++ /dev/null @@ -1,1368 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Basic events and Widget class declarations - - Copyright (C) 2006 - 2007 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. -} - -{%mainunit fpgui.pas} - -{$IFDEF read_interface} - -{ Basic events and widget declarations } - - -// ------------------------------------------------------------------- -// Basic event objects -// ------------------------------------------------------------------- - - {$M+} - { Basic/Abstract event object which has RTTI enabled. This object does some - kind of reference counting as well. } - TEventObj = class - private - RefCount: LongInt; - FSender: TObject; - public - constructor Create(ASender: TObject); - procedure AddRef; - procedure Release; - function SendToChild(AChild: TFWidget): Boolean; virtual; - published - property Sender: TObject read FSender write FSender; - end; - {$M-} - - TEventClass = class of TEventObj; - - // Miscellaneous events - - TLayoutingEventObj = class(TEventObj); - - TCalcSizesEventObj = class(TLayoutingEventObj); - - TResizedEventObj = class(TLayoutingEventObj) - private - FIsForced: Boolean; - public - constructor Create(ASender: TObject; AIsForced: Boolean); - published - property IsForced: Boolean read FIsForced write FIsForced; - end; - - - TDestroyEventObj = class(TEventObj); - TEnabledChangeEventObj = class(TEventObj); - TVisibilityChangeEventObj = class(TEventObj); - - - TPaintingEventObj = class(TEventObj) - private - FCanvas: TFCanvas; - public - constructor Create(ASender: TObject; ACanvas: TFCanvas); - published - property Canvas: TFCanvas read FCanvas write FCanvas; - end; - - - TPreparePaintEventObj = class(TPaintingEventObj) - public - // To prevent invisible children to be processed: - function SendToChild(AChild: TFWidget): Boolean; override; - end; - - - TPaintEventObj = class(TPaintingEventObj) - public - // To adapt the clipping region and add a translation: - function SendToChild(AChild: TFWidget): Boolean; override; - end; - - - // Mouse events - - TMouseEventObj = class(TEventObj) - private - FShift: TShiftState; - FPosition: TPoint; - public - constructor Create(ASender: TObject; AShift: TShiftState; APosition: TPoint); - function SendToChild(AChild: TFWidget): Boolean; override; - property Position: TPoint read FPosition write FPosition; - published - property Shift: TShiftState read FShift write FShift; - end; - - - TMouseButtonEventObj = class(TMouseEventObj) - private - FButton: TMouseButton; - public - constructor Create(ASender: TObject; AButton: TMouseButton; - AShift: TShiftState; APosition: TPoint); - published - property Button: TMouseButton read FButton write FButton; - end; - - - TMousePressedEventObj = class(TMouseButtonEventObj); - TMouseReleasedEventObj = class(TMouseButtonEventObj); - - - TMouseMoveEventObj = class(TMouseEventObj) - public - function SendToChild(AChild: TFWidget): Boolean; override; - end; - - - TMouseEnterEventObj = class(TMouseEventObj) - public - NewCursor: TFCursor; - end; - - - TMouseLeaveEventObj = class(TEventObj) - public - function SendToChild(AChild: TFWidget): Boolean; override; - end; - - - TMouseLeaveCheckEventObj = class(TMouseEventObj) - public - function SendToChild(AChild: TFWidget): Boolean; override; - NewCursor: TFCursor; - end; - - - TMouseWheelEventObj = class(TMouseEventObj) - private - FWheelDelta: Single; - public - constructor Create(ASender: TObject; AShift: TShiftState; - AWheelDelta: Single; APosition: TPoint); - published - property WheelDelta: Single read FWheelDelta write FWheelDelta; - end; - - -// ------------------------------------------------------------------- -// TWidget -// ------------------------------------------------------------------- - - TFWidgetStyle = set of (wsCaptureMouse, wsClickable, wsOpaque); - - TFContainerWidget = class; - - - TFWidget = class(TComponent) - private - FColor: TColor; - FParent: TFWidget; - FOnClick: TNotifyEvent; - // Property access - procedure SetColor(const AValue: TColor); - procedure SetParent(AParent: TFWidget); - function GetBoundsRect: TRect; - function GetLeft: Integer; - function GetTop: Integer; - function GetWidth: Integer; - function GetHeight: Integer; - procedure SetEnabled(AEnabled: Boolean); - procedure SetStyle(const AValue: TStyleAbs); - procedure SetVisible(AVisible: Boolean); - // Event handling - function EvCalcSizes(Event: TCalcSizesEventObj): Boolean; - function EvEnabledChange(Event: TEnabledChangeEventObj): Boolean; - function EvVisibilityChange(Event: TVisibilityChangeEventObj): Boolean; - function EvMousePressed(Event: TMousePressedEventObj): Boolean; - function EvMouseReleased(Event: TMouseReleasedEventObj): Boolean; - function EvMouseEnter(Event: TMouseEnterEventObj): Boolean; - function EvMouseLeave(Event: TMouseLeaveEventObj): Boolean; - function EvMouseLeaveCheck(Event: TMouseLeaveCheckEventObj): Boolean; - protected - FCursor: TFCursor; - FText: string; - FStyle: TStyleAbs; - FCanExpandHeight: Boolean; - FCanExpandWidth: Boolean; - FEnabled: Boolean; - FVisible: Boolean; - FOrigin: TPoint; - FBoundsSize: TSize; - FClientRect: TRect; - FMinSize: TSize; - FMaxSize: TSize; - FDefSize: TSize; - WidgetStyle: TFWidgetStyle; - WidgetState: TFWidgetState; - procedure Loaded; override; - procedure Click; dynamic; - procedure Paint(Canvas: TFCanvas); virtual; - procedure SetParentComponent(AParent: TComponent); override; - - // Layouting - procedure CalcSizes; virtual; abstract; - procedure Resized; virtual; - - // Events - function ProcessEvent(Event: TEventObj): Boolean; virtual; - function DistributeEvent(Event: TEventObj): Boolean; virtual; - procedure EvFocusChanged; dynamic; // Widget got or lost focus - procedure EvKeyPressed(Key: Word; Shift: TShiftState); dynamic; - procedure EvKeyReleased(Key: Word; Shift: TShiftState); dynamic; - procedure EvKeyChar(KeyChar: Char); dynamic; - procedure EvTextChanged; dynamic; - function DoMouseEnter(AShift: TShiftState; AMousePos: TPoint): Boolean; - - // Properties - function GetStyle: TStyleAbs; - procedure SetCanExpandWidth(allow: Boolean); - procedure SetCanExpandHeight(allow: Boolean); - procedure SetText(const AText: String); virtual; - property CanExpandWidth: Boolean read FCanExpandWidth write SetCanExpandWidth default False; - property CanExpandHeight: Boolean read FCanExpandHeight write SetCanExpandHeight default False; - property Cursor: TFCursor read FCursor write FCursor default crDefault; - property Text: String read FText write SetText; - property Color: TColor read FColor write SetColor default cl3DFace; - property OnClick: TNotifyEvent read FOnClick write FOnClick; - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - function SendEvent(Event: TEventObj): Boolean; - function FindForm: TFCustomForm; - procedure SetEmbeddedParent(AParent: TFWidget); - procedure SetBounds(APosition: TPoint; ASize: TSize); - procedure SetBounds(x, y, w, h: Integer); overload; - function WidgetToClient(const APoint: TPoint): TPoint; virtual; - function ClientToWidget(const APoint: TPoint): TPoint; virtual; - function ClientToScreen(const APoint: TPoint): TPoint; virtual; - procedure Show; dynamic; - procedure Hide; dynamic; - procedure Redraw; - procedure Redraw(const ARect: TRect); - procedure Scroll(const ARect: TRect; DeltaX, DeltaY: Integer); - procedure SetFocus; - procedure Update; - property Parent: TFWidget read FParent write SetParent; - property Origin: TPoint read FOrigin; - property BoundsSize: TSize read FBoundsSize; - property BoundsRect: TRect read GetBoundsRect; - property Left: Integer read GetLeft; - property Top: Integer read GetTop; - property Width: Integer read GetWidth; - property Height: Integer read GetHeight; - property MinSize: TSize read FMinSize; - property MaxSize: TSize read FMaxSize; - property DefSize: TSize read FDefSize; - property ClientRect: TRect read FClientRect; - property Style: TStyleAbs read GetStyle write SetStyle; - property Enabled: Boolean read FEnabled write SetEnabled default True; - property Visible: Boolean read FVisible write SetVisible default True; - end; - -{$ENDIF read_interface} - - - -{$IFDEF read_implementation} - -// ------------------------------------------------------------------- -// TEventObj -// ------------------------------------------------------------------- - -constructor TEventObj.Create(ASender: TObject); -begin - Sender := ASender; - RefCount := 1; -end; - - -procedure TEventObj.AddRef; -begin - Inc(RefCount); -end; - - -procedure TEventObj.Release; -begin - ASSERT(RefCount > 0); - Dec(RefCount); - if RefCount = 0 then - Self.Free; -end; - - -function TEventObj.SendToChild(AChild: TFWidget): Boolean; -begin - Inc(RefCount); - Result := AChild.SendEvent(Self); -end; - - -// ------------------------------------------------------------------- -// Miscellaneous events -// ------------------------------------------------------------------- - -constructor TResizedEventObj.Create(ASender: TObject; AIsForced: Boolean); -begin - inherited Create(ASender); - FIsForced := AIsForced; -end; - - -function TPreparePaintEventObj.SendToChild(AChild: TFWidget): Boolean; -begin - if wsIsVisible in AChild.WidgetState then - Result := inherited SendToChild(AChild) - else - Result := False; -end; - - -constructor TPaintingEventObj.Create(ASender: TObject; ACanvas: TFCanvas); -begin - inherited Create(ASender); - FCanvas := ACanvas; -end; - - -function TPaintEventObj.SendToChild(AChild: TFWidget): Boolean; -var - ClientPos: TPoint; -begin - if wsIsVisible in AChild.WidgetState then - begin - Canvas.SaveState; - try - if Canvas.IntersectClipRect(AChild.BoundsRect) then - begin - ClientPos := AChild.ClientToWidget(AChild.Origin); - Canvas.AppendTranslation(ClientPos); - Result := inherited SendToChild(AChild); - end else - Result := False; - finally - Canvas.RestoreState; - end; - end else - Result := False; -end; - - -// ------------------------------------------------------------------- -// Mouse events -// ------------------------------------------------------------------- - -constructor TMouseEventObj.Create(ASender: TObject; AShift: TShiftState; - APosition: TPoint); -begin - inherited Create(ASender); - Shift := AShift; - Position := APosition; -end; - - -function TMouseEventObj.SendToChild(AChild: TFWidget): Boolean; -var - OldPos, ClientPos: TPoint; -begin - if (AChild.WidgetState * [wsEnabled, wsIsVisible] = [wsEnabled, wsIsVisible]) - and ((AChild = AChild.FindForm.MouseCaptureWidget) or - PtInRect(AChild.BoundsRect, Position)) then - begin - // Store the old values, as they might get modified during AChild.SendEvent! - OldPos := Position; - ClientPos := AChild.WidgetToClient(Position); - Position := ClientPos - AChild.Origin; - Result := inherited SendToChild(AChild); - Position := OldPos; - end - else - Result := False; -end; - - -constructor TMouseButtonEventObj.Create(ASender: TObject; AButton: TMouseButton; - AShift: TShiftState; APosition: TPoint); -begin - inherited Create(ASender, AShift, APosition); - Button := AButton; -end; - - -function TMouseMoveEventObj.SendToChild(AChild: TFWidget): Boolean; -begin - if AChild.WidgetState * [wsEnabled, wsIsVisible] = [wsEnabled, wsIsVisible] then - begin - if PtInRect(AChild.BoundsRect, Position) and not (wsMouseInside in AChild.WidgetState) then - AChild.DoMouseEnter(Shift, Position - AChild.Origin); - - Result := inherited SendToChild(AChild); - end - else - Result := False; -end; - - -function TMouseLeaveEventObj.SendToChild(AChild: TFWidget): Boolean; -begin - if wsMouseInside in AChild.WidgetState then - Result := inherited SendToChild(AChild) - else - Result := False; -end; - - -function TMouseLeaveCheckEventObj.SendToChild(AChild: TFWidget): Boolean; -begin - if ((FPosition.X < AChild.Left) or (FPosition.Y < AChild.Top) or - (FPosition.X >= AChild.Left + AChild.Width) or - (FPosition.Y >= AChild.Top + AChild.Height)) and - (wsMouseInside in AChild.WidgetState) then - AChild.SendEvent(TMouseLeaveEventObj.Create(Self)); - - Result := inherited SendToChild(AChild); -end; - - -constructor TMouseWheelEventObj.Create(ASender: TObject; AShift: TShiftState; - AWheelDelta: Single; APosition: TPoint); -begin - inherited Create(ASender, AShift, APosition); - WheelDelta := AWheelDelta; -end; - - -// =================================================================== -// TWidget -// =================================================================== - -constructor TFWidget.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - WidgetStyle := []; - WidgetState := [wsEnabled]; - FCanExpandWidth := False; - FCanExpandHeight := False; - FEnabled := True; - FVisible := True; - FColor := cl3DFace; -end; - -destructor TFWidget.Destroy; -begin - inherited Destroy; -end; - -function TFWidget.SendEvent(Event: TEventObj): Boolean; -{$IFDEF TraceEvents} -var - i: Integer; -{$ENDIF} -begin -{$IFDEF TraceEvents} - for i := 1 to EventNestingLevel do - Write(' '); - WriteLn(Event.ClassName, ' event for ', Name, ':', ClassName); - Inc(EventNestingLevel); -{$ENDIF} - - Result := ProcessEvent(Event); - -{$IFDEF TraceEvents} - Dec(EventNestingLevel); - for i := 1 to EventNestingLevel do - Write(' '); - if Result then - WriteLn(Event.ClassName, ' event has been blocked.'); -{$ENDIF} - Event.Release; -end; - -function TFWidget.FindForm: TFCustomForm; -var - Widget: TFWidget; -begin - Widget := Self; - while not (Widget is TFCustomForm) do - begin - Widget := Widget.Parent; - if not Assigned(Widget) then - begin - Result := nil; - exit; - end; - end; - Result := TFCustomForm(Widget); -end; - -procedure TFWidget.SetEmbeddedParent(AParent: TFWidget); -begin - FParent := AParent; -end; - -procedure TFWidget.SetBounds(APosition: TPoint; ASize: TSize); -begin - LAYOUTTRACE('TFWidget.SetBounds for %s:%s. Old size: %dx%d, new size: %dx%d', - [Name, ClassName, BoundsSize.cx, BoundsSize.cy, ASize.cx, ASize.cy]); - FOrigin := APosition; - if ASize <> BoundsSize then - begin - FBoundsSize := ASize; - FClientRect := Rect(0, 0, BoundsSize.cx, BoundsSize.cy); - SendEvent(TResizedEventObj.Create(Self, wsSizeIsForced in WidgetState)); - end; -end; - -procedure TFWidget.SetBounds(x, y, w, h: Integer); -begin - SetBounds(Point(x, y), Size(w, h)); -end; - -function TFWidget.WidgetToClient(const APoint: TPoint): TPoint; -begin - // as default, the outer rectangle is identical to the client rectangle - Result := APoint; -end; - -function TFWidget.ClientToWidget(const APoint: TPoint): TPoint; -begin - // as default, the outer rectangle is identical to the client rectangle - Result := APoint; -end; - -function TFWidget.ClientToScreen(const APoint: TPoint): TPoint; -begin - Result := APoint + Origin; - Result := ClientToWidget(Result); - if Assigned(Parent) then - Result := Parent.ClientToScreen(Result); -end; - -{procedure TFWidget.Update; -begin - LAYOUTTRACE('TFWidget.Update for %s:%s', [Name, ClassName]); - if wsIsUpdating in WidgetState then - exit; - - Include(WidgetState, wsIsUpdating); - SendEvent(TUpdateEventObj.Create(Self)); - Exclude(WidgetState, wsIsUpdating); -end; - -procedure TFWidget.RecalcLayout; -var - OldW, OldH: Integer; - x, y: Integer; - Widget: TFWidget; -begin - if (csLoading in ComponentState) or (not Visible) then - exit; - - LAYOUTTRACE('TFWidget.RecalcLayout for %s:%s', [Name, ClassName]); - - OldW := Width; - OldH := Height; - - MinW := 0; - MinH := 0; - DefW := 0; - DefH := 0; - MaxW := InfiniteSize; - MaxH := InfiniteSize; - - EvRecalcLayout; - - if MinW = 0 then MinW := 1; - if MinH = 0 then MinH := 1; - if DefW < MinW then DefW := MinW; - if DefH < MinH then DefH := MinH; - - if (not FCanExpandWidth) or (MaxW < DefW) then - MaxW := DefW; - if (not FCanExpandHeight) or (MaxH < DefH) then - MaxH := DefH; - - if (DefW < OldW) or (DefH < OldH) or ((not (wsOpaque in WidgetStyle)) and - ((DefW > OldW) or (DefH > OldH))) then - begin - x := 0; - y := 0; - Widget := Self; - while not (Widget is TFCustomForm) do - begin - Inc(x, Widget.Left); - Inc(y, Widget.Top); - Widget := Widget.parent; - end; - TFCustomForm(Widget).Wnd.Invalidate(Rect(x, y, - x + Max(Width, OldW), y + Max(Height, OldH))); - end; - - if Assigned(Parent) and not (wsIsUpdating in Parent.WidgetState) then - Parent.RecalcLayout; -end;} - -procedure TFWidget.Show; -begin - if not Visible then - begin - LAYOUTTRACE('TFWidget.Show for %s:%s', [Name, ClassName]); - FVisible := True; - if Assigned(Parent) and (wsIsVisible in Parent.WidgetState) then - begin - SendEvent(TVisibilityChangeEventObj.Create(Self)); - Parent.Update; - end; - end; -end; - -procedure TFWidget.Hide; -begin - if Visible then - begin - LAYOUTTRACE('TFWidget.Hide for %s:%s', [Name, ClassName]); - FVisible := False; - if wsIsVisible in WidgetState then - begin - SendEvent(TVisibilityChangeEventObj.Create(Self)); - if Assigned(Parent) then - Parent.Update; - end; - end; -end; - -procedure TFWidget.Redraw; -begin - {$IFDEF DEBUG} - writeln(Format('TFWidget.Redraw -> %s:%s', [Text, ClassName])); - {$ENDIF} - Redraw(Rect(0, 0, BoundsSize.cx, BoundsSize.cy)); -end; - -procedure TFWidget.Redraw(const ARect: TRect); -var - x, y: Integer; - Form: TFCustomForm; - WidgetPos, FormPos: TPoint; -begin - if not (wsIsVisible in WidgetState) then - exit; - - Form := FindForm; - WidgetPos := ClientToScreen(Point(0, 0)); - FormPos := Form.ClientToScreen(Point(0, 0)); - - x := ARect.Left + WidgetPos.x - FormPos.x; - y := ARect.Top + WidgetPos.y - FormPos.y; - Form.Wnd.Invalidate( - Rect(x, y, x + ARect.Right - ARect.Left, y + ARect.Bottom - ARect.Top)); -end; - -procedure TFWidget.Scroll(const ARect: TRect; DeltaX, DeltaY: Integer); -var - r, ClipRect: TRect; - Widget: TFWidget; - Form: TFCustomForm; - Canvas: TFCanvas; -begin - if not (wsIsVisible in WidgetState) then - exit; - - Form := FindForm; - - { !!!: Better do real DirtyList correction, which might improve performance - a lot in some situations } - Form.Wnd.PaintInvalidRegion; - - r.Left := ARect.Left; - r.Top := ARect.Top; - Widget := Self; - Canvas := TFCanvas(Form.Wnd.Canvas); - Canvas.SaveState; - try - while Widget <> Form do - begin - ClipRect.TopLeft := Form.WidgetCoords(Widget); - ClipRect.BottomRight := ClipRect.TopLeft + Widget.BoundsSize; - Canvas.IntersectClipRect(ClipRect); - r.TopLeft := r.TopLeft + Widget.Origin + - Widget.ClientToWidget(Point(0, 0)); - Widget := Widget.Parent; - end; - - r.Right := r.Left + ARect.Right - ARect.Left; - r.Bottom := r.Top + ARect.Bottom - ARect.Top; - - ClipRect := Canvas.GetClipRect; - - { Perform a quick clipping against the ClipRect - this might reduce - the number of pixels which get copied } - if r.Left < ClipRect.Left then - r.Left := ClipRect.Left; - if r.Left + DeltaX < ClipRect.Left then - r.Left := ClipRect.Left - DeltaX; - if r.Top < ClipRect.Top then - r.Top := ClipRect.Top; - if r.Top + DeltaY < ClipRect.Top then - r.Top := ClipRect.Top - DeltaY; - if r.Right > ClipRect.Right then - r.Right := ClipRect.Right; - if r.Right + DeltaX > ClipRect.Right then - r.Right := ClipRect.Right - DeltaX; - if r.Bottom > ClipRect.Bottom then - r.Bottom := ClipRect.Bottom; - if r.Bottom + DeltaY > ClipRect.Bottom then - r.Bottom := ClipRect.Bottom - DeltaY; - - Canvas.CopyRect(Canvas, r, r.TopLeft + Point(DeltaX, DeltaY)); - finally - Canvas.RestoreState; - end; - - // Redraw the areas which has been scrolled in - with Form.WidgetCoords(Self) do - begin - Dec(ClipRect.Left, x); - Dec(ClipRect.Top, y); - Dec(ClipRect.Right, x); - Dec(ClipRect.Bottom, y); - end; - - if DeltaX <> 0 then - begin - r := ARect; - if DeltaX < 0 then // Scrolling to the left size - begin - r.Left := r.Right + DeltaX; - if r.Right > ClipRect.Right then - begin - Dec(r.Left, r.Right - ClipRect.Right); - r.Right := ClipRect.Right; - end; - end else // Scrolling to the right size - begin - r.Right := r.Left + DeltaX; - if r.Left < ClipRect.Left then - begin - Inc(r.Right, ClipRect.Left - r.Left); - r.Left := ClipRect.Left; - end; - end; - Redraw(r); - end; - - if DeltaY <> 0 then - begin - r := ARect; - if DeltaY < 0 then // Scrolling upwards - begin - r.Top := r.Bottom + DeltaY; - if r.Bottom > ClipRect.Bottom then - begin - Dec(r.Top, r.Bottom - ClipRect.Bottom); - r.Bottom := ClipRect.Bottom; - end; - end else // Scrolling downwards - begin - r.Bottom := r.Top + DeltaY; - if r.Top < ClipRect.Top then - begin - Inc(r.Bottom, ClipRect.Top - r.Top); - r.Top := ClipRect.Top; - end; - end; - Redraw(r); - end; -end; - -procedure TFWidget.SetFocus; -begin - FindForm.FocusedWidget := Self; -end; - -procedure TFWidget.Update; -var - PropagateUpdate: Boolean; - OldMinSize, OldMaxSize, OldDefSize: TSize; -begin - if not (wsIsVisible in WidgetState) then - exit; - - if wsSizeIsForced in WidgetState then - PropagateUpdate := True - else - begin - OldMinSize := MinSize; - OldMaxSize := MaxSize; - OldDefSize := DefSize; - SendEvent(TCalcSizesEventObj.Create(Self)); - PropagateUpdate := (OldMinSize <> MinSize) or (OldMaxSize <> MaxSize) or - (OldDefSize <> DefSize); - end; - - if PropagateUpdate and Assigned(Parent) then - Parent.Update - else - SendEvent(TResizedEventObj.Create(Self, wsSizeIsForced in WidgetState)); -end; - -procedure TFWidget.Loaded; -begin - inherited Loaded; -{!!!: if not (wsEnabled in WidgetState) then - UpdateEnabledState;} -end; - -procedure TFWidget.Click; -begin - Redraw; - if Assigned(OnClick) then - OnClick(Self); -end; - -procedure TFWidget.Paint(Canvas: TFCanvas); -begin - Canvas.SetColor(Style.GetUIColor(FColor)); -end; - -procedure TFWidget.SetParentComponent(AParent: TComponent); -begin - if AParent is TFContainerWidget then - SetParent(TFContainerWidget(AParent)); -end; - -procedure TFWidget.SetEnabled(AEnabled: Boolean); -begin - if AEnabled <> Enabled then - begin - FEnabled := AEnabled; - SendEvent(TEnabledChangeEventObj.Create(Self)); - end; -end; - -procedure TFWidget.SetStyle(const AValue: TStyleAbs); -begin - FStyle := AValue; -end; - -procedure TFWidget.SetVisible(AVisible: Boolean); -begin - if AVisible then - Show - else - Hide; -end; - -procedure TFWidget.Resized; -begin - // Do nothing by default -end; - -procedure TFWidget.EvFocusChanged; -begin - Redraw; -end; - -procedure TFWidget.EvKeyPressed(Key: Word; Shift: TShiftState); - - function SetFocusIfPossible(Widget: TFWidget): Boolean; - begin - Result := (wsClickable in Widget.WidgetStyle) and - (wsEnabled in Widget.WidgetState); - if Result then - Widget.SetFocus; - end; - - function FocusFirst(Widget: TFWidget): Boolean; - var - i: Integer; - Child: TFWidget; - begin - Result := False; - if not Widget.InheritsFrom(TFContainerWidget) then - exit; - - for i := 0 to TFContainerWidget(Widget).ChildCount - 1 do - begin - Child := TFContainerWidget(Widget).Children[i]; - if SetFocusIfPossible(Child) or FocusFirst(Child) then - begin - Result := True; - exit; - end; - end; - end; - - function FocusLast(Widget: TFWidget): Boolean; - var - i: Integer; - Child: TFWidget; - begin - Result := False; - if not Widget.InheritsFrom(TFContainerWidget) then - exit; - - for i := TFContainerWidget(Widget).ChildCount - 1 downto 0 do - begin - Child := TFContainerWidget(Widget).Children[i]; - if SetFocusIfPossible(Child) or FocusLast(Child) then - begin - Result := True; - exit; - end; - end; - end; - -var - mshift: TShiftState; - i, j: Integer; - CurWidget: TFWidget; - CurParent: TFContainerWidget; -begin - // Handle focus movement keys - mshift := Shift * [ssShift, ssAlt, ssCtrl, ssMeta, ssSuper, ssHyper, ssAltGr]; - if ((mshift = []) and ((Key = keyLeft) or (Key = keyUp))) or - ((mshift = [ssShift]) and (Key = keyTab)) then - begin - if Assigned(Parent) then - begin - CurWidget := Self; - CurParent := TFContainerWidget(Parent); - while Assigned(CurParent) and CurParent.InheritsFrom(TFContainerWidget) do - begin - for i := CurParent.ChildCount - 1 downto 1 do - begin - if CurParent.Children[i] = CurWidget then - begin - j := i - 1; - //Dec(i); - while j >= 0 do - begin - if SetFocusIfPossible(CurParent.Children[j]) or - FocusLast(CurParent.Children[j]) then - exit; - Dec(j); - end; - break; - end; { if } - end; { for } - CurParent := TFContainerWidget(CurParent.Parent); - end; { while } - end - else - begin - if FocusLast(Self) then - exit; - end; - end - else - begin - if (mshift = []) and - ((Key = keyRight) or (Key = keyDown) or (Key = keyTab)) then - begin - if Assigned(Parent) then - begin - CurWidget := Self; - CurParent := TFContainerWidget(Parent); - while Assigned(CurParent) and CurParent.InheritsFrom(TFContainerWidget) do - begin - for i := 0 to CurParent.ChildCount - 2 do - begin - if CurParent.Children[i] = CurWidget then - begin - j := i; - Inc(j); - while j < CurParent.ChildCount do - begin - if SetFocusIfPossible(CurParent.Children[j]) or - FocusFirst(CurParent.Children[j]) then - exit; - Inc(j); - end; - break; - end; { if } - end; { for } - CurParent := TFContainerWidget(CurParent.Parent); - end; { while } - end - else - begin - if FocusFirst(Self) then - exit; - end; - end - else if (Key = Ord(' ')) and (wsClickable in WidgetStyle) then - begin - Click; - exit; - end; - end; - - if Assigned(Parent) then - Parent.EvKeyPressed(Key, Shift); -end; - -procedure TFWidget.EvKeyReleased(Key: Word; Shift: TShiftState); -begin - if Assigned(Parent) then - Parent.EvKeyReleased(Key, Shift); -end; - -procedure TFWidget.EvKeyChar(KeyChar: Char); -begin - if Assigned(Parent) then - Parent.EvKeyChar(KeyChar); -end; - -procedure TFWidget.EvTextChanged; -begin - Update; - Redraw; -end; - -function TFWidget.DoMouseEnter(AShift: TShiftState; AMousePos: TPoint): Boolean; -var - Event: TMouseEnterEventObj; -begin - Event := TMouseEnterEventObj.Create(Self, AShift, AMousePos); - Event.AddRef; - Result := SendEvent(Event); - if Event.NewCursor <> crDefault then - FindForm.Wnd.Cursor := Event.NewCursor; - Event.Free; -end; - -function TFWidget.GetStyle: TStyleAbs; -var - Widget: TFWidget; -begin - if Assigned(FStyle) then - Result := FStyle - else - begin - ASSERT(Assigned(Parent)); - // Don't use recursive calls here, they are not necessary - Widget := Parent; - while not Assigned(Widget.FStyle) do - begin - Widget := Widget.Parent; - ASSERT(Assigned(Widget)); - end; - Result := Widget.FStyle; - end; -end; - -function TFWidget.ProcessEvent(Event: TEventObj): Boolean; -var - Canvas: TFCanvas; - Matrix: TGfxMatrix; - ClientPos: TPoint; - PreparationEvent: TPreparePaintEventObj; -begin - // Handle events which must be processed before the children get them - if Event.InheritsFrom(TResizedEventObj) then - begin - if TResizedEventObj(Event).IsForced then - Include(WidgetState, wsSizeIsForced) - else - Exclude(WidgetState, wsSizeIsForced); - Resized; - Result := DistributeEvent(Event); - end - else if Event.InheritsFrom(TEnabledChangeEventObj) then - Result := EvEnabledChange(TEnabledChangeEventObj(Event)) - else if Event.InheritsFrom(TVisibilityChangeEventObj) then - Result := EvVisibilityChange(TVisibilityChangeEventObj(Event)) or DistributeEvent(Event) - else if Event.InheritsFrom(TMouseEnterEventObj) then - Result := EvMouseEnter(TMouseEnterEventObj(Event)) or DistributeEvent(Event) - else if Event.InheritsFrom(TPreparePaintEventObj) then - begin - Canvas := TPreparePaintEventObj(Event).Canvas; - if wsOpaque in WidgetStyle then - begin - Canvas.ExcludeClipRect(BoundsRect); - Result := False; - end - else - begin - Matrix := Canvas.Matrix; - ClientPos := ClientToWidget(Origin); - Canvas.AppendTranslation(ClientPos); - Result := DistributeEvent(Event); - Canvas.Matrix := Matrix; - end; - end - else if Event.InheritsFrom(TPaintEventObj) then - begin - Canvas := TPaintEventObj(Event).Canvas; - Canvas.SaveState; - PreparationEvent := TPreparePaintEventObj.Create(Self, Canvas); - DistributeEvent(PreparationEvent); - PreparationEvent.Release; - Paint(Canvas); - Canvas.RestoreState; - Result := DistributeEvent(Event); - end - else - begin - // First distribute the event to all children, then try to handle them here - Result := DistributeEvent(Event); - if not Result then - begin - if Event.InheritsFrom(TCalcSizesEventObj) then - EvCalcSizes(TCalcSizesEventObj(Event)) -{ if Event.InheritsFrom(TUpdateEventObj) then - Result := EvUpdate(TUpdateEventObj(Event))} - else if Event.InheritsFrom(TMousePressedEventObj) then - Result := EvMousePressed(TMousePressedEventObj(Event)) - else if Event.InheritsFrom(TMouseReleasedEventObj) then - Result := EvMouseReleased(TMouseReleasedEventObj(Event)) - else if Event.InheritsFrom(TMouseLeaveEventObj) then - Result := EvMouseLeave(TMouseLeaveEventObj(Event)) - else if Event.InheritsFrom(TMouseLeaveCheckEventObj) then - Result := EvMouseLeaveCheck(TMouseLeaveCheckEventObj(Event)); - end; - end; -end; - -function TFWidget.DistributeEvent(Event: TEventObj): Boolean; -begin - // Do nothing here, as TFWidget itself doesn't have children - Result := False; -end; - -procedure TFWidget.SetParent(AParent: TFWidget); -begin - // !!!: reparenting when changing the form is not possible - if AParent <> FParent then - begin - // Remove the widget from the old parent, if it had a parent... - if Assigned(FParent) and FParent.InheritsFrom(TFContainerWidget) then - TFContainerWidget(FParent).RemoveChild(Self); - - FParent := AParent; - - // ...and add it to the new parent, if existent. - if Assigned(Parent) and Parent.InheritsFrom(TFContainerWidget) then - TFContainerWidget(Parent).InsertChild(Self); - end; -end; - -procedure TFWidget.SetColor(const AValue: TColor); -begin - if FColor=AValue then exit; - FColor:=AValue; -end; - -function TFWidget.GetBoundsRect: TRect; -begin - Result.TopLeft := Origin; - Result.BottomRight := Origin + BoundsSize; -end; - -function TFWidget.GetLeft: Integer; -begin - Result := Origin.x; -end; - -function TFWidget.GetTop: Integer; -begin - Result := Origin.y; -end; - -function TFWidget.GetWidth: Integer; -begin - Result := BoundsSize.cx; -end; - -function TFWidget.GetHeight: Integer; -begin - Result := BoundsSize.cy; -end; - -procedure TFWidget.SetCanExpandWidth(allow: Boolean); -begin - if FCanExpandWidth <> allow then - begin - FCanExpandWidth := allow; - Update; - end; -end; - -procedure TFWidget.SetCanExpandHeight(allow: Boolean); -begin - if FCanExpandHeight <> allow then - begin - FCanExpandHeight := allow; - Update; - end; -end; - -procedure TFWidget.SetText(const AText: String); -begin - if AText <> Text then - begin - FText := AText; - EvTextChanged; - end; -end; - -function TFWidget.EvCalcSizes(Event: TCalcSizesEventObj): Boolean; -begin - LAYOUTTRACE('TFWidget.EvCalcSizes for %s:%s', [Name, ClassName]); - - FMinSize := Size(0, 0); - FMaxSize := Size(InfiniteSize, InfiniteSize); - FDefSize := Size(0, 0); - - CalcSizes; - - if MinSize.cx = 0 then FMinSize.cx := 1; - if MinSize.cy = 0 then FMinSize.cy := 1; - if DefSize.cx < MinSize.cx then FDefSize.cx := MinSize.cx; - if DefSize.cy < MinSize.cy then FDefSize.cy := MinSize.cy; - - if (not FCanExpandWidth) or (MaxSize.cx < DefSize.cx) then - FMaxSize.cx := DefSize.cx; - if (not FCanExpandHeight) or (MaxSize.cy < DefSize.cy) then - FMaxSize.cy := DefSize.cy; - - Result := False; -end; - -function TFWidget.EvEnabledChange(Event: TEnabledChangeEventObj): Boolean; -var - NewState: Boolean; -begin - if Assigned(Parent) then - NewState := Enabled and (wsEnabled in Parent.WidgetState) - else - NewState := Enabled; - - if NewState and not (wsEnabled in WidgetState) then - begin - Include(WidgetState, wsEnabled); - Redraw; - Result := DistributeEvent(Event); - end else if (not NewState) and (wsEnabled in WidgetState) then - begin - Exclude(WidgetState, wsEnabled); - if wsHasFocus in WidgetState then - FindForm.FocusedWidget := nil; - Redraw; - Result := DistributeEvent(Event); - end else - Result := False; -end; - -function TFWidget.EvVisibilityChange(Event: TVisibilityChangeEventObj): Boolean; -begin - if Visible then - begin - if (not Assigned(Parent)) or (wsIsVisible in Parent.WidgetState) then - Include(WidgetState, wsIsVisible); - end else - Exclude(WidgetState, wsIsVisible); - - Result := False; -end; - -function TFWidget.EvMousePressed(Event: TMousePressedEventObj): Boolean; -begin - if (wsClickable in WidgetStyle) and (wsEnabled in WidgetState) and - (Event.Button = mbLeft) then - begin - if wsCaptureMouse in WidgetStyle then - FindForm.MouseCaptureWidget := Self; - Include(WidgetState, wsClicked); - Include(WidgetState, wsHasFocus); - SetFocus; - Redraw; - Result := True; - end - else - Result := False; -end; - -function TFWidget.EvMouseReleased(Event: TMouseReleasedEventObj): Boolean; -begin - if (wsClickable in WidgetStyle) and (wsEnabled in WidgetState) and - (Event.Button = mbLeft) then - begin - if wsClicked in WidgetState then - begin - Exclude(WidgetState, wsClicked); - with Event do - if (Position.x >= 0) and (Position.y >= 0) - and (Position.x < BoundsSize.cx) - and (Position.y < BoundsSize.cy) then - Click - else - Redraw; - end; - if wsCaptureMouse in WidgetStyle then - FindForm.MouseCaptureWidget := nil; - Result := True; - end else - Result := False; -end; - -function TFWidget.EvMouseEnter(Event: TMouseEnterEventObj): Boolean; -begin - Include(WidgetState, wsMouseInside); - if Cursor <> crDefault then - Event.NewCursor := Cursor; - if (wsClickable in WidgetStyle) and (wsClicked in WidgetState) and - (wsEnabled in WidgetState) then - Redraw; - Result := False; - {$IFDEF DEBUG} - WriteLn('Mouse entered ', Name, ':', ClassName, '. New cursor: ', Ord(Event.NewCursor)); - {$ENDIF} -end; - -function TFWidget.EvMouseLeave(Event: TMouseLeaveEventObj): Boolean; -begin - Exclude(WidgetState, wsMouseInside); - if (wsClickable in WidgetStyle) and (wsClicked in WidgetState) and - (wsEnabled in WidgetState) then - Redraw; - Result := False; - {$IFDEF DEBUG} - WriteLn('Mouse left ', Name, ':', ClassName); - {$ENDIF} -end; - -function TFWidget.EvMouseLeaveCheck(Event: TMouseLeaveCheckEventObj): Boolean; -begin - if ((Event.Position.x < 0) or (Event.Position.y < 0) or - (Event.Position.x >= BoundsSize.cx) or - (Event.Position.y >= BoundsSize.cy)) then - begin - if wsMouseInside in WidgetState then - SendEvent(TMouseLeaveEventObj.Create(Self)) - end - else if (FindForm.MouseCaptureWidget = Self) and not (wsMouseInside in WidgetState) then - SendEvent(TMouseEnterEventObj.Create(Self, Event.Shift, Event.Position)); - - if (wsMouseInside in WidgetState) and (Event.NewCursor = crDefault) and - (Cursor <> crDefault) then - begin - Event.NewCursor := Cursor; - end; - Result := False; -end; - -{$ENDIF read_implementation} - diff --git a/gui/motifstyle.pas b/gui/motifstyle.pas deleted file mode 100644 index 5abf01e0..00000000 --- a/gui/motifstyle.pas +++ /dev/null @@ -1,174 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Motif style implementation - - Copyright (C) 2006 - 2007 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. -} - -unit MotifStyle; - -{$mode objfpc}{$H+} - -interface - -uses - Classes - ,SysUtils - ,fpGUI - ,fpGFX - ; - - -type - - TMotifStyle = class(TBasicStyle) - public - // General - procedure DrawFocusRect(Canvas: TFCanvas; const ARect: TRect); override; - // Buttons - procedure DrawButtonFace(Canvas: TFCanvas; const ARect: TRect; Flags: TFButtonFlags); override; - // Check boxes - procedure DrawCheckBox(Canvas: TFCanvas; const ARect, LabelRect: TRect; Flags: TFCheckboxFlags); override; - end; - - -implementation - - -{ MotifStyle } - -procedure TMotifStyle.DrawButtonFace(Canvas: TFCanvas; const ARect: TRect; - Flags: TFButtonFlags); -var - r: TRect; -begin - r := ARect; - - if btnIsSelected in Flags then - begin - SetUIColor(Canvas, cl3DDkShadow); - Canvas.DrawRect(r); - Inc(r.Left); - Inc(r.Top); - Dec(r.Right); - Dec(r.Bottom); - end; - - if btnIsPressed in Flags then - begin - SetUIColor(Canvas, cl3DShadow); - Canvas.DrawRect(r); - Inc(r.Left); - Inc(r.Top); - Dec(r.Right); - Dec(r.Bottom); - end else - begin - if btnIsEmbedded in Flags then - Draw3DFrame(Canvas, r, cl3DLight, cl3DHighlight, cl3DDkShadow, cl3DShadow) - else - Draw3DFrame(Canvas, r, cl3DHighlight, cl3DLight, cl3DDkShadow, cl3DShadow); - Inc(r.Left, 2); - Inc(r.Top, 2); - Dec(r.Right, 2); - Dec(r.Bottom, 2); - end; - - SetUIColor(Canvas, cl3DFace); - Canvas.FillRect(r); - - if btnHasFocus in Flags then - begin - r.Left := ARect.Left + 4; - r.Top := ARect.Top + 4; - r.Right := ARect.Right - 4; - r.Bottom := ARect.Bottom - 4; - DrawFocusRect(Canvas, r); - end; -end; - -procedure TMotifStyle.DrawFocusRect(Canvas: TFCanvas; const ARect: TRect); -begin - SetUIColor(Canvas, clGray); - Canvas.DrawRect(ARect); -end; - -procedure TMotifStyle.DrawCheckBox(Canvas: TFCanvas; const ARect, - LabelRect: TRect; Flags: TFCheckboxFlags); -var - r: TRect; - xmid: integer; - ymid: integer; - - procedure _DrawBottomHalf; - begin - // draw the bottom \ line - Canvas.DrawLine(Point(r.Left+1, r.Top+ymid+1), Point(r.Left+xmid, r.Bottom)); - Canvas.DrawLine(Point(r.Left+2, r.Top+ymid+1), Point(r.Left+xmid, r.Bottom-1)); - Canvas.DrawLine(Point(r.Left+3, r.Top+ymid+1), Point(r.Left+xmid, r.Bottom-2)); - // draw the bottom / line - Canvas.DrawLine(Point(r.Left+xmid, r.Bottom), Point(r.Right, r.Top+ymid-1)); - Canvas.DrawLine(Point(r.Left+xmid, r.Bottom-1), Point(r.Right-1, r.Top+ymid-1)); - Canvas.DrawLine(Point(r.Left+xmid, r.Bottom-2), Point(r.Right-2, r.Top+ymid-1)); - end; - - procedure _DrawTopHalf; - begin - // draw the top / line - Canvas.DrawLine(Point(r.Left, r.Top+ymid), Point(r.Left+xmid+1, r.Top)); - Canvas.DrawLine(Point(r.Left+1, r.Top+ymid), Point(r.Left+xmid+1, r.Top+1)); - Canvas.DrawLine(Point(r.Left+2, r.Top+ymid), Point(r.Left+xmid+1, r.Top+2)); - // draw the top \ line - Canvas.DrawLine(Point(r.Left+xmid+1, r.Top+2), Point(r.Right-1, r.Top+ymid)); - Canvas.DrawLine(Point(r.Left+xmid+1, r.Top+3), Point(r.Right-2, r.Top+ymid)); - Canvas.DrawLine(Point(r.Left+xmid+1, r.Top+4), Point(r.Right-3, r.Top+ymid)); - end; - -begin - SetUIColor(Canvas, cl3DFace); - Canvas.FillRect(ARect); - - r.Left := ARect.Left; - r.Top := ARect.Top + (ARect.Bottom - ARect.Top - 13) div 2; - r.Right := 13; - r.Bottom := r.Top + 13; - xmid := ((r.Right - r.Left) div 2); - ymid := ((r.Bottom - r.Top) div 2) + 1; - - if (cbIsChecked in Flags) then - begin - SetUIColor(Canvas, clWhite); - _DrawBottomHalf; - SetUIColor(Canvas, cl3DShadow); - _DrawTopHalf; - end - else - begin - SetUIColor(Canvas, cl3DShadow); - _DrawBottomHalf; - SetUIColor(Canvas, clWhite); - _DrawTopHalf; - end; - - if cbHasFocus in Flags then - with LabelRect do - DrawFocusRect(Canvas, Rect(Left - 2, Top - 2, Right + 2, Bottom + 2)); - -end; - - -//initialization -//finalization -// gStyleManager.RegisterClass('Motif', TMotifStyle); - -end. - diff --git a/gui/opensoftstyle.pas b/gui/opensoftstyle.pas deleted file mode 100644 index cb23cc43..00000000 --- a/gui/opensoftstyle.pas +++ /dev/null @@ -1,327 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - OpenSoft look-and-feel style implementation - - Copyright (C) 2006 - 2007 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. -} - -unit OpenSoftStyle; - -{$mode objfpc}{$H+} - -interface -uses - Classes - ,fpGUI - ,gfxBase - ,fpGFX - ; - -type - - TGradientDirection = (gdTopToBottom, gdBottomToTop, gdLeftToRight, gdRightToLeft); - TCalcGradientEndX = function(Y, H: Integer): Integer; - - - { TOpenSoftStyle } - - TOpenSoftStyle = class(TBasicStyle) - private - procedure PaintGradient(pCanvas: TFCanvas; const R: TRect; StartColor, EndColor: TColor; Direction: TGradientDirection; GradLines: Integer = -1); - public - // Colors - function GetGUIColor(Color: TColor): TGfxColor; override; - // Buttons - procedure DrawButtonFace(Canvas: TFCanvas; const ARect: TRect; Flags: TFButtonFlags); override; - function GetButtonBorders: TRect; override; - // GroupBox - procedure DrawGroupBox(Canvas: TFCanvas; const ARect: TRect; const ALabel: String; WidgetState: TFWidgetState); override; - end; - - -implementation - -const - // Some predefined colors: - rgbaDkBlue: TGfxColor = (Red: $0000; Green: $0000; Blue: $8000; Alpha: $0000); - rgbaLtYellow: TGfxColor = (Red: $ffff; Green: $ffff; Blue: $e100; Alpha: $0000); - - rgbaWindowText: TGfxColor = (Red: $0000; Green: $0000; Blue: $0000; Alpha: $0000); - rgbaWindow: TGfxColor = (Red: $efef; Green: $efef; Blue: $efef; Alpha: $0000); - rgbaDkGrey: TGfxColor = (Red: $8686; Green: $8686; Blue: $8686; Alpha: $0000); - rgbaGbAALtGrey: TGfxColor = (Red: $baba; Green: $baba; Blue: $baba; Alpha: $0000); - rgbaGbAADkGrey: TGfxColor = (Red: $7878; Green: $7878; Blue: $7878; Alpha: $0000); - - -{ -procedure DrawGradient(Canvas: TCanvas; const R: TRect; StartColor, EndColor: TColor; - Direction: TGradientDirection; GradLines: Integer = -1; CalcEndX: TCalcGradientEndX = nil); -procedure DrawGradientEx(Canvas: TCanvas; const R: TRect; StartColor: TColor; - StartToMidHeight: Integer; MidColor, EndColor: TColor; - Direction: TGradientDirection; CalcEndX: TCalcGradientEndX = nil); - - -procedure ToRGB(c: TColor; out rgb: TRGB); -var - l: TColorRef; -begin - c := ColorFromColormap(c); - l := ColorToRGB(c); - rgb.r := TRGBValue(l).r; - rgb.g := TRGBValue(l).g; - rgb.b := TRGBValue(l).b; -end; -} - -{ TOpenSoftStyle } - -procedure TOpenSoftStyle.PaintGradient(pCanvas: TFCanvas; const R: TRect; - StartColor, EndColor: TColor; Direction: TGradientDirection; - GradLines: Integer = -1); -var - X: integer; - i: integer; - w: integer; - h: integer; - Count: integer; - EndCol: TGfxColor; - StartCol: TGfxColor; - AddCol: TGfxColor; - Tmp: TGfxColor; -begin -(* - w := R.Right - R.Left - 1; - h := R.Bottom - R.Top - 1; - if (w <= 0) or (h <= 0) then - Exit; //==> - - StartCol := GetGUIColor(StartColor); - EndCol := GetGUIColor(EndColor); - - case Direction of - gdTopToBottom: - Count := h; - gdLeftToRight: - Count := w; - gdBottomToTop: - begin - Count := h; - Tmp := EndCol; - EndCol := StartCol; - StartCol := Tmp; - end; - gdRightToLeft: - begin - Count := w; - Tmp := EndCol; - EndCol := StartCol; - StartCol := Tmp; - end; - else - Exit; //==> - end; - if GradLines < 0 then - GradLines := Count; - - AddCol.Red := (EndCol.Red - StartCol.Red) div GradLines; - AddCol.Green := (EndCol.Green - StartCol.Green) div GradLines; - AddCol.Blue := (EndCol.Blue - StartCol.Blue) div GradLines; - -// Canvas.Pen.Style := psSolid; - pCanvas.SaveState; -// Canvas.Start; - try -// StartColor := TColor(Round(StartCol.Red), Round(StartCol.Green), Round(StartCol.Blue)); -// Canvas.Pen.Color := StartColor; - pCanvas.SetColor(GetGUIColor(StartColor)); - for i := 0 to Count - 1 do - begin - if Direction in [gdTopToBottom, gdBottomToTop] then - begin -// pCanvas.MoveTo(R.Left, R.Top + i); -// if Assigned(CalcEndX) then -// X := CalcEndX(i, Count) -// else - X := 0; -// pCanvas.LineTo(R.Right + X, R.Top + i); - pCanvas.DrawLine(Point(R.Left, R.Top + i), Point(R.Right + X, R.Top + i)); - end - else - begin - pCanvas.DrawLine(Point(R.Left + i, R.Top), Point(R.Left + i, R.Bottom)) -// pCanvas.MoveTo(R.Left + i, R.Top); -// pCanvas.LineTo(R.Left + i, R.Bottom); - end; - StartCol.Red := StartCol.Red + AddCol.Red; - StartCol.Green := StartCol.Green + AddCol.Green; - StartCol.Blue := StartCol.Blue + AddCol.Blue; - EndColor := RGB(Round(StartCol.Red), Round(StartCol.Green), Round(StartCol.Blue)); - if StartColor <> EndColor then - begin -// Canvas.Pen.Color := EndColor; - pCanvas.SetColor(GetGUIColor(EndColor)); - StartColor := EndColor; - end; - end; // for - - finally -// Canvas.Stop; - pCanvas.RestoreState; - end; -*) -end; - - -function TOpenSoftStyle.GetGUIColor(Color: TColor): TGfxColor; -begin - Result := inherited GetGUIColor(Color); - case Color of - // UI element colors - clScrollBar: Result := GetUIColor(clLightGrey); //rgbaWindow; - clMenu: Result := GetUIColor(clLightGrey); //rgbaWindow; -// clWindow: Result := GetUIColor(clWhite); -// clMenuText: Result := GetUIColor(clBlack); -// clWindowText: Result := GetUIColor(clBlack); -// clAppWorkSpace: Result := GetUIColor(clGray); -// clHighlight: Result := GetUIColor(clNavy); -// clHighlightText: Result := GetUIColor(clWhite); - cl3DFace: Result := GetUIColor(clLightGrey); //rgbaWindow; -// cl3DShadow: Result := rgbaDkWhite; -// clGrayText: Result := GetUIColor(clGray); -// clBtnText: Result := GetUIColor(clBlack); -// cl3DHighlight: Result := GetUIColor(clWhite); - cl3DDkShadow: Result := GetUIColor(clBlack); -// cl3DLight: Result := GetUIColor(clDarkWhite); -// clInfoText: Result := GetUIColor(clBlack); -// clInfoBk: Result := GetUIColor(clLightYellow); -// -// else Result := GetUIColor(clWhite); - end; - -end; - -procedure TOpenSoftStyle.DrawButtonFace(Canvas: TFCanvas; const ARect: TRect; - Flags: TFButtonFlags); -var - r: TRect; -begin - r := ARect; - - if btnIsSelected in Flags then - begin - SetUIColor(Canvas, cl3DDkShadow); - Canvas.DrawRect(r); - Inc(r.Left); - Inc(r.Top); - Dec(r.Right); - Dec(r.Bottom); - end; - - if btnIsPressed in Flags then - begin - SetUIColor(Canvas, cl3DShadow); - Canvas.DrawRect(r); - Inc(r.Left); - Inc(r.Top); - Dec(r.Right); - Dec(r.Bottom); - end else - begin - if btnIsEmbedded in Flags then - Draw3DFrame(Canvas, r, cl3DLight, cl3DFace, cl3DDkShadow, cl3DShadow) - else - Draw3DFrame(Canvas, r, cl3DHighlight, cl3DFace, cl3DDkShadow, cl3DShadow); - Inc(r.Left, 2); - Inc(r.Top, 2); - Dec(r.Right, 2); - Dec(r.Bottom, 2); - end; - - SetUIColor(Canvas, cl3DFace); - Canvas.FillRect(r); - - if btnHasFocus in Flags then - begin - r.Left := ARect.Left + 4; - r.Top := ARect.Top + 4; - r.Right := ARect.Right - 4; - r.Bottom := ARect.Bottom - 4; - DrawFocusRect(Canvas, r); - end; -end; - -function TOpenSoftStyle.GetButtonBorders: TRect; -begin - Result := Rect(4, 4, 4, 4); -end; - -procedure TOpenSoftStyle.DrawGroupBox(Canvas: TFCanvas; const ARect: TRect; - const ALabel: String; WidgetState: TFWidgetState); -var - TitleWidth, TitleHeight, TopLine: Integer; -begin - TitleWidth := Canvas.TextWidth(ALabel); - TitleHeight := Canvas.FontCellHeight; - TopLine := ARect.Top + TitleHeight div 3; - - Canvas.SetColor(rgbaDkGrey); - // box outline - with ARect do - begin - // top - Canvas.DrawLine(Point(Left + 2, TopLine), Point(Left + 12, TopLine)); - Canvas.DrawLine(Point(Left + TitleWidth + 16, TopLine), Point(Right - 2, TopLine)); - // right - Canvas.DrawLine(Point(Right-1, TopLine + 2), Point(Right-1, Bottom - 2)); - // bottom - Canvas.DrawLine(Point(Right - 3, Bottom-1), Point(Left + 1, Bottom-1)); - // left - Canvas.DrawLine(Point(Left, Bottom - 3), Point(Left, TopLine + 1)); - end; - - // Text caption - SetUIColor(Canvas, clWindowText); - DrawText(Canvas, ARect.TopLeft + Point(14, 0), ALabel, WidgetState); - - { Anti-Aliasing - Top/Left } - Canvas.SetColor(rgbaGbAALtGrey); - Canvas.DrawPoint(ARect.TopLeft + Point(0, TopLine+1)); - Canvas.DrawPoint(ARect.TopLeft + Point(1, TopLine)); - Canvas.SetColor(rgbaGbAADkGrey); - Canvas.DrawPoint(ARect.TopLeft + Point(1, TopLine+1)); - { Anti-Aliasing - Top/Right } - Canvas.SetColor(rgbaGbAALtGrey); - Canvas.DrawPoint(ARect.TopLeft + Point(ARect.Right-1, TopLine+1)); - Canvas.DrawPoint(ARect.TopLeft + Point(ARect.Right-2, TopLine)); - Canvas.SetColor(rgbaGbAADkGrey); - Canvas.DrawPoint(ARect.TopLeft + Point(ARect.Right-2, TopLine+1)); - { Anti-Aliasing - Bottom/Right } - Canvas.SetColor(rgbaGbAALtGrey); - Canvas.DrawPoint(ARect.TopLeft + Point(ARect.Right-1, ARect.Bottom-2)); - Canvas.DrawPoint(ARect.TopLeft + Point(ARect.Right-2, ARect.Bottom-1)); - Canvas.SetColor(rgbaGbAADkGrey); - Canvas.DrawPoint(ARect.TopLeft + Point(ARect.Right-2, ARect.Bottom-2)); - { Anti-Aliasing - Bottom/Left } - Canvas.SetColor(rgbaGbAALtGrey); - Canvas.DrawPoint(ARect.TopLeft + Point(0, ARect.Bottom-2)); - Canvas.DrawPoint(ARect.TopLeft + Point(1, ARect.Bottom-1)); - Canvas.SetColor(rgbaGbAADkGrey); - Canvas.DrawPoint(ARect.TopLeft + Point(1, ARect.Bottom-2)); -end; - - -//initialization -//finalization -// gStyleManager.RegisterClass('OpenSoft', TOpenSoftStyle); - -end. - diff --git a/gui/stylemanager.pas b/gui/stylemanager.pas deleted file mode 100644 index 1c5a82e5..00000000 --- a/gui/stylemanager.pas +++ /dev/null @@ -1,220 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Style Manager as a Singleton - - Copyright (C) 2006 - 2007 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. -} - -unit StyleManager; - -{$mode objfpc}{$H+} - -interface - -uses - Classes - ,Contnrs - ,fpGUI - ; - -const - cDefaultStyle = 'auto'; - -type - - // A class reference for the TStyle descendants - TStyleClass = class of TStyleAbs; - - - // A class to hold the TStyle class mappings. The factory maintains - // a list of these and uses the StyleClass property to create the objects. - TStyleClassMapping = class(TObject) - private - FsMappingName: string; - FStyleClass: TStyleClass; - public - constructor Create(const AMappingName: string; AStyleClass: TStyleClass); overload; - property MappingName: string read FsMappingName; - property StyleClass: TStyleClass read FStyleClass; - end; - - - // Style manager and factory class - - { TStyleManager } - - TStyleManager = class(TObject) - private - FList : TObjectList; - FDefaultStyle: TStyleAbs; - FUserStyle: TStyleAbs; - FDefaultStyleType: string; - function GetDefaultStyle: TStyleAbs; - public - constructor Create; - destructor Destroy; override; - property DefaultStyle: TStyleAbs read GetDefaultStyle; - procedure SetStyle(const AStyleName: string); - procedure RegisterClass(const AStyleName: string; AStyleClass : TStyleClass); - function CreateInstance(const AStyleName: string): TStyleAbs; overload; - function CreateInstance: TStyleAbs; overload; - procedure AssignStyleTypes(AStrings: TStrings); - end; - - -// Singleton -function gStyleManager: TStyleManager; - - -implementation -uses - SysUtils - ,fpGFX - ,WindowsStyle - ,OpenSoftStyle - ,MotifStyle - ; - -var - uStyleManager: TStyleManager; - - -{ Creation is deferred to the first request } -function gStyleManager: TStyleManager; -begin - if uStyleManager = nil then - uStyleManager := TStyleManager.Create; - result := uStyleManager; -end; - - -{ TStyleManager } - -function TStyleManager.GetDefaultStyle: TStyleAbs; -begin - if not Assigned(FDefaultStyle) then -// FDefaultStyle.Free; - FDefaultStyle := CreateInstance(FDefaultStyleType); - Result := FDefaultStyle; -end; - -constructor TStyleManager.Create; -begin - inherited Create; - FList := TObjectList.Create; - FUserStyle := nil; - FDefaultStyle := nil; - FDefaultStyleType := cDefaultStyle; // will change later -end; - -destructor TStyleManager.Destroy; -begin - FDefaultStyle.Free; - FList.Free; - inherited Destroy; -end; - -procedure TStyleManager.SetStyle(const AStyleName: string); -var - i: integer; -begin - for i := 0 to FList.Count - 1 do - if UpperCase(TStyleClassMapping(FList.Items[i]).MappingName) = - UpperCase(AStyleName) then - begin - FDefaultStyleType := AStyleName; - Break; //==> - end; - - Assert(FDefaultStyleType <> AStyleName, - Format('<%s> does not identify a registered style class.', - [AStyleName])); -end; - -// Register a TStyle class for creation by the factory -procedure TStyleManager.RegisterClass(const AStyleName: string; - AStyleClass: TStyleClass); -var - i: integer; -begin - for i := 0 to FList.Count - 1 do - if UpperCase(TStyleClassMapping(FList.Items[i]).MappingName) = - UpperCase(AStyleName) then - Assert(false, - Format('Style class <%s> already registered.', - [AStyleName])); - FList.Add(TStyleClassMapping.Create(AStyleName, AStyleClass)); - -// writeln('Registering style: ' + AStyleName); - // we will use this later -// FDefaultStyleType := UpperCase(AStyleName); -end; - -// Call the factory to create an instance of TStyle -function TStyleManager.CreateInstance(const AStyleName: string): TStyleAbs; -var - i: integer; -begin - result := nil; - for i := 0 to FList.Count - 1 do - if UpperCase(TStyleClassMapping(FList.Items[i]).MappingName) = - UpperCase(AStyleName) then - begin - result := TStyleClassMapping(FList.Items[i]).StyleClass.Create; - Break; //==> - end; - - Assert(result <> nil, - Format('<%s> does not identify a registered style class.', - [AStyleName])); -end; - -function TStyleManager.CreateInstance: TStyleAbs; -begin - result := CreateInstance(FDefaultStyleType); -end; - -// Assing the registered list of TStyle names to a StringList -// This can be used to populate a combobox with the available TStyle -// class types. -procedure TStyleManager.AssignStyleTypes(AStrings: TStrings); -var - i: integer; -begin - AStrings.Clear; - for i := 0 to FList.Count - 1 do - AStrings.Add(TStyleClassMapping(FList.Items[i]).MappingName); -end; - -{ TStyleClassMapping } - -constructor TStyleClassMapping.Create(const AMappingName: string; - AStyleClass: TStyleClass); -begin - inherited Create; - FsMappingName := AMappingName; - FStyleClass := AStyleClass; -end; - - -initialization - gStyleManager.RegisterClass(cDefaultStyle, TWin2000Style); - gStyleManager.RegisterClass('Windows 9x', TWin9xStyle); - gStyleManager.RegisterClass('Windows 2000', TWin2000Style); - gStyleManager.RegisterClass('OpenSoft', TOpenSoftStyle); - gStyleManager.RegisterClass('Motif', TMotifStyle); - -finalization - uStyleManager.Free; - -end. - diff --git a/gui/win32/defstyle.inc b/gui/win32/defstyle.inc deleted file mode 100644 index 41c36f5f..00000000 --- a/gui/win32/defstyle.inc +++ /dev/null @@ -1,47 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Basic Style implementation for Win32 - - Copyright (C) 2006 - 2007 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. -} - -{$DEFINE Has_DefaultStyle_GetGUIColor} - -function TBasicStyle.GetGUIColor(Color: TColor): TGfxColor; -begin - Color := Windows.GetSysColor(Color and $ffff); - Result.Red := (Color and $ff) * 257; - Result.Green := ((Color shr 8) and $ff) * 257; - Result.Blue := ((Color shr 16) and $ff) * 257; - Result.Alpha := 0; -end; - - -{$DEFINE Has_DefaultStyle_DrawFocusRect} - -procedure TBasicStyle.DrawFocusRect(Canvas: TFCanvas; const ARect: TRect); -var - Rect: Windows.TRect; -begin - if Canvas.InheritsFrom(TGDICanvas) then - begin - Rect := RectToWinRect(Canvas.Transform(ARect)); - Windows.DrawFocusRect(TGDICanvas(Canvas).Handle, Rect) - end - else - begin - Canvas.SetColor(GetGUIColor(clGray)); - Canvas.DrawRect(ARect); - end; -end; - - diff --git a/gui/windowsstyle.pas b/gui/windowsstyle.pas deleted file mode 100644 index 08eca3a0..00000000 --- a/gui/windowsstyle.pas +++ /dev/null @@ -1,111 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Windows style implementation - - Copyright (C) 2006 - 2007 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. -} - -unit WindowsStyle; - -{$mode objfpc}{$H+} - -interface - -uses - Classes - ,SysUtils - ,fpGUI - ,fpgfx - ; - - -type - - TWindowsStyle = class(TBasicStyle) - end; - - // Win95 and Win98 look. ie: Buttons are different - TWin9xStyle = class(TWindowsStyle) - end; - - - // Win2000 look. ie: Again the buttons are different (more flat) - TWin2000Style = class(TWindowsStyle) - public - // Buttons - procedure DrawButtonFace(Canvas: TFCanvas; const ARect: TRect; Flags: TFButtonFlags); override; - function GetButtonBorders: TRect; override; - end; - - -implementation - - -{ TWin2000Style } - -procedure TWin2000Style.DrawButtonFace(Canvas: TFCanvas; const ARect: TRect; - Flags: TFButtonFlags); -var - r: TRect; -begin - r := ARect; - - if btnIsSelected in Flags then - begin - SetUIColor(Canvas, cl3DDkShadow); - Canvas.DrawRect(r); - Inc(r.Left); - Inc(r.Top); - Dec(r.Right); - Dec(r.Bottom); - end; - - if btnIsPressed in Flags then - begin - SetUIColor(Canvas, cl3DShadow); - Canvas.DrawRect(r); - Inc(r.Left); - Inc(r.Top); - Dec(r.Right); - Dec(r.Bottom); - end else - begin - if btnIsEmbedded in Flags then - Draw3DFrame(Canvas, r, cl3DLight, cl3DFace, cl3DDkShadow, cl3DShadow) - else - Draw3DFrame(Canvas, r, cl3DHighlight, cl3DFace, cl3DDkShadow, cl3DShadow); - Inc(r.Left, 2); - Inc(r.Top, 2); - Dec(r.Right, 2); - Dec(r.Bottom, 2); - end; - - SetUIColor(Canvas, cl3DFace); - Canvas.FillRect(r); - - if btnHasFocus in Flags then - begin - r.Left := ARect.Left + 4; - r.Top := ARect.Top + 4; - r.Right := ARect.Right - 4; - r.Bottom := ARect.Bottom - 4; - DrawFocusRect(Canvas, r); - end; -end; - -function TWin2000Style.GetButtonBorders: TRect; -begin - Result := Rect(4, 4, 4, 4); -end; - -end. - diff --git a/img/Makefile b/img/Makefile deleted file mode 100644 index bd5ea0f9..00000000 --- a/img/Makefile +++ /dev/null @@ -1,1284 +0,0 @@ -# -# Makefile generated by fpcmake v1.00 [2000/12/19] -# - -defaultrule: all - -##################################################################### -# Autodetect OS (Linux or Dos or Windows NT or OS/2) -# define inUnix when running under Unix (Linux,FreeBSD) -# define inWinNT when running under WinNT -# define inOS2 when running under OS/2 -##################################################################### - -# We need only / in the path -override PATH:=$(subst \,/,$(PATH)) - -# Search for PWD and determine also if we are under linux -PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH))))) -ifeq ($(PWD),) -PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH))))) -ifeq ($(PWD),) -nopwd: - @echo You need the GNU utils package to use this Makefile! - @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip - @exit -else -inUnix=1 -PWD:=$(firstword $(PWD)) -endif -else -PWD:=$(firstword $(PWD)) -endif - -# Detect NT - NT sets OS to Windows_NT -# Detect OS/2 - OS/2 has OS2_SHELL defined -ifndef inUnix -ifeq ($(OS),Windows_NT) -inWinNT=1 -else -ifdef OS2_SHELL -inOS2=1 -endif -endif -endif - -# The extension of executables -ifdef inUnix -SRCEXEEXT= -else -SRCEXEEXT=.exe -endif - -# The path which is searched separated by spaces -ifdef inUnix -SEARCHPATH=$(subst :, ,$(PATH)) -else -SEARCHPATH=$(subst ;, ,$(PATH)) -endif - -# Base dir -ifdef PWD -BASEDIR:=$(shell $(PWD)) -else -BASEDIR=. -endif - -##################################################################### -# FPC version/target Detection -##################################################################### - -# What compiler to use ? -ifndef FPC -# Compatibility with old makefiles -ifdef PP -FPC=$(PP) -else -FPC=ppc386 -endif -endif -override FPC:=$(subst $(SRCEXEEXT),,$(FPC)) -override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT) - -# Target OS -ifndef OS_TARGET -OS_TARGET:=$(shell $(FPC) -iTO) -endif - -# Source OS -ifndef OS_SOURCE -OS_SOURCE:=$(shell $(FPC) -iSO) -endif - -# Target CPU -ifndef CPU_TARGET -CPU_TARGET:=$(shell $(FPC) -iTP) -endif - -# Source CPU -ifndef CPU_SOURCE -CPU_SOURCE:=$(shell $(FPC) -iSP) -endif - -# FPC version -ifndef FPC_VERSION -FPC_VERSION:=$(shell $(FPC) -iV) -endif - -export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION - -##################################################################### -# FPCDIR Setting -##################################################################### - -# Test FPCDIR to look if the RTL dir exists -ifdef FPCDIR -override FPCDIR:=$(subst \,/,$(FPCDIR)) -ifeq ($(wildcard $(FPCDIR)/rtl),) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=wrong -endif -endif -else -override FPCDIR=wrong -endif - -# Default FPCDIR -ifeq ($(FPCDIR),wrong) -override FPCDIR=../../../fpc -ifeq ($(wildcard $(FPCDIR)/rtl),) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=wrong -endif -endif -endif - -# Detect FPCDIR -ifeq ($(FPCDIR),wrong) -ifdef inUnix -override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=/usr/lib/fpc/$(FPC_VERSION) -endif -else -override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH)))))) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(FPCDIR)/rtl),) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR:=$(FPCDIR)/.. -ifeq ($(wildcard $(FPCDIR)/rtl),) -ifeq ($(wildcard $(FPCDIR)/units),) -override FPCDIR=c:/pp -endif -endif -endif -endif -endif -endif - -ifndef PACKAGESDIR -PACKAGESDIR=$(FPCDIR)/packages -endif -ifndef TOOLKITSDIR -TOOLKITSDIR= -endif -ifndef COMPONENTSDIR -COMPONENTSDIR= -endif - -# Create units dir -ifneq ($(FPCDIR),.) -UNITSDIR=$(FPCDIR)/units/$(OS_TARGET) -endif - -##################################################################### -# User Settings -##################################################################### - - -# Targets - -override UNITOBJECTS+=imageio fpimg bmpreader -override RSTOBJECTS+=imageio - -# Clean - - -# Install - -ZIPTARGET=install - -# Defaults - -override NEEDOPT=-S2h - -# Directories - -override NEEDUNITDIR=../../fpgfx/src - -# Packages - -override PACKAGES+=rtl fpgfx - -# Libraries - -LIBNAME=fpimg - -# Info - -INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall - -##################################################################### -# Shell tools -##################################################################### - -# echo -ifndef ECHO -ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ECHO),) -ECHO:=echo -ECHOE:=echo -else -ECHO:=$(firstword $(ECHO)) -ECHOE=$(ECHO) -E -endif -else -ECHO:=$(firstword $(ECHO)) -ECHOE=$(ECHO) -E -endif -endif - -# To copy pograms -ifndef COPY -COPY:=cp -fp -endif - -# Copy a whole tree -ifndef COPYTREE -COPYTREE:=cp -rfp -endif - -# To move pograms -ifndef MOVE -MOVE:=mv -f -endif - -# Check delete program -ifndef DEL -DEL:=rm -f -endif - -# Check deltree program -ifndef DELTREE -DELTREE:=rm -rf -endif - -# To install files -ifndef INSTALL -ifdef inUnix -INSTALL:=install -c -m 644 -else -INSTALL:=$(COPY) -endif -endif - -# To install programs -ifndef INSTALLEXE -ifdef inUnix -INSTALLEXE:=install -c -m 755 -else -INSTALLEXE:=$(COPY) -endif -endif - -# To make a directory. -ifndef MKDIR -ifdef inUnix -MKDIR:=install -m 755 -d -else -MKDIR:=ginstall -m 755 -d -endif -endif - -export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR - -##################################################################### -# Default Tools -##################################################################### - -# assembler, redefine it if cross compiling -ifndef AS -AS=as -endif - -# linker, but probably not used -ifndef LD -LD=ld -endif - -# ppas.bat / ppas.sh -ifdef inUnix -PPAS=ppas.sh -else -ifdef inOS2 -PPAS=ppas.cmd -else -PPAS=ppas.bat -endif -endif - -# ldconfig to rebuild .so cache -ifdef inUnix -LDCONFIG=ldconfig -else -LDCONFIG= -endif - -# ppumove -ifndef PPUMOVE -PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(PPUMOVE),) -PPUMOVE= -else -PPUMOVE:=$(firstword $(PPUMOVE)) -endif -endif -export PPUMOVE - -# ppufiles -ifndef PPUFILES -PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(PPUFILES),) -PPUFILES= -else -PPUFILES:=$(firstword $(PPUFILES)) -endif -endif -export PPUFILES - -# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase -# upx uses that one itself (PFV) -ifndef UPXPROG -ifeq ($(OS_TARGET),go32v2) -UPXPROG:=1 -endif -ifeq ($(OS_TARGET),win32) -UPXPROG:=1 -endif -ifdef UPXPROG -UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(UPXPROG),) -UPXPROG= -else -UPXPROG:=$(firstword $(UPXPROG)) -endif -else -UPXPROG= -endif -endif -export UPXPROG - -# ZipProg, you can't use Zip as the var name (PFV) -ifndef ZIPPROG -ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(ZIPPROG),) -ZIPPROG= -else -ZIPPROG:=$(firstword $(ZIPPROG)) -endif -endif -export ZIPPROG - -ZIPOPT=-9 -ZIPEXT=.zip - -# Tar -ifndef TARPROG -TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH)))) -ifeq ($(TARPROG),) -TARPROG= -else -TARPROG:=$(firstword $(TARPROG)) -endif -endif -export TARPROG - -ifeq ($(USETAR),bz2) -TAROPT=vI -TAREXT=.tar.bz2 -else -TAROPT=vz -TAREXT=.tar.gz -endif - -##################################################################### -# Default extensions -##################################################################### - -# Default needed extensions (Go32v2,Linux) -LOADEREXT=.as -EXEEXT=.exe -PPLEXT=.ppl -PPUEXT=.ppu -OEXT=.o -ASMEXT=.s -SMARTEXT=.sl -STATICLIBEXT=.a -SHAREDLIBEXT=.so -RSTEXT=.rst -FPCMADE=fpcmade - -# Go32v1 -ifeq ($(OS_TARGET),go32v1) -PPUEXT=.pp1 -OEXT=.o1 -ASMEXT=.s1 -SMARTEXT=.sl1 -STATICLIBEXT=.a1 -SHAREDLIBEXT=.so1 -FPCMADE=fpcmade.v1 -endif - -# Go32v2 -ifeq ($(OS_TARGET),go32v2) -FPCMADE=fpcmade.dos -endif - -# Linux -ifeq ($(OS_TARGET),linux) -EXEEXT= -HASSHAREDLIB=1 -FPCMADE=fpcmade.lnx -endif - -# Linux -ifeq ($(OS_TARGET),freebsd) -EXEEXT= -HASSHAREDLIB=1 -FPCMADE=fpcmade.freebsd -endif - -# Win32 -ifeq ($(OS_TARGET),win32) -PPUEXT=.ppw -OEXT=.ow -ASMEXT=.sw -SMARTEXT=.slw -STATICLIBEXT=.aw -SHAREDLIBEXT=.dll -FPCMADE=fpcmade.w32 -endif - -# OS/2 -ifeq ($(OS_TARGET),os2) -PPUEXT=.ppo -ASMEXT=.so2 -OEXT=.oo2 -SMARTEXT=.so -STATICLIBEXT=.ao2 -SHAREDLIBEXT=.dll -FPCMADE=fpcmade.os2 -endif - -# library prefix -LIBPREFIX=lib -ifeq ($(OS_TARGET),go32v2) -LIBPREFIX= -endif -ifeq ($(OS_TARGET),go32v1) -LIBPREFIX= -endif - -# determine which .pas extension is used -ifndef PASEXT -ifdef EXEOBJECTS -override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS))))) -else -override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS))))) -endif -ifeq ($(TESTPAS),) -PASEXT=.pp -else -PASEXT=.pas -endif -endif - - -# Check if the dirs really exists, else turn it off -ifeq ($(wildcard $(UNITSDIR)),) -UNITSDIR= -endif -ifeq ($(wildcard $(TOOLKITSDIR)),) -TOOLKITSDIR= -endif -ifeq ($(wildcard $(PACKAGESDIR)),) -PACKAGESDIR= -endif -ifeq ($(wildcard $(COMPONENTSDIR)),) -COMPONENTSDIR= -endif - - -# PACKAGESDIR packages - -PACKAGERTL=1 -PACKAGEFPGFX=1 - -ifdef PACKAGERTL -ifneq ($(wildcard $(FPCDIR)/rtl),) -ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),) -PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET) -else -PACKAGEDIR_RTL=$(FPCDIR)/rtl -endif -ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),) -override COMPILEPACKAGES+=package_rtl -package_rtl: - $(MAKE) -C $(PACKAGEDIR_RTL) all -endif -UNITDIR_RTL=$(PACKAGEDIR_RTL) -else -PACKAGEDIR_RTL= -ifneq ($(wildcard $(UNITSDIR)/rtl),) -ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),) -UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET) -else -UNITDIR_RTL=$(UNITSDIR)/rtl -endif -else -UNITDIR_RTL= -endif -endif -ifdef UNITDIR_RTL -override NEEDUNITDIR+=$(UNITDIR_RTL) -endif -endif -ifdef PACKAGEFPGFX -ifneq ($(wildcard $(PACKAGESDIR)/fpgfx),) -ifneq ($(wildcard $(PACKAGESDIR)/fpgfx/$(OS_TARGET)),) -PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx/$(OS_TARGET) -else -PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx -endif -ifeq ($(wildcard $(PACKAGEDIR_FPGFX)/$(FPCMADE)),) -override COMPILEPACKAGES+=package_fpgfx -package_fpgfx: - $(MAKE) -C $(PACKAGEDIR_FPGFX) all -endif -UNITDIR_FPGFX=$(PACKAGEDIR_FPGFX) -else -PACKAGEDIR_FPGFX= -ifneq ($(wildcard $(UNITSDIR)/fpgfx),) -ifneq ($(wildcard $(UNITSDIR)/fpgfx/$(OS_TARGET)),) -UNITDIR_FPGFX=$(UNITSDIR)/fpgfx/$(OS_TARGET) -else -UNITDIR_FPGFX=$(UNITSDIR)/fpgfx -endif -else -UNITDIR_FPGFX= -endif -endif -ifdef UNITDIR_FPGFX -override NEEDUNITDIR+=$(UNITDIR_FPGFX) -endif -endif - - -##################################################################### -# Default Directories -##################################################################### - -# Linux and freebsd use unix dirs with /usr/bin, /usr/lib -# When zipping use the target as default, when normal install then -# use the source os as default -ifdef ZIPNAME -# Zipinstall -ifeq ($(OS_TARGET),linux) -UNIXINSTALLDIR=1 -endif -ifeq ($(OS_TARGET),freebsd) -UNIXINSTALLDIR=1 -endif -else -# Normal install -ifeq ($(OS_SOURCE),linux) -UNIXINSTALLDIR=1 -endif -ifeq ($(OS_SOURCE),freebsd) -UNIXINSTALLDIR=1 -endif -endif - -# set the prefix directory where to install everything -ifndef PREFIXINSTALLDIR -ifdef UNIXINSTALLDIR -PREFIXINSTALLDIR=/usr -else -PREFIXINSTALLDIR=/pp -endif -endif -export PREFIXINSTALLDIR - -# Where to place the resulting zip files -ifndef DESTZIPDIR -DESTZIPDIR:=$(BASEDIR) -endif -export DESTZIPDIR - -##################################################################### -# Install Directories -##################################################################### - -# set the base directory where to install everything -ifndef BASEINSTALLDIR -ifdef UNIXINSTALLDIR -BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION) -else -BASEINSTALLDIR=$(PREFIXINSTALLDIR) -endif -endif - -# set the directory where to install the binaries -ifndef BININSTALLDIR -ifdef UNIXINSTALLDIR -BININSTALLDIR=$(PREFIXINSTALLDIR)/bin -else -BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET) -endif -endif - -# set the directory where to install the units. -ifndef UNITINSTALLDIR -UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET) -ifdef UNITSUBDIR -UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR) -endif -endif - -# Where to install shared libraries -ifndef LIBINSTALLDIR -ifdef UNIXINSTALLDIR -LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib -else -LIBINSTALLDIR=$(UNITINSTALLDIR) -endif -endif - -# Where the source files will be stored -ifndef SOURCEINSTALLDIR -ifdef UNIXINSTALLDIR -SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION) -else -SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source -endif -ifdef SOURCESUBDIR -SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR) -endif -endif - -# Where the doc files will be stored -ifndef DOCINSTALLDIR -ifdef UNIXINSTALLDIR -DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION) -else -DOCINSTALLDIR=$(BASEINSTALLDIR)/doc -endif -endif - -# Where to install the examples, under linux we use the doc dir -# because the copytree command will create a subdir itself -ifndef EXAMPLEINSTALLDIR -ifdef UNIXINSTALLDIR -EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples -else -EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples -endif -ifdef EXAMPLESUBDIR -EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR) -endif -endif - -# Where the some extra (data)files will be stored -ifndef DATAINSTALLDIR -DATAINSTALLDIR=$(BASEINSTALLDIR) -endif - -##################################################################### -# Redirection -##################################################################### - -ifndef REDIRFILE -REDIRFILE=log -endif - -ifdef REDIR -ifndef inUnix -override FPC=redir -eo $(FPC) -endif -# set the verbosity to max -override FPCOPT+=-va -override REDIR:= >> $(REDIRFILE) -endif - - -##################################################################### -# Compiler Command Line -##################################################################### - -# Load commandline OPTDEF and add FPC_CPU define -override FPCOPTDEF:=-d$(CPU_TARGET) - -# Load commandline OPT and add target and unit dir to be sure -ifneq ($(OS_TARGET),$(OS_SOURCE)) -override FPCOPT+=-T$(OS_TARGET) -endif - -# User dirs should be first, so they are looked at first -ifdef UNITDIR -override FPCOPT+=$(addprefix -Fu,$(UNITDIR)) -endif -ifdef LIBDIR -override FPCOPT+=$(addprefix -Fl,$(LIBDIR)) -endif -ifdef OBJDIR -override FPCOPT+=$(addprefix -Fo,$(OBJDIR)) -endif -ifdef INCDIR -override FPCOPT+=$(addprefix -Fi,$(INCDIR)) -endif - -# Smartlinking -ifdef LINKSMART -override FPCOPT+=-XX -endif - -# Smartlinking creation -ifdef CREATESMART -override FPCOPT+=-CX -endif - -# Debug -ifdef DEBUG -override FPCOPT+=-gl -dDEBUG -endif - -# Release mode (strip, optimize and don't load ppc386.cfg) -# 0.99.12b has a bug in the optimizer so don't use it by default -ifdef RELEASE -ifeq ($(FPC_VERSION),0.99.12) -override FPCOPT+=-Xs -OGp3 -n -else -override FPCOPT+=-Xs -OG2p3 -n -endif -endif - -# Strip -ifdef STRIP -override FPCOPT+=-Xs -endif - -# Optimizer -ifdef OPTIMIZE -override FPCOPT+=-OG2p3 -endif - -# Verbose settings (warning,note,info) -ifdef VERBOSE -override FPCOPT+=-vwni -endif - -ifdef NEEDOPT -override FPCOPT+=$(NEEDOPT) -endif - -ifdef NEEDUNITDIR -override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR)) -endif - -ifdef UNITSDIR -override FPCOPT+=-Fu$(UNITSDIR) -endif - -# Target dirs and the prefix to use for clean/install -ifdef TARGETDIR -override FPCOPT+=-FE$(TARGETDIR) -ifeq ($(TARGETDIR),.) -override TARGETDIRPREFIX= -else -override TARGETDIRPREFIX=$(TARGETDIR)/ -endif -endif -ifdef UNITTARGETDIR -override FPCOPT+=-FU$(UNITTARGETDIR) -ifeq ($(UNITTARGETDIR),.) -override UNITTARGETDIRPREFIX= -else -override UNITTARGETDIRPREFIX=$(TARGETDIR)/ -endif -else -ifdef TARGETDIR -override UNITTARGETDIR=$(TARGETDIR) -override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX) -endif -endif - -# Add commandline options last so they can override -ifdef OPT -override FPCOPT+=$(OPT) -endif - -# Add defines from FPCOPTDEF to FPCOPT -ifdef FPCOPTDEF -override FPCOPT+=$(FPCOPTDEF) -endif - -# Error file ? -ifdef ERRORFILE -override FPCOPT+=-Fr$(ERRORFILE) -endif - -# Was a config file specified ? -ifdef CFGFILE -override FPCOPT+=@$(CFGFILE) -endif - -# For win32 the options are passed using the environment FPCEXTCMD -ifeq ($(OS_SOURCE),win32) -override FPCEXTCMD:=$(FPCOPT) -override FPCOPT:=!FPCEXTCMD -export FPCEXTCMD -endif - -# Compiler commandline -override COMPILER:=$(FPC) $(FPCOPT) - -# also call ppas if with command option -s -# but only if the OS_SOURCE and OS_TARGE are equal -ifeq (,$(findstring -s ,$(COMPILER))) -EXECPPAS= -else -ifeq ($(OS_SOURCE),$(OS_TARGET)) -EXECPPAS:=@$(PPAS) -endif -endif - -##################################################################### -# Standard rules -##################################################################### - -all: fpc_all - -debug: fpc_debug - -smart: fpc_smart - -shared: fpc_shared - -showinstall: fpc_showinstall - -install: fpc_install - -sourceinstall: fpc_sourceinstall - -exampleinstall: fpc_exampleinstall - -zipinstall: fpc_zipinstall - -zipsourceinstall: fpc_zipsourceinstall - -zipexampleinstall: fpc_zipexampleinstall - -clean: fpc_clean - -distclean: fpc_distclean - -cleanall: fpc_cleanall - -info: fpc_info - -.PHONY: all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info - -##################################################################### -# Units -##################################################################### - -.PHONY: fpc_units - -override ALLTARGET+=fpc_units - -override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS)) -override INSTALLPPUFILES+=$(UNITPPUFILES) -override CLEANPPUFILES+=$(UNITPPUFILES) - -fpc_units: $(UNITPPUFILES) - -##################################################################### -# Resource strings -##################################################################### - -ifdef RSTOBJECTS -override RSTFILES=$(addsuffix $(RSTEXT),$(RSTOBJECTS)) - -override CLEANRSTFILES+=$(RSTFILES) -endif - -##################################################################### -# General compile rules -##################################################################### - -.PHONY: fpc_packages fpc_all fpc_debug - -$(FPCMADE): $(ALLTARGET) - @$(ECHO) Compiled > $(FPCMADE) - -fpc_packages: $(COMPILEPACKAGES) - -fpc_all: fpc_packages $(FPCMADE) - -fpc_debug: - $(MAKE) all DEBUG=1 - -# Search paths for .ppu if targetdir is set -ifdef UNITTARGETDIR -vpath %$(PPUEXT) $(UNITTARGETDIR) -endif - -# General compile rules, available for both possible PASEXT - -.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp - -%$(PPUEXT): %.pp - $(COMPILER) $< $(REDIR) - $(EXECPPAS) - -%$(PPUEXT): %.pas - $(COMPILER) $< $(REDIR) - $(EXECPPAS) - -%$(EXEEXT): %.pp - $(COMPILER) $< $(REDIR) - $(EXECPPAS) - -%$(EXEEXT): %.pas - $(COMPILER) $< $(REDIR) - $(EXECPPAS) - -##################################################################### -# Library -##################################################################### - -.PHONY: fpc_smart fpc_shared - -ifdef LIBVERSION -LIBFULLNAME=$(LIBNAME).$(LIBVERSION) -else -LIBFULLNAME=$(LIBNAME) -endif - -# Default sharedlib units are all unit objects -ifndef SHAREDLIBUNITOBJECTS -SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS) -endif - -fpc_smart: - $(MAKE) all LINKSMART=1 CREATESMART=1 - -fpc_shared: all -ifdef HASSHAREDLIB -ifndef LIBNAME - @$(ECHO) "LIBNAME not set" -else - $(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME) -endif -else - @$(ECHO) "Shared Libraries not supported" -endif - -##################################################################### -# Install rules -##################################################################### - -.PHONY: fpc_showinstall fpc_install - -ifdef EXTRAINSTALLUNITS -override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS)) -endif - -ifdef INSTALLPPUFILES -override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES)) -ifdef PPUFILES -INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)) -else -INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))) -endif -override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES)) -endif - -ifdef INSTALLEXEFILES -override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES)) -endif - -fpc_showinstall: $(SHOWINSTALLTARGET) -ifdef INSTALLEXEFILES - @$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES)) -endif -ifdef INSTALLPPUFILES - @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES)) -ifneq ($(INSTALLPPULINKFILES),) - @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES)) -endif -ifneq ($(wildcard $(LIBFULLNAME)),) - @$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME) -ifdef HASSHAREDLIB - @$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME) -endif -endif -endif -ifdef EXTRAINSTALLFILES - @$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES)) -endif - -fpc_install: $(INSTALLTARGET) -# Create UnitInstallFiles -ifdef INSTALLEXEFILES - $(MKDIR) $(BININSTALLDIR) -# Compress the exes if upx is defined -ifdef UPXPROG - -$(UPXPROG) $(INSTALLEXEFILES) -endif - $(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR) -endif -ifdef INSTALLPPUFILES - $(MKDIR) $(UNITINSTALLDIR) - $(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR) -ifneq ($(INSTALLPPULINKFILES),) - $(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR) -endif -ifneq ($(wildcard $(LIBFULLNAME)),) - $(MKDIR) $(LIBINSTALLDIR) - $(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR) -ifdef inUnix - ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME) -endif -endif -endif -ifdef EXTRAINSTALLFILES - $(MKDIR) $(DATAINSTALLDIR) - $(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR) -endif - -##################################################################### -# SourceInstall rules -##################################################################### - -.PHONY: fpc_sourceinstall - -ifndef SOURCETOPDIR -SOURCETOPDIR=$(BASEDIR) -endif - -fpc_sourceinstall: clean - $(MKDIR) $(SOURCEINSTALLDIR) - $(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR) - -##################################################################### -# exampleinstall rules -##################################################################### - -.PHONY: fpc_exampleinstall - -fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS)) -ifdef EXAMPLESOURCEFILES - $(MKDIR) $(EXAMPLEINSTALLDIR) - $(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR) -endif -ifdef EXAMPLEDIROBJECTS -ifndef EXAMPLESOURCEFILES - $(MKDIR) $(EXAMPLEINSTALLDIR) -endif - $(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR) -endif - -##################################################################### -# Zip -##################################################################### - -.PHONY: fpc_zipinstall - -# Create suffix to add -ifndef PACKAGESUFFIX -PACKAGESUFFIX=$(OS_TARGET) -ifeq ($(OS_TARGET),go32v2) -PACKAGESUFFIX=go32 -endif -ifeq ($(OS_TARGET),win32) -PACKAGESUFFIX=w32 -endif -ifeq ($(OS_TARGET),os2) -PACKAGESUFFIX=emx -endif -endif - -# Temporary path to pack a file -ifndef PACKDIR -ifndef inUnix -PACKDIR=$(BASEDIR)/pack_tmp -else -PACKDIR=/tmp/fpc-pack -endif -endif - -# Maybe create default zipname from packagename -ifndef ZIPNAME -ifdef PACKAGENAME -ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX) -endif -endif - -# Use tar by default under linux -ifndef USEZIP -ifdef inUnix -USETAR=1 -endif -endif - -fpc_zipinstall: -ifndef ZIPNAME - @$(ECHO) "Please specify ZIPNAME!" - @exit 1 -else - $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR) -ifdef USETAR - $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) - cd $(PACKDIR) ; $(TARPROG) cf$(TAROPT) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR) -else - $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) - cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR) -endif - $(DELTREE) $(PACKDIR) -endif - -.PHONY: fpc_zipsourceinstall - -fpc_zipsourceinstall: - $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src - -.PHONY: fpc_zipexampleinstall - -fpc_zipexampleinstall: - $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm - -##################################################################### -# Clean rules -##################################################################### - -.PHONY: fpc_clean fpc_cleanall fpc_distclean - -ifdef EXEFILES -override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES)) -endif - -ifdef EXTRACLEANUNITS -override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS)) -endif - -ifdef CLEANPPUFILES -override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES)) -# Get the .o and .a files created for the units -ifdef PPUFILES -CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES)) -else -CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))) -endif -override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)) -endif - -fpc_clean: $(CLEANTARGET) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif -ifdef CLEANPPUFILES - -$(DEL) $(CLEANPPUFILES) -endif -ifneq ($(CLEANPPULINKFILES),) - -$(DEL) $(CLEANPPULINKFILES) -endif -ifdef CLEANRSTFILES - -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES)) -endif -ifdef EXTRACLEANFILES - -$(DEL) $(EXTRACLEANFILES) -endif -ifdef LIBNAME - -$(DEL) $(LIBNAME) $(LIBFULLNAME) -endif - -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE) - -fpc_distclean: fpc_clean - -# Also run clean first if targetdir is set. Unittargetdir is always -# set if targetdir or unittargetdir is specified -ifdef UNITTARGETDIR -TARGETDIRCLEAN=fpc_clean -endif - -fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN) -ifdef CLEANEXEFILES - -$(DEL) $(CLEANEXEFILES) -endif - -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT) - -$(DELTREE) *$(SMARTEXT) - -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE) - -##################################################################### -# Info rules -##################################################################### - -.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \ - fpc_dirinfo - -fpc_info: $(INFOTARGET) - -fpc_infocfg: - @$(ECHO) - @$(ECHO) == Configuration info == - @$(ECHO) - @$(ECHO) FPC....... $(FPC) - @$(ECHO) Version... $(FPC_VERSION) - @$(ECHO) CPU....... $(CPU_TARGET) - @$(ECHO) Source.... $(OS_SOURCE) - @$(ECHO) Target.... $(OS_TARGET) - @$(ECHO) - -fpc_infoobjects: - @$(ECHO) - @$(ECHO) == Object info == - @$(ECHO) - @$(ECHO) LoaderObjects..... $(LOADEROBJECTS) - @$(ECHO) UnitObjects....... $(UNITOBJECTS) - @$(ECHO) ExeObjects........ $(EXEOBJECTS) - @$(ECHO) - @$(ECHO) ExtraCleanUnits... $(EXTRACLEANUNITS) - @$(ECHO) ExtraCleanFiles... $(EXTRACLEANFILES) - @$(ECHO) - @$(ECHO) ExtraInstallUnits. $(EXTRAINSTALLUNITS) - @$(ECHO) ExtraInstallFiles. $(EXTRAINSTALLFILES) - @$(ECHO) - -fpc_infoinstall: - @$(ECHO) - @$(ECHO) == Install info == - @$(ECHO) -ifdef DATE - @$(ECHO) DateStr.............. $(DATESTR) -endif -ifdef PACKAGEPREFIX - @$(ECHO) PackagePrefix........ $(PACKAGEPREFIX) -endif -ifdef PACKAGENAME - @$(ECHO) PackageName.......... $(PACKAGENAME) -endif - @$(ECHO) PackageSuffix........ $(PACKAGESUFFIX) - @$(ECHO) - @$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR) - @$(ECHO) BinInstallDir........ $(BININSTALLDIR) - @$(ECHO) LibInstallDir........ $(LIBINSTALLDIR) - @$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR) - @$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR) - @$(ECHO) DocInstallDir........ $(DOCINSTALLDIR) - @$(ECHO) DataInstallDir....... $(DATAINSTALLDIR) - @$(ECHO) - @$(ECHO) DestZipDir........... $(DESTZIPDIR) - @$(ECHO) ZipName.............. $(ZIPNAME) - @$(ECHO) - -##################################################################### -# Local Makefile -##################################################################### - -ifneq ($(wildcard fpcmake.loc),) -include fpcmake.loc -endif - diff --git a/img/Makefile.fpc b/img/Makefile.fpc deleted file mode 100644 index dc06233a..00000000 --- a/img/Makefile.fpc +++ /dev/null @@ -1,18 +0,0 @@ -# -# Makefile.fpc for fpImg -# - -[targets] -units=imageio fpimg bmpreader -rst=imageio - -[require] -options=-S2h -packages=fpgfx - -[libs] -libname=fpimg - -[dirs] -fpcdir=../../../fpc -unitdir=../../fpgfx/src diff --git a/img/bmpreader.pas b/img/bmpreader.pas deleted file mode 100644 index 35d4763c..00000000 --- a/img/bmpreader.pas +++ /dev/null @@ -1,317 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Image reader for BMP files - - Copyright (C) 2000 - 2006 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. -} - - -unit BMPReader; - -{$IFDEF Debug} -{$ASSERTIONS On} -{$ENDIF} - -interface - -uses - Classes - ,GFXBase - ,ImageIO - ; - -type - DWORD = LongWord; - LONG = LongInt; - - - TBitmapFileHeader = packed record - bfType: WORD; - bfSize: DWORD; - bfReserved1: WORD; - bfReserved2: WORD; - bfOffBits: DWORD; - end; - - - TBitmapInfoHeader = packed record - biSize: DWORD; - biWidth: LONG; - biHeight: LONG; - biPlanes: WORD; - biBitCount: WORD; - biCompression: DWORD; - biSizeImage: DWORD; - biXPelsPerMeter: LONG; - biYPelsPerMeter: LONG; - biClrUsed: DWORD; - biClrImportant: DWORD; - end; - - - PRGBQuad = ^TRGBQuad; - TRGBQuad = packed record - rgbBlue, rgbGreen, rgbRed, rgbReserved: BYTE; - end; - - - TBMPReader = class(TImageReader) - protected - FFileHeader: TBitmapFileHeader; - FInfoHeader: TBitmapInfoHeader; - FBMPPalette: PRGBQuad; - FFileStride: LongWord; - HeaderBytesRead, PalBytesRead: Integer; - ScanlinesLeft: Integer; - ThisSegmentHeight: Integer; - ScanlinesLeftInSegment: Integer; - ScanlineBytesDone: LongWord; - CurScanline: Pointer; - procedure DoProcessHeaderData(AStream: TStream); override; - function DoGetImageSegmentStartY(ASegmentHeight: Integer): Integer; override; - procedure InitImageReading; override; - procedure InitSegmentReading; - procedure DoProcessImageData(AStream: TStream); override; - public - destructor Destroy; override; - property FileHeader: TBitmapFileHeader read FFileHeader; - property InfoHeader: TBitmapInfoHeader read FInfoHeader; - property BMPPalette: PRGBQuad read FBMPPalette; - property FileStride: LongWord read FFileStride; - end; - - -implementation - - -destructor TBMPReader.Destroy; -begin - if Assigned(Palette) then - FreeMem(FPalette); - if Assigned(BMPPalette) then - FreeMem(FBMPPalette); - inherited Destroy; -end; - -procedure TBMPReader.DoProcessHeaderData(AStream: TStream); -var - DataOffset: LongWord; - HaveRead, BytesToSkip, i: Integer; - IsFirstRead: Boolean; - SkipBuffer: array[0..1023] of Byte; -begin - if HeaderBytesRead < SizeOf(FileHeader) then - begin - HaveRead := AStream.Read(PChar(@FileHeader)[HeaderBytesRead], - SizeOf(FileHeader) - HeaderBytesRead); - if HaveRead = 0 then - raise EImgOutOfData.Create; - Inc(HeaderBytesRead, HaveRead); - IsFirstRead := False; - end - else - IsFirstRead := True; - - if HeaderBytesRead < SizeOf(FileHeader) + SizeOf(InfoHeader) then - begin - HaveRead := AStream.Read( - PChar(@InfoHeader)[HeaderBytesRead - SizeOf(FileHeader)], - SizeOf(FileHeader) + SizeOf(InfoHeader) - HeaderBytesRead); - if HaveRead = 0 then - if IsFirstRead then - raise EImgOutOfData.Create - else - exit; - IsFirstRead := False; - Inc(HeaderBytesRead, HaveRead); - end; - - if HeaderBytesRead = SizeOf(FileHeader) + SizeOf(InfoHeader) then - begin - case InfoHeader.biBitCount of - 1: FPaletteSize := 2; - 4: FPaletteSize := 16; - 8: FPaletteSize := 256; - end; - if PaletteSize > 0 then - begin - GetMem(FBMPPalette, PaletteSize * SizeOf(TRGBQuad)); - GetMem(FPalette, PaletteSize * SizeOf(TGfxColor)); - end; - end; - - if HeaderBytesRead >= SizeOf(FileHeader) + SizeOf(InfoHeader) then - begin - DataOffset := FileHeader.bfOffBits; - if HeaderBytesRead < DataOffset then - begin - BytesToSkip := DataOffset - HeaderBytesRead; - if BytesToSkip > SizeOf(SkipBuffer) then - BytesToSkip := SizeOf(SkipBuffer); - HaveRead := AStream.Read(SkipBuffer, BytesToSkip); - if HaveRead = 0 then - if IsFirstRead then - raise EImgOutOfData.Create - else - exit; //==> - IsFirstRead := False; - Inc(HeaderBytesRead, HaveRead); - if PalBytesRead < PaletteSize * SizeOf(TGfxPixel) then - begin - Move(SkipBuffer, PByte(FBMPPalette)[PalBytesRead], HaveRead); - Inc(PalBytesRead, HaveRead); - end; - end; { if } - - if HeaderBytesRead = DataOffset then - begin - FWidth := InfoHeader.biWidth; - FHeight := InfoHeader.biHeight; - - if PaletteSize > 0 then - for i := 0 to PaletteSize - 1 do - begin - Palette[i].Red := BMPPalette[i].rgbRed * 257; - Palette[i].Green := BMPPalette[i].rgbGreen * 257; - Palette[i].Blue := BMPPalette[i].rgbBlue * 257; - Palette[i].Alpha := 0; - end; - - case InfoHeader.biBitCount of - 1: - begin - FFileStride := ((Width + 31) shr 3) and not 3; - FPixelFormat.FormatType := ftMono; - end; - 4: - begin - FFileStride := ((Width + 7) shr 1) and not 3; - FPixelFormat.FormatType := ftPal4; - end; - 8: - begin - FFileStride := (Width + 3) and not 3; - FPixelFormat.FormatType := ftPal8; - end; - 24: - begin - FFileStride := (Width * 3 + 3) and not 3; - FPixelFormat := PixelFormatRGB24; - end; - else - raise EImgUnsupportedPixelFormat.Create; - end; { case } - end; { if } - - HeaderFinished; - end; { if } -end; - -function TBMPReader.DoGetImageSegmentStartY(ASegmentHeight: Integer): Integer; -begin - Result := ScanlinesLeft - ASegmentHeight; - if Result < 0 then - Result := 0; -end; - -procedure TBMPReader.InitImageReading; -begin - ScanlinesLeft := Height; - InitSegmentReading; -end; - -procedure TBMPReader.InitSegmentReading; -begin - ThisSegmentHeight := ScanlinesLeft; - if ThisSegmentHeight > SegmentHeight then - ThisSegmentHeight := SegmentHeight; - ScanlinesLeftInSegment := ThisSegmentHeight; - ScanlineBytesDone := 0; - CurScanline := SegmentData + (ThisSegmentHeight - 1) * SegmentStride; -end; - -procedure TBMPReader.DoProcessImageData(AStream: TStream); - - procedure ScanlineDone; - begin - Dec(ScanlinesLeftInSegment); - Dec(ScanlinesLeft); - - if ScanlinesLeftInSegment = 0 then - begin - SegmentFinished(ScanlinesLeft, ThisSegmentHeight); - if ScanlinesLeft = 0 then - ImageFinished - else - InitSegmentReading; - end - else - Dec(CurScanline, SegmentStride); - end; - -var - ReadMayFail: Boolean; - ToRead, HaveRead: Integer; -begin - if ScanlineBytesDone > 0 then - begin - ToRead := SegmentStride; - if ToRead > FileStride then - ToRead := FileStride; - Dec(ToRead, ScanlineBytesDone); - HaveRead := AStream.Read(PChar(CurScanline)[ScanlineBytesDone], ToRead); - if HaveRead = 0 then - raise EImgOutOfData.Create; - if HaveRead = ToRead then - begin - ScanlineBytesDone := 0; - ScanlineDone - end - else - begin - Inc(ScanlineBytesDone, HaveRead); - exit; - end; - ReadMayFail := True; - end - else - ReadMayFail := False; - - while ScanlinesLeft > 0 do - begin - ToRead := SegmentStride; - if ToRead > FileStride then - ToRead := FileStride; - - HaveRead := AStream.Read(CurScanline^, ToRead); - - if HaveRead = 0 then - if ReadMayFail then - exit //==> - else - raise EImgOutOfData.Create; - - if HaveRead < ToRead then - begin - ScanlineBytesDone := HaveRead; - break; - end; - - // Handle the ordinary case: a full scanline has been read - if ToRead < FileStride then - AStream.Position := AStream.Position + FileStride - ToRead; - ReadMayFail := True; - ScanlineDone; - end; { while } -end; - -end. diff --git a/img/fpimg.pas b/img/fpimg.pas deleted file mode 100644 index 39728b89..00000000 --- a/img/fpimg.pas +++ /dev/null @@ -1,95 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - fpIMG interface declarations. This is the main glue code between - different fpIMG submodules such as ImageIO and fpGFX. - - Copyright (C) 2000 - 2006 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. -} - - -unit fpImg; - -{$IFDEF Debug} -{$ASSERTIONS On} -{$ENDIF} - -interface - -uses - Classes, gfxbase, ImageIO, fpgfx; - - -function CreateImageFromFile(AScreen: TFScreen; AReader: TImageReaderClass; - const AFilename: String): TFBitmap; - -function CreateImageFromStream(AScreen: TFScreen; AReader: TImageReaderClass; - AStream: TStream): TFBitmap; - - - -implementation - - -function CreateImageFromFile(AScreen: TFScreen; AReader: TImageReaderClass; - const AFilename: String): TFBitmap; -var - Stream: TFileStream; -begin - Stream := TFileStream.Create(AFilename, fmOpenRead); - try - Result := CreateImageFromStream(AScreen, AReader, Stream); - finally - Stream.Free; - end; -end; - - -function CreateImageFromStream(AScreen: TFScreen; AReader: TImageReaderClass; - AStream: TStream): TFBitmap; -var - Reader: TImageReader; - Data: Pointer; - Stride: LongWord; - Palette: TGfxPalette; -begin - Reader := AReader.Create; - try - Reader.ProcessHeaderData(AStream); - Result := TFBitmap.Create(Reader.Width, Reader.Height, Reader.PixelFormat); - if Reader.PaletteSize > 0 then - begin - Palette := TGfxPalette.create(Reader.PaletteSize, Reader.Palette); - try - Result.Palette := Palette; - finally - Palette.Release; - end; - end; - try - Result.Lock(Data, Stride); - try - Reader.SetImageSegmentBuffer(Data, Stride, Reader.Height); - Reader.ProcessImageData(AStream); - finally - Result.Unlock; - end; - except - Result.Free; - raise; - end; - finally - Reader.Free; - end; -end; - -end. - diff --git a/img/fpimgpackage.lpk b/img/fpimgpackage.lpk deleted file mode 100644 index 926716d4..00000000 --- a/img/fpimgpackage.lpk +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0"?> -<CONFIG> - <Package Version="2"> - <PathDelim Value="\"/> - <Name Value="fpimgpackage"/> - <CompilerOptions> - <Version Value="5"/> - <PathDelim Value="\"/> - <SearchPaths> - <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> - </SearchPaths> - <CodeGeneration> - <Generate Value="Faster"/> - </CodeGeneration> - <Other> - <CompilerPath Value="$(CompPath)"/> - </Other> - </CompilerOptions> - <Files Count="3"> - <Item1> - <Filename Value="fpimg.pas"/> - <UnitName Value="fpImg"/> - </Item1> - <Item2> - <Filename Value="imageio.pas"/> - <UnitName Value="ImageIO"/> - </Item2> - <Item3> - <Filename Value="bmpreader.pas"/> - <UnitName Value="BMPReader"/> - </Item3> - </Files> - <Type Value="RunAndDesignTime"/> - <RequiredPkgs Count="2"> - <Item1> - <PackageName Value="fpGFXPackage"/> - </Item1> - <Item2> - <PackageName Value="FCL"/> - <MinVersion Major="1" Valid="True"/> - </Item2> - </RequiredPkgs> - <UsageOptions> - <UnitPath Value="$(PkgOutDir)"/> - </UsageOptions> - <PublishOptions> - <Version Value="2"/> - <IgnoreBinaries Value="False"/> - </PublishOptions> - </Package> -</CONFIG> diff --git a/img/imageio.pas b/img/imageio.pas deleted file mode 100644 index ead8ba4b..00000000 --- a/img/imageio.pas +++ /dev/null @@ -1,195 +0,0 @@ -{ - fpGUI - Free Pascal GUI Library - - Image I/O interface declarations - - Copyright (C) 2000 - 2006 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. -} -unit ImageIO; - -{$IFDEF Debug} -{$ASSERTIONS On} -{$ENDIF} - -interface - -uses - SysUtils - ,Classes - ,GFXBase - ; - -resourcestring - SImgOutOfData = 'No more data available for image'; - SImgUnsupportedPixelFormat = 'Unsupported pixel format in image'; - -type - - EImgError = class(Exception); - - EImgOutOfData = class(EImgError) - public - constructor Create; - end; - - EImgUnsupportedPixelFormat = class(EImgError) - public - constructor Create; - end; - - -// Image reading - - TImageReaderClass = class of TImageReader; - - TImageReaderState = (irsStart, irsInHeader, irsHeaderRead, - irsInImage, irsFinished); - - TSegmentEvent = procedure(Sender: TObject; StartY, Height: Integer) of object; - - TImageReader = class - private - FState: TImageReaderState; - { Needed for reading of image data. These values must be initialized by - the user via SetImageSegmentBuffer } - FSegmentData: Pointer; - FSegmentStride: LongWord; - FSegmentHeight: Integer; - FSegmentSize: LongWord; // Size in bytes - - FOnHeader: TNotifyEvent; - FOnSegment: TSegmentEvent; - FOnImage: TNotifyEvent; - protected - // Image properties, only available after OnHeaderRead event - FWidth: Integer; - FHeight: Integer; - FPixelFormat: TGfxPixelFormat; - FPaletteSize: Integer; - FPalette: PGfxColor; - procedure HeaderFinished; - procedure SegmentFinished(AStartY, AHeight: Integer); - procedure ImageFinished; - procedure DoProcessHeaderData(AStream: TStream); virtual; abstract; - function DoGetImageSegmentStartY(ASegmentHeight: Integer): Integer; virtual; abstract; - procedure InitImageReading; virtual; - procedure DoProcessImageData(AStream: TStream); virtual; abstract; - public - constructor Create; virtual; - procedure ProcessHeaderData(AStream: TStream); - function GetImageSegmentStartY(ASegmentHeight: Integer): Integer; - procedure SetImageSegmentBuffer(AData: Pointer; AStride: LongWord; ASegmentHeight: Integer); - procedure ProcessImageData(AStream: TStream); - property State: TImageReaderState read FState; - property Width: Integer read FWidth; - property Height: Integer read FHeight; - property PixelFormat: TGfxPixelFormat read FPixelFormat; - property PaletteSize: Integer read FPaletteSize; - property Palette: PGfxColor read FPalette; - property SegmentData: Pointer read FSegmentData; - property SegmentStride: LongWord read FSegmentStride; - property SegmentHeight: Integer read FSegmentHeight; - property SegmentSize: LongWord read FSegmentSize; - property OnHeader: TNotifyEvent read FOnHeader write FOnHeader; - property OnSegment: TSegmentEvent read FOnSegment write FOnSegment; - property OnImage: TNotifyEvent read FOnImage write FOnImage; - end; - - -implementation - - -constructor EImgOutOfData.Create; -begin - inherited Create(SImgOutOfData); -end; - -constructor EImgUnsupportedPixelFormat.Create; -begin - inherited Create(SImgUnsupportedPixelFormat); -end; - -{ TImageReader } - -constructor TImageReader.Create; -begin - inherited Create; -end; - -procedure TImageReader.ProcessHeaderData(AStream: TStream); -begin - ASSERT(FState in [irsStart, irsInHeader]); - if State = irsStart then - FState := irsInHeader; - DoProcessHeaderData(AStream); -end; - -function TImageReader.GetImageSegmentStartY(ASegmentHeight: Integer): Integer; -begin - ASSERT(State in [irsHeaderRead, irsInImage]); - Result := DoGetImageSegmentStartY(ASegmentHeight); -end; - -procedure TImageReader.SetImageSegmentBuffer(AData: Pointer; AStride: LongWord; - ASegmentHeight: Integer); -begin - ASSERT(State in [irsHeaderRead, irsInImage]); - FSegmentData := AData; - FSegmentStride := AStride; - FSegmentHeight := ASegmentHeight; - FSegmentSize := SegmentStride * SegmentHeight; -end; - -procedure TImageReader.ProcessImageData(AStream: TStream); -begin - if State = irsFinished then - exit; - ASSERT(State in [irsHeaderRead, irsInImage]); - - if State = irsHeaderRead then - begin - FState := irsInImage; - InitImageReading; - end; - - DoProcessImageData(AStream); -end; - -procedure TImageReader.HeaderFinished; -begin - ASSERT(FState = irsInHeader); - FState := irsHeaderRead; - if Assigned(OnHeader) then - OnHeader(Self); -end; - -procedure TImageReader.SegmentFinished(AStartY, AHeight: Integer); -begin - ASSERT(FState = irsInImage); - if Assigned(OnSegment) then - OnSegment(Self, AStartY, AHeight); -end; - -procedure TImageReader.ImageFinished; -begin - ASSERT(FState = irsInImage); - FState := irsFinished; - if Assigned(OnImage) then - OnImage(Self); -end; - -procedure TImageReader.InitImageReading; -begin - // Do nothing -end; - -end. - diff --git a/prototypes/fpgui2/source/core/gfxbaseinterfaces.pas b/prototypes/fpgui2/source/core/gfxbaseinterfaces.pas deleted file mode 100644 index 1a3f28ff..00000000 --- a/prototypes/fpgui2/source/core/gfxbaseinterfaces.pas +++ /dev/null @@ -1,25 +0,0 @@ -unit gfxbaseinterfaces; - -{$mode objfpc}{$H+} - -interface - -uses - Classes; - -type - // forward declarations - IGFXWindow = interface; - - - IGFXWindow = interface(IInterface) - ['{45964C7E-A7E9-4915-9EA1-3F26C5C55A2F}'] - procedure DoAllocateWindowHandle(AParent: IGFXWindow); - procedure DoSetWindowTitle(const ATitle: string); - end; - - -implementation - -end. - diff --git a/prototypes/fpgui2/source/core/resample.pas b/prototypes/fpgui2/source/core/resample.pas deleted file mode 100644 index 82fb5ac1..00000000 --- a/prototypes/fpgui2/source/core/resample.pas +++ /dev/null @@ -1,657 +0,0 @@ -unit resample; - -{$Mode delphi}{$H+} - -// ----------------------------------------------------------------------------- -// Project: bitmap resampler -// Module: resample -// Description: Interpolated Bitmap Resampling using filters. -// Version: 01.02 -// Release: 3 -// Date: 15-MAR-1998 -// Target: Win32, Delphi 2 & 3 -// Author(s): anme: Anders Melander, anders@melander.dk -// Copyright (c) 1997,98 by Anders Melander -// Formatting: 2 space indent, 8 space tabs, 80 columns. -// ----------------------------------------------------------------------------- -// This software is copyrighted as noted above. It may be freely copied, -// modified, and redistributed, provided that the copyright notice(s) is -// preserved on all copies. -// -// There is no warranty or other guarantee of fitness for this software, -// it is provided solely "as is". Bug reports or fixes may be sent -// to the author, who may or may not act on them as he desires. -// -// You may not include this software in a program or other software product -// without supplying the source, or without informing the end-user that the -// source is available for no extra charge. -// -// If you modify this software, you should include a notice in the "Revision -// history" section giving the name of the person performing the modification, -// the date of modification, and the reason for such modification. -// ----------------------------------------------------------------------------- -// Here's some additional copyrights for you: -// -// From filter.c: -// The authors and the publisher hold no copyright restrictions -// on any of these files; this source code is public domain, and -// is freely available to the entire computer graphics community -// for study, use, and modification. We do request that the -// comment at the top of each file, identifying the original -// author and its original publication in the book Graphics -// Gems, be retained in all programs that use these files. -// -// ----------------------------------------------------------------------------- -// Revision history: -// -// 0100 110997 anme - Adapted from fzoom v0.20 by Dale Schumacher. -// -// 0101 110198 anme - Added Lanczos3 and Mitchell filters. -// - Fixed range bug. -// Min value was not checked on conversion from Single to -// byte. -// - Numerous optimizations. -// - Added TImage stretch on form resize. -// - Added support for Delphi 2 via TCanvas.Pixels. -// - Renamed module from stretch to resample. -// - Moved demo code to separate module. -// -// 0102 150398 anme - Fixed a problem that caused all pixels to be shifted -// 1/2 pixel down and to the right (in source -// coordinates). Thanks to David Ullrich for the -// solution. -// ----------------------------------------------------------------------------- -// Credits: -// The algorithms and methods used in this library are based on the article -// "General Filtered Image Rescaling" by Dale Schumacher which appeared in the -// book Graphics Gems III, published by Academic Press, Inc. -// -// The edge offset problem was fixed by: -// * David Ullrich <ullrich@hardy.math.okstate.edu> -// ----------------------------------------------------------------------------- -// To do (in rough order of priority): -// * Implement Dale Schumacher's "Optimized Bitmap Scaling Routines". -// * Fix BoxFilter. -// * Optimize to use integer math instead of floating point where possible. -// ----------------------------------------------------------------------------- -interface - -// If USE_SCANLINE is defined, Stretch will use the TBitmap.Scanline property -// instead of TBitmap.Canvas.Pixels to access the bitmap pixels. -// Use of the Scanline property is 20 to 50 times faster than the Pixels -// property! -{$IFDEF VER100} -{.$DEFINE USE_SCANLINE} -{$ENDIF} - - -uses - SysUtils, Classes, gfxbase, fpgfx; - -type - // Type of a filter for use with Stretch() - TFilterProc = function(Value: Single): Single; - - // Sample filters for use with Stretch() - function SplineFilter(Value: Single): Single; - function BellFilter(Value: Single): Single; - function TriangleFilter(Value: Single): Single; - function BoxFilter(Value: Single): Single; - function HermiteFilter(Value: Single): Single; - function Lanczos3Filter(Value: Single): Single; - function MitchellFilter(Value: Single): Single; - - // Interpolator - // Src: Source bitmap - // Dst: Destination bitmap - // filter: Weight calculation filter - // fwidth: Relative sample radius - procedure Stretch(Src, Dst: TfpgImage; filter: TFilterProc; fwidth: single); - -// ----------------------------------------------------------------------------- -// -// List of Filters -// -// ----------------------------------------------------------------------------- - -const - ResampleFilters: array[0..6] of record - Name: string; // Filter name - Filter: TFilterProc;// Filter implementation - Width: Single; // Suggested sampling width/radius - end = ( - (Name: 'Box'; Filter: BoxFilter; Width: 0.5), - (Name: 'Triangle'; Filter: TriangleFilter; Width: 1.0), - (Name: 'Hermite'; Filter: HermiteFilter; Width: 1.0), - (Name: 'Bell'; Filter: BellFilter; Width: 1.5), - (Name: 'B-Spline'; Filter: SplineFilter; Width: 2.0), - (Name: 'Lanczos3'; Filter: Lanczos3Filter; Width: 3.0), - (Name: 'Mitchell'; Filter: MitchellFilter; Width: 2.0) - ); - -implementation - -uses - math; - -// ----------------------------------------------------------------------------- -// -// Filter functions -// -// ----------------------------------------------------------------------------- - -// Hermite filter -function HermiteFilter(Value: Single): Single; -begin - // f(t) = 2|t|^3 - 3|t|^2 + 1, -1 <= t <= 1 - if (Value < 0.0) then - Value := -Value; - if (Value < 1.0) then - Result := (2.0 * Value - 3.0) * Sqr(Value) + 1.0 - else - Result := 0.0; -end; - -// Box filter -// a.k.a. "Nearest Neighbour" filter -// anme: I have not been able to get acceptable -// results with this filter for subsampling. -function BoxFilter(Value: Single): Single; -begin - if (Value > -0.5) and (Value <= 0.5) then - Result := 1.0 - else - Result := 0.0; -end; - -// Triangle filter -// a.k.a. "Linear" or "Bilinear" filter -function TriangleFilter(Value: Single): Single; -begin - if (Value < 0.0) then - Value := -Value; - if (Value < 1.0) then - Result := 1.0 - Value - else - Result := 0.0; -end; - -// Bell filter -function BellFilter(Value: Single): Single; -begin - if (Value < 0.0) then - Value := -Value; - if (Value < 0.5) then - Result := 0.75 - Sqr(Value) - else if (Value < 1.5) then - begin - Value := Value - 1.5; - Result := 0.5 * Sqr(Value); - end else - Result := 0.0; -end; - -// B-spline filter -function SplineFilter(Value: Single): Single; -var - tt : single; -begin - if (Value < 0.0) then - Value := -Value; - if (Value < 1.0) then - begin - tt := Sqr(Value); - Result := 0.5*tt*Value - tt + 2.0 / 3.0; - end else if (Value < 2.0) then - begin - Value := 2.0 - Value; - Result := 1.0/6.0 * Sqr(Value) * Value; - end else - Result := 0.0; -end; - -// Lanczos3 filter -function Lanczos3Filter(Value: Single): Single; - function SinC(Value: Single): Single; - begin - if (Value <> 0.0) then - begin - Value := Value * Pi; - Result := sin(Value) / Value - end else - Result := 1.0; - end; -begin - if (Value < 0.0) then - Value := -Value; - if (Value < 3.0) then - Result := SinC(Value) * SinC(Value / 3.0) - else - Result := 0.0; -end; - -function MitchellFilter(Value: Single): Single; -const - B = (1.0 / 3.0); - C = (1.0 / 3.0); -var - tt : single; -begin - if (Value < 0.0) then - Value := -Value; - tt := Sqr(Value); - if (Value < 1.0) then - begin - Value := (((12.0 - 9.0 * B - 6.0 * C) * (Value * tt)) - + ((-18.0 + 12.0 * B + 6.0 * C) * tt) - + (6.0 - 2 * B)); - Result := Value / 6.0; - end else - if (Value < 2.0) then - begin - Value := (((-1.0 * B - 6.0 * C) * (Value * tt)) - + ((6.0 * B + 30.0 * C) * tt) - + ((-12.0 * B - 48.0 * C) * Value) - + (8.0 * B + 24 * C)); - Result := Value / 6.0; - end else - Result := 0.0; -end; - -// ----------------------------------------------------------------------------- -// -// Interpolator -// -// ----------------------------------------------------------------------------- -type - // Contributor for a pixel - TContributor = record - pixel: integer; // Source pixel - weight: single; // Pixel weight - end; - - TContributorList = array[0..0] of TContributor; - PContributorList = ^TContributorList; - - // List of source pixels contributing to a destination pixel - TCList = record - n : integer; - p : PContributorList; - end; - - TCListList = array[0..0] of TCList; - PCListList = ^TCListList; - - TRGB = packed record - r, g, b : single; - end; - - // Physical bitmap pixel - TColorRGB = packed record - r, g, b : BYTE; - end; - PColorRGB = ^TColorRGB; - - // Physical bitmap scanline (row) - TRGBList = packed array[0..0] of TColorRGB; - PRGBList = ^TRGBList; - -procedure Stretch(Src, Dst: TfpgImage; filter: TFilterProc; fwidth: single); -var - xscale, yscale : single; // Zoom scale factors - i, j, k : integer; // Loop variables - center : single; // Filter calculation variables - width, fscale, weight : single; // Filter calculation variables - left, right : integer; // Filter calculation variables - n : integer; // Pixel number - Work : TfpgImage; - contrib : PCListList; - rgb : TRGB; - color : TColorRGB; -{$IFDEF USE_SCANLINE} - SourceLine , - DestLine : PRGBList; - SourcePixel , - DestPixel : PColorRGB; - Delta , - DestDelta : integer; -{$ENDIF} - SrcWidth , - SrcHeight , - DstWidth , - DstHeight : integer; - - function Color2RGB(Color: TfpgColor): TColorRGB; - begin - Result.r := (Color AND $00FF0000) SHR 16; - Result.g := (Color AND $0000FF00) SHR 8; - Result.b := Color AND $000000FF; - -// Result.r := Color AND $000000FF; -// Result.g := (Color AND $0000FF00) SHR 8; -// Result.b := (Color AND $00FF0000) SHR 16; - end; - - function RGB2Color(Color: TColorRGB): TfpgColor; - begin - Result := Color.b OR (Color.g SHL 8) OR (Color.r SHL 16); -// Result := Color.r OR (Color.g SHL 8) OR (Color.b SHL 16); - end; - -begin - DstWidth := Dst.Width; - DstHeight := Dst.Height; - SrcWidth := Src.Width; - SrcHeight := Src.Height; - if (SrcWidth < 1) or (SrcHeight < 1) then - raise Exception.Create('Source bitmap too small'); - - // Create intermediate image to hold horizontal zoom - Work := TfpgImage.Create; - try -// Work.Height := SrcHeight; -// Work.Width := DstWidth; - Work.AllocateImage(src.ColorDepth, DstWidth, SrcHeight); - // xscale := DstWidth / SrcWidth; - // yscale := DstHeight / SrcHeight; - // Improvement suggested by David Ullrich: - if (SrcWidth = 1) then - xscale:= DstWidth / SrcWidth - else - xscale:= (DstWidth - 1) / (SrcWidth - 1); - if (SrcHeight = 1) then - yscale:= DstHeight / SrcHeight - else - yscale:= (DstHeight - 1) / (SrcHeight - 1); - // This implementation only works on 24-bit images because it uses - // TBitmap.Scanline -{$IFDEF USE_SCANLINE} - Src.PixelFormat := pf24bit; - Dst.PixelFormat := Src.PixelFormat; - Work.PixelFormat := Src.PixelFormat; -{$ENDIF} - - // -------------------------------------------- - // Pre-calculate filter contributions for a row - // ----------------------------------------------- - GetMem(contrib, DstWidth* sizeof(TCList)); - // Horizontal sub-sampling - // Scales from bigger to smaller width - if (xscale < 1.0) then - begin - width := fwidth / xscale; - fscale := 1.0 / xscale; - for i := 0 to DstWidth-1 do - begin - contrib^[i].n := 0; - GetMem(contrib^[i].p, trunc(width * 2.0 + 1) * sizeof(TContributor)); - center := i / xscale; - // Original code: - // left := ceil(center - width); - // right := floor(center + width); - left := floor(center - width); - right := ceil(center + width); - for j := left to right do - begin - weight := filter((center - j) / fscale) / fscale; - if (weight = 0.0) then - continue; - if (j < 0) then - n := -j - else if (j >= SrcWidth) then - n := SrcWidth - j + SrcWidth - 1 - else - n := j; - k := contrib^[i].n; - contrib^[i].n := contrib^[i].n + 1; - contrib^[i].p^[k].pixel := n; - contrib^[i].p^[k].weight := weight; - end; - end; - end else - // Horizontal super-sampling - // Scales from smaller to bigger width - begin - for i := 0 to DstWidth-1 do - begin - contrib^[i].n := 0; - GetMem(contrib^[i].p, trunc(fwidth * 2.0 + 1) * sizeof(TContributor)); - center := i / xscale; - // Original code: - // left := ceil(center - fwidth); - // right := floor(center + fwidth); - left := floor(center - fwidth); - right := ceil(center + fwidth); - for j := left to right do - begin - weight := filter(center - j); - if (weight = 0.0) then - continue; - if (j < 0) then - n := -j - else if (j >= SrcWidth) then - n := SrcWidth - j + SrcWidth - 1 - else - n := j; - k := contrib^[i].n; - contrib^[i].n := contrib^[i].n + 1; - contrib^[i].p^[k].pixel := n; - contrib^[i].p^[k].weight := weight; - end; - end; - end; - - // ---------------------------------------------------- - // Apply filter to sample horizontally from Src to Work - // ---------------------------------------------------- - for k := 0 to SrcHeight-1 do - begin -{$IFDEF USE_SCANLINE} - SourceLine := Src.ScanLine[k]; - DestPixel := Work.ScanLine[k]; -{$ENDIF} - for i := 0 to DstWidth-1 do - begin - rgb.r := 0.0; - rgb.g := 0.0; - rgb.b := 0.0; - for j := 0 to contrib^[i].n-1 do - begin -{$IFDEF USE_SCANLINE} - color := SourceLine^[contrib^[i].p^[j].pixel]; -{$ELSE} - color := Color2RGB(Src.Colors[contrib^[i].p^[j].pixel, k]); -// color := Color2RGB(Src.Canvas.Pixels[contrib^[i].p^[j].pixel, k]); -{$ENDIF} - weight := contrib^[i].p^[j].weight; - if (weight = 0.0) then - continue; - rgb.r := rgb.r + color.r * weight; - rgb.g := rgb.g + color.g * weight; - rgb.b := rgb.b + color.b * weight; - end; - if (rgb.r > 255.0) then - color.r := 255 - else if (rgb.r < 0.0) then - color.r := 0 - else - color.r := round(rgb.r); - if (rgb.g > 255.0) then - color.g := 255 - else if (rgb.g < 0.0) then - color.g := 0 - else - color.g := round(rgb.g); - if (rgb.b > 255.0) then - color.b := 255 - else if (rgb.b < 0.0) then - color.b := 0 - else - color.b := round(rgb.b); -{$IFDEF USE_SCANLINE} - // Set new pixel value - DestPixel^ := color; - // Move on to next column - inc(DestPixel); -{$ELSE} - Work.Colors[i, k] := RGB2Color(color); -// Work.Canvas.Pixels[i, k] := RGB2Color(color); -{$ENDIF} - end; - end; - - // Free the memory allocated for horizontal filter weights - for i := 0 to DstWidth-1 do - FreeMem(contrib^[i].p); - - FreeMem(contrib); - - // ----------------------------------------------- - // Pre-calculate filter contributions for a column - // ----------------------------------------------- - GetMem(contrib, DstHeight* sizeof(TCList)); - // Vertical sub-sampling - // Scales from bigger to smaller height - if (yscale < 1.0) then - begin - width := fwidth / yscale; - fscale := 1.0 / yscale; - for i := 0 to DstHeight-1 do - begin - contrib^[i].n := 0; - GetMem(contrib^[i].p, trunc(width * 2.0 + 1) * sizeof(TContributor)); - center := i / yscale; - // Original code: - // left := ceil(center - width); - // right := floor(center + width); - left := floor(center - width); - right := ceil(center + width); - for j := left to right do - begin - weight := filter((center - j) / fscale) / fscale; - if (weight = 0.0) then - continue; - if (j < 0) then - n := -j - else if (j >= SrcHeight) then - n := SrcHeight - j + SrcHeight - 1 - else - n := j; - k := contrib^[i].n; - contrib^[i].n := contrib^[i].n + 1; - contrib^[i].p^[k].pixel := n; - contrib^[i].p^[k].weight := weight; - end; - end - end else - // Vertical super-sampling - // Scales from smaller to bigger height - begin - for i := 0 to DstHeight-1 do - begin - contrib^[i].n := 0; - GetMem(contrib^[i].p, trunc(fwidth * 2.0 + 1) * sizeof(TContributor)); - center := i / yscale; - // Original code: - // left := ceil(center - fwidth); - // right := floor(center + fwidth); - left := floor(center - fwidth); - right := ceil(center + fwidth); - for j := left to right do - begin - weight := filter(center - j); - if (weight = 0.0) then - continue; - if (j < 0) then - n := -j - else if (j >= SrcHeight) then - n := SrcHeight - j + SrcHeight - 1 - else - n := j; - k := contrib^[i].n; - contrib^[i].n := contrib^[i].n + 1; - contrib^[i].p^[k].pixel := n; - contrib^[i].p^[k].weight := weight; - end; - end; - end; - - // -------------------------------------------------- - // Apply filter to sample vertically from Work to Dst - // -------------------------------------------------- -{$IFDEF USE_SCANLINE} - SourceLine := Work.ScanLine[0]; - Delta := integer(Work.ScanLine[1]) - integer(SourceLine); - DestLine := Dst.ScanLine[0]; - DestDelta := integer(Dst.ScanLine[1]) - integer(DestLine); -{$ENDIF} - for k := 0 to DstWidth-1 do - begin -{$IFDEF USE_SCANLINE} - DestPixel := pointer(DestLine); -{$ENDIF} - for i := 0 to DstHeight-1 do - begin - rgb.r := 0; - rgb.g := 0; - rgb.b := 0; - // weight := 0.0; - for j := 0 to contrib^[i].n-1 do - begin -{$IFDEF USE_SCANLINE} - color := PColorRGB(integer(SourceLine)+contrib^[i].p^[j].pixel*Delta)^; -{$ELSE} - color := Color2RGB(Work.Colors[k, contrib^[i].p^[j].pixel]); -// color := Color2RGB(Work.Canvas.Pixels[k, contrib^[i].p^[j].pixel]); -{$ENDIF} - weight := contrib^[i].p^[j].weight; - if (weight = 0.0) then - continue; - rgb.r := rgb.r + color.r * weight; - rgb.g := rgb.g + color.g * weight; - rgb.b := rgb.b + color.b * weight; - end; - if (rgb.r > 255.0) then - color.r := 255 - else if (rgb.r < 0.0) then - color.r := 0 - else - color.r := round(rgb.r); - if (rgb.g > 255.0) then - color.g := 255 - else if (rgb.g < 0.0) then - color.g := 0 - else - color.g := round(rgb.g); - if (rgb.b > 255.0) then - color.b := 255 - else if (rgb.b < 0.0) then - color.b := 0 - else - color.b := round(rgb.b); -{$IFDEF USE_SCANLINE} - DestPixel^ := color; - inc(integer(DestPixel), DestDelta); -{$ELSE} - Dst.Colors[k, i] := RGB2Color(color); -// Dst.Canvas.Pixels[k, i] := RGB2Color(color); -{$ENDIF} - end; -{$IFDEF USE_SCANLINE} - Inc(SourceLine, 1); - Inc(DestLine, 1); -{$ENDIF} - end; - - // Free the memory allocated for vertical filter weights - for i := 0 to DstHeight-1 do - FreeMem(contrib^[i].p); - - FreeMem(contrib); - - finally - Work.Free; - end; -end; - -end. diff --git a/prototypes/multihandle/gui2Base.pas b/prototypes/multihandle/gui2Base.pas deleted file mode 100644 index fe25dbf9..00000000 --- a/prototypes/multihandle/gui2Base.pas +++ /dev/null @@ -1,442 +0,0 @@ -{ - Proof of concept one handle per widget GUI. - Graeme Geldenhuys -} - -unit gui2Base; - -{$mode objfpc}{$H+} - -{$Define DEBUG} - -interface - -uses - Classes - ,fpgfx - ,GFXBase - ; - - -type - - TWidgetStyle = set of ( - wsCaptureMouse, - wsClickable, - wsOpaque - ); - - - TWidgetState = set of ( - wsEnabled, - wsIsVisible, - wsSizeIsForced, - wsHasFocus, - wsMouseInside, - wsClicked - ); - - // The following flags are used for styles - - TFButtonFlags = set of ( - btnIsEmbedded, - btnIsDefault, - btnIsPressed, - btnIsSelected, - btnHasFocus - ); - - - { TFWidget } - - TFWidget = class(TFWindow) - private - FColor: TGfxColor; - FOnClick: TNotifyEvent; - procedure EvOnMouseReleased(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint); virtual; - procedure EvOnMousePressed(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint); virtual; - procedure EvOnMouseLeave(Sender: TObject); virtual; - procedure SetColor(const AValue: TGfxColor); - protected - FWidgetStyle: TWidgetStyle; - FWidgetState: TWidgetState; - procedure Paint; virtual; - property OnClick: TNotifyEvent read FOnClick write FOnClick; - property Color: TGfxColor read FColor write SetColor; - public - constructor Create(AParent: TFCustomWindow; AWindowOptions: TFWindowOptions); override; - constructor Create(AParent: TFCustomWindow); overload; - destructor Destroy; override; - procedure ProcessEvent(AEvent: TFEvent); override; - procedure SetFocus; - end; - - { TFForm } - - TFForm = class(TFWidget) - public - constructor Create(AParent: TFCustomWindow; AWindowOptions: TFWindowOptions); override; - constructor Create; virtual; reintroduce; - property Color; - end; - - { TFPopupWindow } - {$Note TFPopupWindow is still work in progess. } - TFPopupWindow = class(TFForm) - public - constructor Create; override; - end; - - { TFButton } - - TFButton = class(TFWidget) - private - FCaption: string; - procedure SetCaption(const AValue: string); - protected - procedure Paint; override; - public - constructor Create(AParent: TFCustomWindow; APosition: TPoint); overload; reintroduce; - property Caption: string read FCaption write SetCaption; - published - property OnClick; - end; - - { TFLabel } - - TFLabel = class(TFWidget) - private - FCaption: string; - procedure SetCaption(const AValue: string); - protected - procedure Paint; override; - public - constructor Create(AParent: TFCustomWindow; APosition: TPoint); overload; reintroduce; - property Caption: string read FCaption write SetCaption; - end; - - { TFCustomEdit } - - TFCustomEdit = class(TFWidget) - private - FText: string; - procedure SetText(const AValue: string); - protected - procedure Paint; override; - public - constructor Create(AParent: TFCustomWindow; APosition: TPoint); overload; reintroduce; - property Text: string read FText write SetText; - end; - - { TEdit } - - TFEdit = class(TFCustomEdit) - public - property Text; - end; - - -implementation - -const - clDkWhite: TGfxColor = (Red: $e000; Green: $e000; Blue: $e000; Alpha: 0); - cl3DShadow: TGfxColor = (Red: $8000; Green: $8000; Blue: $8000; Alpha: 0); - cl3DDkShadow: TGfxColor = (Red: $0000; Green: $0000; Blue: $0000; Alpha: 0); - cl3DHighlight: TGfxColor = (Red: $FF00; Green: $FF00; Blue: $FF00; Alpha: 0); - cl3DFace: TGfxColor = (Red: $c000; Green: $c000; Blue: $c000; Alpha: 0); - clWindow: TGfxColor = (Red: $FF00; Green: $FF00; Blue: $FF00; Alpha: 0); - cl3DLight: TGfxColor = (Red: $e000; Green: $e000; Blue: $e000; Alpha: 0); - - -// Helper functions, that will actually be in a style class. - -procedure Draw3DFrame(Canvas: TFCanvas; const ARect: TRect; Color1, Color2, Color3, Color4: TGfxColor); -begin - with ARect do - begin - Canvas.SetColor(Color1); - Canvas.DrawLine(Point(Left, Bottom - 2), TopLeft); - Canvas.DrawLine(TopLeft, Point(Right - 1, Top)); - - Canvas.SetColor(Color2); - Canvas.DrawLine(Point(Left + 1, Bottom - 3), Point(Left + 1, Top + 1)); - Canvas.DrawLine(Point(Left + 1, Top + 1), Point(Right - 2, Top + 1)); - - Canvas.SetColor(Color3); - Canvas.DrawLine(Point(Left, Bottom - 1), Point(Right - 1, Bottom - 1)); - Canvas.DrawLine(Point(Right - 1, Bottom - 1), Point(Right - 1, Top - 1)); - - Canvas.SetColor(Color4); - Canvas.DrawLine(Point(Left + 1, Bottom - 2), Point(Right - 2, Bottom - 2)); - Canvas.DrawLine(Point(Right - 2, Bottom - 2), Point(Right - 2, Top)); - end; -end; - -procedure DrawEditBox(Canvas: TFCanvas; const ARect: TRect); -begin - Draw3DFrame(Canvas, ARect, cl3DShadow, cl3DDkShadow, cl3DHighlight, cl3DFace); - Canvas.SetColor(clWindow); - with ARect do - Canvas.FillRect(Rect(Left + 2, Top + 2, Right - 2, Bottom - 2)); -end; - -{ TFWidget } - -procedure TFWidget.EvOnMouseReleased(Sender: TObject; AButton: TMouseButton; - AShift: TShiftState; const AMousePos: TPoint); -begin - {$IFDEF DEBUG} Writeln(ClassName + '.EvOnMouseReleased'); {$ENDIF} - if (wsClickable in FWidgetStyle) and (wsEnabled in FWidgetState) and - (AButton = mbLeft) then - begin - if wsClicked in FWidgetState then - begin - Exclude(FWidgetState, wsClicked); - Paint; - if Assigned(OnClick) then - OnClick(self); - end; - end; -end; - -procedure TFWidget.EvOnMousePressed(Sender: TObject; AButton: TMouseButton; - AShift: TShiftState; const AMousePos: TPoint); -begin - {$IFDEF DEBUG} Writeln(ClassName + '.EvOnMousePressed'); {$ENDIF} - if (wsClickable in FWidgetStyle) and (wsEnabled in FWidgetState) and - (AButton = mbLeft) then - begin - Include(FWidgetState, wsClicked); - SetFocus; -// Paint; - end; -end; - -procedure TFWidget.EvOnMouseLeave(Sender: TObject); -begin - Exclude(FWidgetState, wsHasFocus); -// Paint; -end; - -procedure TFWidget.SetColor(const AValue: TGfxColor); -begin - if FColor = AValue then exit; - FColor := AValue; - Paint; -end; - -procedure TFWidget.Paint; -var - r: TRect; -begin - {$IFDEF DEBUG} Writeln(ClassName + '.Paint'); {$ENDIF} - Canvas.SetColor(FColor); - r.Left := 0; - r.Top := 0; - r.Right := Width; - r.Bottom := Height; - Canvas.FillRect(r); -end; - -constructor TFWidget.Create(AParent: TFCustomWindow; - AWindowOptions: TFWindowOptions); -begin - inherited Create(AParent, AWindowOptions); - - FWidgetState := [wsEnabled]; - FColor := colLtGray; - Title := ClassName; - - // Assign some event handlers - OnMouseReleased := @EvOnMouseReleased; - OnMousePressed := @EvOnMousePressed; - OnMouseLeave := @EvOnMouseLeave; -end; - -constructor TFWidget.Create(AParent: TFCustomWindow); -begin - Create(AParent, [woChildWindow]); -end; - -destructor TFWidget.Destroy; -begin - OnMouseReleased := nil; - OnMousePressed := nil; - inherited Destroy; -end; - -procedure TFWidget.ProcessEvent(AEvent: TFEvent); -begin - inherited ProcessEvent(AEvent); - case AEvent.EventType of - etPaint: - begin - Paint; - end; - end; { case } - -end; - -procedure TFWidget.SetFocus; -begin - Include(FWidgetState, wsHasFocus); - Paint; -// FindForm.FocusedWidget := Self; -end; - -{ TFForm } - -constructor TFForm.Create(AParent: TFCustomWindow; - AWindowOptions: TFWindowOptions); -begin - inherited Create(AParent, AWindowOptions); -end; - -constructor TFForm.Create; -begin - inherited Create(nil, [woWindow]); -end; - -{ TFButton } - -procedure TFButton.SetCaption(const AValue: string); -begin - if FCaption=AValue then exit; - FCaption:=AValue; - Paint; -end; - -procedure TFButton.Paint; -var - Pt: TPoint; - lFlags: TFButtonFlags; - r: TRect; -begin - inherited Paint; - {$IFDEF DEBUG} Writeln(' - Painting ' + Caption); {$ENDIF} - lFlags := []; - r := Rect(0, 0, Width, Height); - - if (wsClicked in FWidgetState) then - Include(lFlags, btnIsPressed); - if (wsHasFocus in FWidgetState) {and not Embedded} then - begin - Include(lFlags, btnIsSelected); - end; - - { draw actual button } - if btnIsPressed in lFlags then - begin - Canvas.SetColor(cl3DShadow); - Canvas.DrawRect(r); - Inc(r.Left); - Inc(r.Top); - Dec(r.Right); - Dec(r.Bottom); - end - else - begin - Draw3DFrame(TFCanvas(Canvas), r, cl3DHighlight, cl3DLight, cl3DDkShadow, cl3DShadow); - end; - - { draw focus rectangle } - if (btnIsSelected in lFlags) and not (btnIsPressed in lFlags) then - begin - Inc(r.Left, 2); - Inc(r.Top, 2); - Dec(r.Right, 2); - Dec(r.Bottom, 2); - Canvas.SetColor(cl3DDkShadow); - Canvas.SetLineStyle(lsDot); - Canvas.DrawRect(r); - Canvas.SetLineStyle(lsSolid); - end; - - Canvas.SetColor(colBlack); - Pt.x := (Width - Canvas.TextWidth(FCaption)) div 2; - Pt.y := ((Height - Canvas.FontCellHeight) div 2) + 1; - if (wsClicked in FWidgetState) {and (wsMouseInside in FWidgetState)} then - Pt := Pt + Point(1, 1); - Canvas.TextOut(Pt, FCaption); -end; - -constructor TFButton.Create(AParent: TFCustomWindow; APosition: TPoint); -begin - inherited Create(AParent); - Include(FWidgetStyle, wsClickable); - SetPosition(APosition); - SetClientSize(Size(75, 25)); -end; - -{ TFLabel } - -procedure TFLabel.SetCaption(const AValue: string); -var - w, h: integer; -begin - if FCaption=AValue then exit; - FCaption := AValue; - - w := Canvas.TextWidth(FCaption) + 6; - h := Canvas.FontCellHeight + 4; - SetClientSize(Size(w, h)); - Paint; -end; - -procedure TFLabel.Paint; -begin -// Color := FParent.Canvas.GetColor; - inherited Paint; - Canvas.SetColor(colWhite); - Canvas.FillRect(Rect(0,0,Width,Height)); - Canvas.SetColor(colBlack); - Canvas.TextOut(Point(0, 0), FCaption); -end; - -constructor TFLabel.Create(AParent: TFCustomWindow; APosition: TPoint); -begin - inherited Create(AParent); - SetPosition(APosition); - SetClientSize(Size(75, 22)); -end; - -{ TFPopupWindow } - -constructor TFPopupWindow.Create; -begin -// inherited Create(nil, [woPopup]); - inherited Create(nil, [woWindow]); -end; - -{ TFCustomEdit } - -procedure TFCustomEdit.SetText(const AValue: string); -var - w: integer; -begin - if FText=AValue then exit; - FText:=AValue; - w := Canvas.TextWidth(FText) + 6; - SetClientSize(Size(w, Height)); - Paint; -end; - -procedure TFCustomEdit.Paint; -begin - inherited Paint; - DrawEditBox(TFCanvas(Canvas), Rect(0, 0, Width, Height)); - Canvas.SetColor(colBlack); - if FText <> '' then - Canvas.TextOut(Point(2, 2), FText); -end; - -constructor TFCustomEdit.Create(AParent: TFCustomWindow; APosition: TPoint); -begin - inherited Create(AParent); -// OnMouseEntered := @EvMouseEntered - SetPosition(APosition); - SetClientSize(Size(100, 25)); -end; - -end. - diff --git a/prototypes/multihandle/test.lpi b/prototypes/multihandle/test.lpi deleted file mode 100644 index cb9bb62e..00000000 --- a/prototypes/multihandle/test.lpi +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0"?> -<CONFIG> - <ProjectOptions> - <PathDelim Value="\"/> - <Version Value="5"/> - <General> - <Flags> - <SaveOnlyProjectUnits Value="True"/> - </Flags> - <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> - <IconPath Value=".\"/> - <TargetFileExt Value=""/> - </General> - <VersionInfo> - <ProjectVersion Value=""/> - </VersionInfo> - <PublishOptions> - <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/> - </PublishOptions> - <RunParams> - <local> - <FormatVersion Value="1"/> - <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/> - </local> - </RunParams> - <RequiredPackages Count="1"> - <Item1> - <PackageName Value="fpgfxpackage"/> - </Item1> - </RequiredPackages> - <Units Count="1"> - <Unit0> - <Filename Value="test.lpr"/> - <IsPartOfProject Value="True"/> - <UnitName Value="test"/> - </Unit0> - </Units> - </ProjectOptions> - <CompilerOptions> - <Version Value="5"/> - <PathDelim Value="\"/> - <CodeGeneration> - <Generate Value="Faster"/> - </CodeGeneration> - <Other> - <CustomOptions Value="-FUunits -"/> - <CompilerPath Value="$(CompPath)"/> - </Other> - </CompilerOptions> -</CONFIG> diff --git a/prototypes/multihandle/test.lpr b/prototypes/multihandle/test.lpr deleted file mode 100644 index 23e4f4f5..00000000 --- a/prototypes/multihandle/test.lpr +++ /dev/null @@ -1,129 +0,0 @@ -{ - Proof of concept test app for multi-handle GUI widgets. - Graeme Geldenhuys -} - -program test; - -{$mode objfpc}{$H+} - -uses - {$IFDEF UNIX}{$IFDEF UseCThreads} - cthreads, - {$ENDIF}{$ENDIF} - Classes - ,gui2Base - ,gfxbase - ,fpgfx - ; - - -type - - { TMainWindow } - - TMainWindow = class(TFForm) - procedure btnCancelClick(Sender: TObject); - procedure btnCloseClick(Sender: TObject); - procedure btnPopupClick(Sender: TObject); - private - btnClose: TFButton; - btnCancel: TFButton; - btnPopup: TFButton; - lblWelcome: TFLabel; - edEdit: TFEdit; - public - constructor Create; override; - destructor Destroy; override; - end; - - - TMyPopup = class(TFPopupWindow) - public - constructor Create; override; - end; - -const - clBlue: TGfxColor = (Red: $0000; Green: $0000; Blue: $FF00; Alpha: 0); - clLightSteelBlue: TGfxColor = (Red: $B000; Green: $C400; Blue: $DE00; Alpha: 0); - -{ TMyPopup } - -constructor TMyPopup.Create; -begin - inherited Create; - Title := 'My Popup'; - SetClientSize(Size(180, 320)); -end; - -{ TMainWindow } - -procedure TMainWindow.btnCancelClick(Sender: TObject); -begin - Writeln('You click Cancel'); -end; - -procedure TMainWindow.btnCloseClick(Sender: TObject); -begin - Writeln('You click Close'); - GFApplication.Quit; -end; - -procedure TMainWindow.btnPopupClick(Sender: TObject); -var - frm: TMyPopup; -begin - frm := TMyPopup.Create; - - GFApplication.AddWindow(frm); -// frm.SetPosition(Point(0, btnPopup.Height)); - frm.Show; -end; - -constructor TMainWindow.Create; -begin - inherited Create; - Title := 'fpGUI multi-handle example'; - SetClientSize(Size(320, 200)); - Color := clLightSteelBlue; - - btnClose := TFButton.Create(self, Point(20, 150)); - btnClose.Caption := 'Close'; - btnClose.OnClick := @btnCloseClick; - - btnCancel := TFButton.Create(self, Point(150, 150)); - btnCancel.Caption := 'Cancel'; - btnCancel.OnClick := @btnCancelClick; - - btnPopup := TFButton.Create(self, Point(80, 80)); - btnPopup.Caption := 'Popup'; - btnPopup.OnClick := @btnPopupClick; - - lblWelcome := TFLabel.Create(self, Point(10, 10)); - lblWelcome.Caption := 'So what do you think?'; - - edEdit := TFEdit.Create(self, Point(65, 110)); - edEdit.Text := 'Multi-Handle widgets'; -end; - -destructor TMainWindow.Destroy; -begin - btnClose.Free; - btnCancel.Free; - btnPopup.Free; - lblWelcome.Free; - inherited Destroy; -end; - - -var - MainWindow: TMainWindow; -begin - GFApplication.Initialize; - MainWindow := TMainWindow.Create; - GFApplication.AddWindow(MainWindow); - MainWindow.Show; - GFApplication.Run; - MainWindow.Free; -end. - diff --git a/prototypes/newmultihandle/examples/helloworld.lpi b/prototypes/newmultihandle/examples/helloworld.lpi deleted file mode 100644 index 779ed512..00000000 --- a/prototypes/newmultihandle/examples/helloworld.lpi +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0"?> -<CONFIG> - <ProjectOptions> - <PathDelim Value="\"/> - <Version Value="5"/> - <General> - <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> - <IconPath Value=".\"/> - <TargetFileExt Value=".exe"/> - </General> - <VersionInfo> - <ProjectVersion Value=""/> - </VersionInfo> - <PublishOptions> - <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/> - </PublishOptions> - <RunParams> - <local> - <FormatVersion Value="1"/> - <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/> - </local> - </RunParams> - <RequiredPackages Count="2"> - <Item1> - <PackageName Value="fpguipackage"/> - </Item1> - <Item2> - <PackageName Value="fpGFXPackage"/> - </Item2> - </RequiredPackages> - <Units Count="1"> - <Unit0> - <Filename Value="helloworld.lpr"/> - <IsPartOfProject Value="True"/> - <UnitName Value="helloworld"/> - </Unit0> - </Units> - </ProjectOptions> - <CompilerOptions> - <Version Value="5"/> - <PathDelim Value="\"/> - <CodeGeneration> - <Generate Value="Faster"/> - </CodeGeneration> - <Other> - <CompilerPath Value="$(CompPath)"/> - </Other> - </CompilerOptions> -</CONFIG> diff --git a/prototypes/newmultihandle/examples/helloworld.lpr b/prototypes/newmultihandle/examples/helloworld.lpr deleted file mode 100644 index ab364d59..00000000 --- a/prototypes/newmultihandle/examples/helloworld.lpr +++ /dev/null @@ -1,108 +0,0 @@ -program HelloWorld; - -{$mode objfpc}{$h+} - -uses - Classes, - fpgui, - fpGFX, - gfxBase; - -type - TMainForm = class(TFWidget) - private - btnHello: TFButton; - txtEdit: TFEdit; - procedure FormPaint(Sender: TObject); - public - constructor Create(AParent: TFCustomWindow); override; - procedure AfterConstruction; override; - end; - - -{ TMainForm } - -procedure TMainForm.FormPaint(Sender: TObject); -begin - Canvas.SetColor(colBlack); - Canvas.DrawLine(0, 0, 100, 100); - Canvas.DrawLine(5, 0, 95, 100); - Canvas.DrawLine(10, 0, 90, 100); - - Canvas.TextOut(Point(5, 150), 'This should be at (5, 150).'); - - Canvas.SetColor(colBlue); - Canvas.FillRect(Rect(5, 100, 55, 150)); - Canvas.SetColor(colGreen); - Canvas.FillRect(Rect(60, 100, 110, 150)); - Canvas.SetColor(colRed); - Canvas.FillRect(Rect(115, 100, 165, 150)); - - Canvas.SetColor(colRed); - Canvas.DrawRect(Rect(100, 5, 150, 55)); - Canvas.SetColor(colGreen); - Canvas.DrawRect(Rect(105, 10, 155, 60)); - Canvas.SetColor(colBlue); - Canvas.DrawRect(Rect(110, 15, 160, 65)); - - Canvas.SetColor(colRed); - Canvas.DrawCircle(Rect(10, 175, 50, 215)); - Canvas.SetColor(colGreen); - Canvas.DrawCircle(Rect(65, 175, 105, 215)); - Canvas.SetColor(colBlue); - Canvas.DrawCircle(Rect(120, 175, 160, 215)); -end; - -constructor TMainForm.Create(AParent: TFCustomWindow); -begin - inherited; - self.OnPaint := @FormPaint; -end; - -procedure TMainForm.AfterConstruction; -var - lSize: TSize; - lPoint: TPoint; -begin - inherited AfterConstruction; - -// BorderWidth := 8; -// Text := 'fpGUI Application'; - - { create our button } - btnHello := TFButton.Create('Hello World!', self); - lSize.cx := 100; - lSize.cy := 25; - btnHello.SetClientSize(lSize); - lPoint.x := 25; - lPoint.y := 25; - btnHello.SetPosition(lPoint); - btnHello.Show; - - { create the edit } - txtEdit := TFEdit.Create(self); - lSize.cx := 100; - lSize.cy := 25; - txtEdit.SetClientSize(lSize); - lPoint.x := 25; - lPoint.y := 100; - txtEdit.SetPosition(lPoint); - txtEdit.Show; - - { set a min and max size } - lSize.cx := 200; - lSize.cy := 300; - SetClientSize(lSize); - SetMinMaxClientSize(lSize, lSize); -end; - - -var - MainForm: TMainForm; -begin - GFApplication.Initialize; - MainForm := TMainForm.Create(nil); - MainForm.Show; - GFApplication.Run; -end. - diff --git a/prototypes/newmultihandle/fpgui.pas b/prototypes/newmultihandle/fpgui.pas deleted file mode 100644 index 9649e21e..00000000 --- a/prototypes/newmultihandle/fpgui.pas +++ /dev/null @@ -1,43 +0,0 @@ -unit fpgui; - -{$mode objfpc}{$H+} - -interface - -uses - Classes, SysUtils, gfxbase, fpgfx; - -{ Style includes } -{$include gui_style.inc} - -{ TFWidget includes } -{$include gui_widget.inc} - -{ Primary widgets includes } -{$include gui_button.inc} -{$include gui_edit.inc} - -var - { Default Styles } - GFDefaultStyle: TFStyle; - -implementation - -{$define READ_IMPLEMENTATION} - -{ Style includes } -{$include gui_style.inc} - -{ TFWidget includes } -{$include gui_widget.inc} - -{ Primary widgets includes } -{$include gui_button.inc} -{$include gui_edit.inc} - -initialization - { Default Styles } - GFDefaultStyle := TFStyle.Create; - -end. - diff --git a/prototypes/newmultihandle/fpguipackage.lpk b/prototypes/newmultihandle/fpguipackage.lpk deleted file mode 100644 index 19788333..00000000 --- a/prototypes/newmultihandle/fpguipackage.lpk +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0"?> -<CONFIG> - <Package Version="2"> - <PathDelim Value="\"/> - <Name Value="fpguipackage"/> - <CompilerOptions> - <Version Value="5"/> - <PathDelim Value="\"/> - <SearchPaths> - <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> - </SearchPaths> - <CodeGeneration> - <Generate Value="Faster"/> - </CodeGeneration> - <Other> - <CompilerPath Value="$(CompPath)"/> - </Other> - </CompilerOptions> - <Files Count="5"> - <Item1> - <Filename Value="fpgui.pas"/> - <UnitName Value="fpgui"/> - </Item1> - <Item2> - <Filename Value="gui_button.inc"/> - <Type Value="Include"/> - </Item2> - <Item3> - <Filename Value="gui_widget.inc"/> - <Type Value="Include"/> - </Item3> - <Item4> - <Filename Value="gui_style.inc"/> - <Type Value="Include"/> - </Item4> - <Item5> - <Filename Value="gui_edit.inc"/> - <Type Value="Include"/> - </Item5> - </Files> - <Type Value="RunAndDesignTime"/> - <RequiredPkgs Count="2"> - <Item1> - <PackageName Value="fpGFXPackage"/> - </Item1> - <Item2> - <PackageName Value="FCL"/> - <MinVersion Major="1" Valid="True"/> - </Item2> - </RequiredPkgs> - <UsageOptions> - <UnitPath Value="$(PkgOutDir)"/> - </UsageOptions> - <PublishOptions> - <Version Value="2"/> - <DestinationDirectory Value="$(TestDir)\publishedpackage\"/> - <IgnoreBinaries Value="False"/> - </PublishOptions> - </Package> -</CONFIG> diff --git a/prototypes/newmultihandle/fpguipackage.pas b/prototypes/newmultihandle/fpguipackage.pas deleted file mode 100644 index b53553c8..00000000 --- a/prototypes/newmultihandle/fpguipackage.pas +++ /dev/null @@ -1,20 +0,0 @@ -{ This file was automatically created by Lazarus. Do not edit! -This source is only used to compile and install the package. - } - -unit fpguipackage; - -interface - -uses - fpgui, LazarusPackageIntf; - -implementation - -procedure Register; -begin -end; - -initialization - RegisterPackage('fpguipackage', @Register); -end. diff --git a/prototypes/newmultihandle/gui_button.inc b/prototypes/newmultihandle/gui_button.inc deleted file mode 100644 index ab73558f..00000000 --- a/prototypes/newmultihandle/gui_button.inc +++ /dev/null @@ -1,139 +0,0 @@ -{%mainunit fpgui.pas} - -{$ifndef READ_IMPLEMENTATION} - -type - - { TFButton } - - TFButton = class(TFWidget) - private - FIsPressed: Boolean; - FText: string; - procedure SetText(const AValue: string); - protected - procedure EvFocusIn; override; - procedure EvFocusOut; override; - procedure EvKeyPressed(AKey: Word); override; - procedure EvKeyReleased(AKey: Word); override; - procedure EvMouseEnter(const AMousePos: TPoint); override; - procedure EvMouseLeave; override; - procedure EvMousePressed(AButton: TMouseButton; const AMousePos: TPoint); override; - procedure EvMouseReleased(AButton: TMouseButton; const AMousePos: TPoint); override; - procedure EvPaint; override; - public - { Constructors and Destructors } - constructor Create(AParent: TFCustomWindow); override; - constructor Create(ACaption: string; AParent: TFCustomWindow); - { Properties } - property Text: string read FText write SetText; - end; - - -{$else} - -constructor TFButton.Create(AParent: TFCustomWindow); -begin - inherited Create(AParent); - - FDrawBackground := False; - Focusable := True; - - SetClientSize(Size(100, 50)); -end; - -constructor TFButton.Create(ACaption: string; AParent: TFCustomWindow); -begin - Create(AParent); - - Text := ACaption; -end; - -procedure TFButton.SetText(const AValue: string); -begin - FText := AValue; - - Invalidate; -end; - -procedure TFButton.EvFocusIn; -begin - inherited EvFocusIn; -end; - -procedure TFButton.EvFocusOut; -begin - inherited EvFocusOut; -end; - -procedure TFButton.EvKeyPressed(AKey: Word); -begin - inherited EvKeyPressed(AKey); -end; - -procedure TFButton.EvKeyReleased(AKey: Word); -begin - inherited EvKeyReleased(AKey); -end; - -procedure TFButton.EvMouseEnter(const AMousePos: TPoint); -begin - inherited EvMouseEnter(AMousePos); -end; - -procedure TFButton.EvMouseLeave; -begin - FIsPressed := False; - - Invalidate; - - inherited EvMouseLeave; -end; - -procedure TFButton.EvMousePressed(AButton: TMouseButton; const AMousePos: TPoint - ); -begin - WriteLn('Mouse Pressed'); - - FIsPressed := True; - - Invalidate; - - inherited EvMousePressed(AButton, AMousePos); -end; - -procedure TFButton.EvMouseReleased(AButton: TMouseButton; - const AMousePos: TPoint); -begin - WriteLn('Mouse Released'); - - FIsPressed := False; - - Invalidate; - - inherited EvMouseReleased(AButton, AMousePos); -end; - -procedure TFButton.EvPaint; -var - Flags: TFButtonFlags; -begin - { Prepare the flags } - - Flags := []; - - if FIsPressed then - Include(Flags, fbfIsPressed); - -{ if FFocused then - Include(lBtnFlags, btnHasFocus); } - - { Draw the button } - - GFDefaultStyle.DrawButtonFace(Canvas, Bounds(0, 0, Width, Height), Flags); - - inherited EvPaint(); -end; - -{$endif} - diff --git a/prototypes/newmultihandle/gui_edit.inc b/prototypes/newmultihandle/gui_edit.inc deleted file mode 100644 index e0cc84aa..00000000 --- a/prototypes/newmultihandle/gui_edit.inc +++ /dev/null @@ -1,109 +0,0 @@ -{%mainunit fpgui.pas}
-
-{$ifndef READ_IMPLEMENTATION}
-
-type
-
- { TFEdit }
-
- TFEdit = class(TFWidget)
- private
- FText: String;
- procedure SetText(const AValue: String);
- protected
- procedure EvFocusIn; override;
- procedure EvFocusOut; override;
- procedure EvKeyPressed(AKey: Word); override;
- procedure EvKeyReleased(AKey: Word); override;
- procedure EvKeyChar(AKeyChar: Char); override;
- procedure EvMousePressed(AButton: TMouseButton; const AMousePos: TPoint); override;
- procedure EvMouseReleased(AButton: TMouseButton; const AMousePos: TPoint); override;
- procedure EvPaint; override;
- public
- { Constructors and Destructors }
- constructor Create(AParent: TFCustomWindow); override;
- { Properties }
- property Text: String read FText write SetText;
- end;
-
-
-{$else}
-
-constructor TFEdit.Create(AParent: TFCustomWindow);
-begin
- inherited Create(AParent);
-
- FDrawBackground := False;
- Focusable := True;
-
- SetClientSize(Size(100, 50));
-end;
-
-procedure TFEdit.SetText(const AValue: String);
-begin
- if FText = AValue then exit;
-
- FText := AValue;
-
- Invalidate;
-end;
-
-procedure TFEdit.EvFocusIn;
-begin
- inherited EvFocusIn;
-end;
-
-procedure TFEdit.EvFocusOut;
-begin
- inherited EvFocusOut;
-end;
-
-procedure TFEdit.EvKeyPressed(AKey: Word);
-begin
- WriteLn('KeyPressed');
-
- inherited EvKeyPressed(AKey);
-end;
-
-procedure TFEdit.EvKeyReleased(AKey: Word);
-begin
- WriteLn('KeyReleased');
-
- inherited EvKeyReleased(AKey);
-end;
-
-procedure TFEdit.EvKeyChar(AKeyChar: Char);
-begin
- WriteLn('KeyChar');
-
- FText := FText + AKeyChar;
-
- Invalidate;
-end;
-
-procedure TFEdit.EvMousePressed(AButton: TMouseButton; const AMousePos: TPoint);
-begin
- WriteLn('Mouse Pressed');
-
- inherited EvMousePressed(AButton, AMousePos);
-end;
-
-procedure TFEdit.EvMouseReleased(AButton: TMouseButton;
- const AMousePos: TPoint);
-begin
- WriteLn('Mouse Released');
-
- inherited EvMouseReleased(AButton, AMousePos);
-end;
-
-procedure TFEdit.EvPaint;
-begin
- { Draw the edit }
-
- GFDefaultStyle.DrawEdit(Canvas, Bounds(0, 0, Width, Height), FText);
-
- inherited EvPaint();
-end;
-
-{$endif}
-
diff --git a/prototypes/newmultihandle/gui_style.inc b/prototypes/newmultihandle/gui_style.inc deleted file mode 100644 index 0c11bf0b..00000000 --- a/prototypes/newmultihandle/gui_style.inc +++ /dev/null @@ -1,107 +0,0 @@ -{%mainunit fpgui.pas}
-
-{$ifndef READ_IMPLEMENTATION}
-
-type
-
- TFButtonFlag = (fbfIsPressed);
- TFButtonFlags = set of TFButtonFlag;
-
- { TFStyle }
-
- TFStyle = class(TObject)
- public
- constructor Create; virtual;
- procedure DrawButtonFace(ACanvas: TFCustomCanvas; ARect: TRect; AFlags: TFButtonFlags); virtual;
- procedure DrawControlFrame(ACanvas: TFCustomCanvas; ARect: TRect); virtual;
- procedure DrawDirectionArrow(ACanvas: TFCustomCanvas; ARect: TRect; direction: Integer); virtual;
- procedure DrawEdit(ACanvas: TFCustomCanvas; ARect: TRect; AText: string); virtual;
- end;
-
-const
- colShadow1: TGfxColor = (Red: $80; Green: $80; Blue: $80; Alpha: $00);
- colShadow2: TGfxColor = (Red: $40; Green: $40; Blue: $40; Alpha: $00);
- colHilite1: TGfxColor = (Red: $E0; Green: $E0; Blue: $E0; Alpha: $00);
- colHilite2: TGfxColor = (Red: $FF; Green: $FF; Blue: $FF; Alpha: $00);
- colGrayBlue: TGfxColor = (Red: $7F; Green: $9D; Blue: $B9; Alpha: $00);
-
-{$else}
-
-constructor TFStyle.Create;
-begin
- inherited Create;
-
-end;
-
-procedure TFStyle.DrawButtonFace(ACanvas: TFCustomCanvas; ARect: TRect; AFlags: TFButtonFlags);
-var
- x, y, w, h: Integer;
-begin
- x := ARect.Left;
- y := ARect.Top;
- w := ARect.Right - ARect.Left;
- h := ARect.Bottom - ARect.Top;
-
- { Background }
- ACanvas.SetColor(colLtGray);
- ACanvas.FillRect(ARect);
-
- // Left and Top (outer)
- if (fbfIsPressed in AFlags) then ACanvas.SetColor(colShadow2)
- else ACanvas.SetColor(colHilite1);
-
- ACanvas.DrawLine(x, y + h - 2, x, y); // left
- ACanvas.DrawLine(x, y, x + w - 1, y); // top
-
- // Left and Top (inner)
- if (fbfIsPressed in AFlags) then
- begin
- ACanvas.SetColor(colShadow1);
- ACanvas.DrawLine(x + 1, y + h - 3, x + 1, y + 1); // left
- ACanvas.DrawLine(x + 1, y + 1, x + w - 2, y + 1); // top
- end;
-
- // Right and Bottom (outer)
- if (fbfIsPressed in AFlags) then
- ACanvas.SetColor(colShadow2)
- else
- ACanvas.SetColor(colShadow2);
-
- ACanvas.DrawLine(x + w - 1, y + 1, x + w - 1, y + h - 1); // right
- ACanvas.DrawLine(x, y + h - 1, x + w - 1, y + h - 1); // bottom
-
- // Right and Bottom (inner)
- if fbfIsPressed in AFlags then
- ACanvas.SetColor(colHilite1)
- else
- ACanvas.SetColor(colShadow1);
-
- ACanvas.DrawLine(x + w - 2, y + 2, x + w - 2, y + h - 2); // right
- ACanvas.DrawLine(x + 1, y + h - 2, x + w - 2, y + h - 2); // bottom
-end;
-
-procedure TFStyle.DrawControlFrame(ACanvas: TFCustomCanvas; ARect: TRect);
-begin
-end;
-
-procedure TFStyle.DrawDirectionArrow(ACanvas: TFCustomCanvas; ARect: TRect; direction: Integer);
-begin
-end;
-
-procedure TFStyle.DrawEdit(ACanvas: TFCustomCanvas; ARect: TRect; AText: string);
-begin
- { Inner area }
- ACanvas.SetColor(colWhite);
- ACanvas.FillRect(ARect);
-
- { The text }
-
- ACanvas.TextOut(Point(5, 0), AText);
-
- { Outer border }
- ACanvas.SetColor(colGrayBlue);
- ACanvas.DrawRect(ARect);
-end;
-
-{$endif}
-
diff --git a/prototypes/newmultihandle/gui_widget.inc b/prototypes/newmultihandle/gui_widget.inc deleted file mode 100644 index 7f99d9d1..00000000 --- a/prototypes/newmultihandle/gui_widget.inc +++ /dev/null @@ -1,41 +0,0 @@ -{%mainunit fpgui.pas} - -{$ifndef READ_IMPLEMENTATION} - -type - TFWidget = class(TFWindow) - protected - FDrawBackground: Boolean; - - procedure EvPaint; override; - public - constructor Create(AParent: TFCustomWindow); virtual; - end; - -{$else} - -constructor TFWidget.Create(AParent: TFCustomWindow); -begin - if (AParent = nil) then inherited Create(nil, [woWindow]) - else inherited Create(AParent, [woChildWindow]); - - { Inherited components should set this to False, - or the background will override their painting } - FDrawBackground := True; - - SetClientSize(Size(125, 125)); -end; - -procedure TFWidget.EvPaint; -begin - if FDrawBackground then - begin - Canvas.SetColor(colLtGray); - Canvas.FillRect(Bounds(0, 0, Width, Height)); - end; - - inherited EvPaint(); -end; - -{$endif} - diff --git a/prototypes/fpgui2/source/core/fpgfx.pas b/src/corelib/fpgfx.pas index 6f8af25f..6f8af25f 100644 --- a/prototypes/fpgui2/source/core/fpgfx.pas +++ b/src/corelib/fpgfx.pas diff --git a/prototypes/fpgui2/source/core/gdi/fpGFX2.lpk b/src/corelib/gdi/fpGFX2.lpk index 4e261b61..4e261b61 100644 --- a/prototypes/fpgui2/source/core/gdi/fpGFX2.lpk +++ b/src/corelib/gdi/fpGFX2.lpk diff --git a/prototypes/fpgui2/source/core/gdi/fpGFX2.pas b/src/corelib/gdi/fpGFX2.pas index 1a748229..1a748229 100644 --- a/prototypes/fpgui2/source/core/gdi/fpGFX2.pas +++ b/src/corelib/gdi/fpGFX2.pas diff --git a/prototypes/fpgui2/source/core/gdi/gdikeys.inc b/src/corelib/gdi/gdikeys.inc index 1be7a470..1be7a470 100644 --- a/prototypes/fpgui2/source/core/gdi/gdikeys.inc +++ b/src/corelib/gdi/gdikeys.inc diff --git a/prototypes/fpgui2/source/core/gdi/gfx_gdi.pas b/src/corelib/gdi/gfx_gdi.pas index a30f343c..a30f343c 100644 --- a/prototypes/fpgui2/source/core/gdi/gfx_gdi.pas +++ b/src/corelib/gdi/gfx_gdi.pas diff --git a/prototypes/fpgui2/source/core/gfx_extinterpolation.pas b/src/corelib/gfx_extinterpolation.pas index 633c1e49..633c1e49 100644 --- a/prototypes/fpgui2/source/core/gfx_extinterpolation.pas +++ b/src/corelib/gfx_extinterpolation.pas diff --git a/prototypes/fpgui2/source/core/gfx_imgfmt_bmp.pas b/src/corelib/gfx_imgfmt_bmp.pas index 3748d5c7..3748d5c7 100644 --- a/prototypes/fpgui2/source/core/gfx_imgfmt_bmp.pas +++ b/src/corelib/gfx_imgfmt_bmp.pas diff --git a/prototypes/fpgui2/source/core/gfx_msgqueue.inc b/src/corelib/gfx_msgqueue.inc index ae893b44..ae893b44 100644 --- a/prototypes/fpgui2/source/core/gfx_msgqueue.inc +++ b/src/corelib/gfx_msgqueue.inc diff --git a/prototypes/fpgui2/source/core/gfx_stdimages.pas b/src/corelib/gfx_stdimages.pas index 27d0ab6c..27d0ab6c 100644 --- a/prototypes/fpgui2/source/core/gfx_stdimages.pas +++ b/src/corelib/gfx_stdimages.pas diff --git a/prototypes/fpgui2/source/core/gfx_utf8utils.pas b/src/corelib/gfx_utf8utils.pas index 6734a9d5..6734a9d5 100644 --- a/prototypes/fpgui2/source/core/gfx_utf8utils.pas +++ b/src/corelib/gfx_utf8utils.pas diff --git a/prototypes/fpgui2/source/core/gfx_widget.pas b/src/corelib/gfx_widget.pas index 5cb5281d..5cb5281d 100644 --- a/prototypes/fpgui2/source/core/gfx_widget.pas +++ b/src/corelib/gfx_widget.pas diff --git a/prototypes/fpgui2/source/core/gfxbase.pas b/src/corelib/gfxbase.pas index 9dfb9830..9dfb9830 100644 --- a/prototypes/fpgui2/source/core/gfxbase.pas +++ b/src/corelib/gfxbase.pas diff --git a/prototypes/fpgui2/source/core/keys.inc b/src/corelib/keys.inc index 832a6a16..832a6a16 100644 --- a/prototypes/fpgui2/source/core/keys.inc +++ b/src/corelib/keys.inc diff --git a/prototypes/fpgui2/source/core/predefinedcolors.inc b/src/corelib/predefinedcolors.inc index 5162a58e..5162a58e 100644 --- a/prototypes/fpgui2/source/core/predefinedcolors.inc +++ b/src/corelib/predefinedcolors.inc diff --git a/prototypes/fpgui2/source/core/stdimages.inc b/src/corelib/stdimages.inc index b195625c..b195625c 100644 --- a/prototypes/fpgui2/source/core/stdimages.inc +++ b/src/corelib/stdimages.inc diff --git a/prototypes/fpgui2/source/core/x11/_netlayer.pas b/src/corelib/x11/_netlayer.pas index 724b6e4b..724b6e4b 100644 --- a/prototypes/fpgui2/source/core/x11/_netlayer.pas +++ b/src/corelib/x11/_netlayer.pas diff --git a/prototypes/fpgui2/source/core/x11/fpGFX2.lpk b/src/corelib/x11/fpGFX2.lpk index 5255aeb1..5255aeb1 100644 --- a/prototypes/fpgui2/source/core/x11/fpGFX2.lpk +++ b/src/corelib/x11/fpGFX2.lpk diff --git a/prototypes/fpgui2/source/core/x11/fpGFX2.pas b/src/corelib/x11/fpGFX2.pas index d4a75395..d4a75395 100644 --- a/prototypes/fpgui2/source/core/x11/fpGFX2.pas +++ b/src/corelib/x11/fpGFX2.pas diff --git a/prototypes/fpgui2/source/core/x11/gfx_x11.pas b/src/corelib/x11/gfx_x11.pas index 99411c18..99411c18 100644 --- a/prototypes/fpgui2/source/core/x11/gfx_x11.pas +++ b/src/corelib/x11/gfx_x11.pas diff --git a/prototypes/fpgui2/source/core/x11/x11_keyconv.pas b/src/corelib/x11/x11_keyconv.pas index 297ff50b..297ff50b 100644 --- a/prototypes/fpgui2/source/core/x11/x11_keyconv.pas +++ b/src/corelib/x11/x11_keyconv.pas diff --git a/prototypes/fpgui2/source/core/x11/x11_xft.pas b/src/corelib/x11/x11_xft.pas index 805797cd..805797cd 100644 --- a/prototypes/fpgui2/source/core/x11/x11_xft.pas +++ b/src/corelib/x11/x11_xft.pas diff --git a/prototypes/fpgui2/source/gui/gui_button.pas b/src/gui/gui_button.pas index 6acc7a28..6acc7a28 100644 --- a/prototypes/fpgui2/source/gui/gui_button.pas +++ b/src/gui/gui_button.pas diff --git a/prototypes/fpgui2/source/gui/gui_combobox.pas b/src/gui/gui_combobox.pas index d45f4020..d45f4020 100644 --- a/prototypes/fpgui2/source/gui/gui_combobox.pas +++ b/src/gui/gui_combobox.pas diff --git a/prototypes/fpgui2/source/gui/gui_dialogs.pas b/src/gui/gui_dialogs.pas index 93144e05..93144e05 100644 --- a/prototypes/fpgui2/source/gui/gui_dialogs.pas +++ b/src/gui/gui_dialogs.pas diff --git a/prototypes/fpgui2/source/gui/gui_edit.pas b/src/gui/gui_edit.pas index 15aff0da..15aff0da 100644 --- a/prototypes/fpgui2/source/gui/gui_edit.pas +++ b/src/gui/gui_edit.pas diff --git a/prototypes/fpgui2/source/gui/gui_form.pas b/src/gui/gui_form.pas index c839492b..c839492b 100644 --- a/prototypes/fpgui2/source/gui/gui_form.pas +++ b/src/gui/gui_form.pas diff --git a/prototypes/fpgui2/source/gui/gui_label.pas b/src/gui/gui_label.pas index b3d7f9b7..b3d7f9b7 100644 --- a/prototypes/fpgui2/source/gui/gui_label.pas +++ b/src/gui/gui_label.pas diff --git a/prototypes/fpgui2/source/gui/gui_listbox.pas b/src/gui/gui_listbox.pas index 0cf08353..0cf08353 100644 --- a/prototypes/fpgui2/source/gui/gui_listbox.pas +++ b/src/gui/gui_listbox.pas diff --git a/prototypes/fpgui2/source/gui/gui_memo.pas b/src/gui/gui_memo.pas index 8736ec6d..8736ec6d 100644 --- a/prototypes/fpgui2/source/gui/gui_memo.pas +++ b/src/gui/gui_memo.pas diff --git a/prototypes/fpgui2/source/gui/gui_popupwindow.pas b/src/gui/gui_popupwindow.pas index 3757aab6..3757aab6 100644 --- a/prototypes/fpgui2/source/gui/gui_popupwindow.pas +++ b/src/gui/gui_popupwindow.pas diff --git a/prototypes/fpgui2/source/gui/gui_scrollbar.pas b/src/gui/gui_scrollbar.pas index 325dce0d..325dce0d 100644 --- a/prototypes/fpgui2/source/gui/gui_scrollbar.pas +++ b/src/gui/gui_scrollbar.pas |